Error On Returning List Of String 2008 Desktop Application
Nov 22, 2010I'm trying to create a ntier desktop application using vb.net 2008.I'm trying this [code]...
View 6 RepliesI'm trying to create a ntier desktop application using vb.net 2008.I'm trying this [code]...
View 6 RepliesI'm trying to create a ntier desktop application using vb.net 2008.[code]...
By the way what i want to achieve is how to get the data as a List(Of String),because if i put the getMenu function into the presentation layer directly,it gives me the data as i expected..Also if i return as a string instead of List(Of String),it gives me the single data.
I am currently trying to develop an application which will backup large folders to a specified destination. To find all the files in the specified 'backup' directory I am using the following code.
[Code]...
I have tried putting my GetFilesRecursive function into a separate background worker to run first so I can update the GUI however I am struggling on how to return the List of found files back to my application (I get cross-threading exception) and how to update the progress bar to show the progress of the GetFileRecursive function so the user knows it is processing the list of files and has not crashed/frozen.
I have a Business Logic Layer that contains function that return datatables. I'm writing a function that will return just the records that begin with the string passed in. this is what I've come up with so far:
Public Function FetchBusinessAreas(ByVal area As String) As List(Of BusinessArea)
Dim AreasList As New List(Of BusinessArea)
Dim dt As DataTable
[code].....
I'm trying to list all files in my desktop folder.But strUserDir value is "0" any ideas why?
My code
VB.net
Dim strUserDir As String = Environment.SpecialFolder.Desktop
For Each foundFile As String In My.Computer.FileSystem.GetFiles(strUserDir)
ListBox1.Items.Add(foundFile)
Next
G:DevelopmentDOT NET DevColony_4ImagesBattenhallAve_Plan.bmpand i want to find and return the value after the last '' for example in the string above i would want to return:BattenhallAve_Plan.bmp
View 5 RepliesI need to obtain a list of desktop icons and add them to a ListView. I'm currently doing this:
[code]...
It points to the direct path the icons should be located under the user profile. However, for some reason I've yet to determine, not all of the icons are in this directory.
We have a Windows Forms VB.NET application running on Windows Server 2008. Users access this app using Remote desktop.The app displays information in Excel, but Excel opens on the server.Is there a way for the .NET app to launch Excel on the users local desktop?
View 1 Repliesi have issue returning a list in a web method. here is the code
<WebMethod()> _
Public Function getTags(para_parents As String) As List(Of getTypeDetailsByParentName_Result)()
Dim context As New PPEntities
[code]....
the error is
Value of type 'System.Collections.Generic.List(Of SaftyonRoad.getTypeDetailsByParentName_Result)' cannot be converted to '1-dimensional array of System.Collections.Generic.List(Of SaftyonRoad.getTypeDetailsByParentName_Result)'
email validation for textbox in vb 2008
View 2 RepliesI need to fill a web form using VB.Net Desktop Application. If a webform contains a captcha image to enter, will that can be shown in desktop application to enter and submi
View 1 RepliesHow can I get all the names of the shortcuts icons in the desktop into a String?
Like: Computer, Microsoft Office Word 2003, Internet Explorer....etz.
I tried to use "My.Computer.FileSystem..." , but didn't find a way.
That was probably bad title, but I'll illustrate what I'm trying to do. I have a method in a class that I need to call several times. The method returns a List(Of String). I'm just grabbing some information from a database.
VB.NET
Public Function GetTestList() As List(Of String)
Dim int As Integer = 0
[code]....
my VB.Net desktop app writes to an Excel file. I need to set the style to a row. I can read a style of one row, but am unable to set the style in another.
View 2 RepliesI have a school project i am working on wich i am to build a program that randomly generates 500 alpha-numeric numbers (license plate numbers). the program needs to be able to search the 500 numbers and based on given criteria (a text box) that you put in return the matching results to another listbox. I got the 500 plate numbers to generate on form load but have been searching thru my textbook and cant seem to figure out how to take the imput from the text box and search the list box. Not asking for a ton of help but just a point in the right direction. i attached the assignment i was given from instructor.
[Code]...
would like to send me a pure oop based desktop application developed in vb.net 2008 and sql server 2005?
View 3 RepliesI want the Function to accept List(Of String), Array & String and similarly return List(Of String), Array & String respectively. The Function simply adds a string (month) to the input collection. I just want to use it for string, array and list with needing to think of conversions.
[Code]...
For Each s As String In list
If s.Contains("Hello") Then
list.Remove(s) 'ERROR Collection was modified; enumeration operation may not execute.
End If
Next
Why do i get that error?
1 when my listbox returns resaults it only brings back 10 how do I set it to return lets say 500
and question 2 is when I click on my links in listbox it's not opening webpage as I would expect it...
This is my code
[Code]...
I am trying to make an application which will list all processes in a string when it starts. After it has listed them all I enable my timer, and in the timer there gets checked if the process is in the process list (string), and if it isn't it will add it to my listbox. The only problem is, it's not working, it's never adding an item.
vb.net
Public Class Form1 Dim AllProcesses As String Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'The first check For Each p In System.Diagnostics.Process.GetProcesses() If AllProcesses = "" Then AllProcesses = p.ProcessName Else AllProcesses += "|" + p.ProcessName End
[code]....
I'm working on a small game that is based on a map of grid squares.I have a class (clsGrid) that stores a few properties for each grid square.The grid square objects are organized into a list(of clsGrid).A loop and stream reader are successfully reading properties from a text file, putting the properties into grid objects, and adding the grid objects to a my list of grids. When retrieving a grid from the list of grids, I'm getting unusual results. Regardless of the index I give the list, I always seem to get the last indexed grid in the list.The debugger seems to suggest that the right numbers are being read into the stream reader and they are being added to gridHolder. However, the message box at the end will always show me the LAST grid.id, regardless of the index I give it.
'A subroutine that generates a map (list of grids)
Sub GenerateMap()
Dim reader As StreamReader = File.OpenText("map1.txt")[code]....
Function runs fine on the listbox until i use the btnUp_Lanemgr click event
throws an exception in function (below in bold) "Unable to cast object of type system.string to type namespace.myitem"
what i can do to make this work?
'Button moves selected listbox item up
Private Sub btnUp_Lanemgr_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUp_Lanemgr.Click
[Code]....
Im planning to create a Remote Desktop Application and I'm having problem with viewing other computers monitor or screen.
Im not asking for the code on how to do it. and one more thing is it safe to use winsock in creating a client/server application?
I want to define a function similar to:[code]My current definition is having an issue with the following statement:GetList = (From x In oDS.Tables(0) Select New T(x)).ToList.I can't figure out how to get to create a New object of type T, any suggestions?
View 2 RepliesAny best approach to what I'm trying to achieve (linq to sql, returning list of data to show in a grid/list etc etc)... Its complaining about anonymous type conversion, and from what I'm reading, thats not elegant way of doing it.
Public Function GetHistory(ByVal historyId As Integer) As List(Of ?????????)
Using dc As New myDataContext(Application.GetConnection)
Return (From t In dc.ActionTypes, a In t.MyTable Where a.HistoryID = historyId Select a.ActionOn, a.ActionBy, t.Description, a.ImpactedItem, a.ActionDescription).ToList
End Using
End Function
Let's say 10 desktop shortcuts, all with different names/icons, point to and can start the same exe application from the same directory. Is there any means for the application to know the distinct name of the shortcut that was doubled_clicked. Also is there any means for a running application to know if it was started by command line, by a double_click on the exe, by a double_click on a shortcut that points to it, or by another process' call?
View 4 RepliesI am trying to use Setup project. Want my setup to create a desktop shortcut with my application.I donot understand how to do it. Clicked on User's desktop, I created Shortcut to User's desktop, changed the properties Target and Working Folder as 'Application Folder'But it does not connect with MyApplication.exe When I ran the setup and tested Desktop short cut, it took me to the folder where application was installed, instead of running the application.How to make the application run using this shortcut?
View 1 RepliesI have got an xml document which looks something like this.
<Root>
<Info>
</Info>
<Info>
[Code]...
How can i write a linqToXML query so that it returns me an IEnumerable containing each child element, in this case all five child elements of , so that i could iterate over them. The order of child elements is not definite, neither is number of times the may appear.
Question: I created an ASP.NET web application. Now it originally was meant for deployment on a webserver.That is working, so, so far so good.My question now is: Is it possible to deploy it as a desktop-application, too? That is to say the installer installs some kind of server, plus the web application, configures the server to run this application on a localhost URL, and then creates a link in the start menu/desktop, where it opens that url (website, the application) on localhost in a web browser?
I think it should be possible, though the server wouldn't be IIS, because this is a windows component which can't be separately installed. Is there anything like this already out there The nonplusultra would be that it only starts the server when you click on the shortcut.
I have an application that is written in VB.NET, using the System.Windows.Forms.Form as the front-end GUI. It runs perfectly on my Windows machine however recently there is a business requirement to convert this application to run as a web application so that people could view them in their blackberries when they go to the URL. Is there any quick way to perform such a conversion or I will have to translate the code line-by-line for such cases?
View 1 Replies