I have a function that is suppost to take a list of strings then split up each part. This is my code
For i As Integer = 1 To UPdata.Count
If InStr(UPdata(i), "!!") Then
Dim DataTBP() As String
Do
DataTBP = UPdata(i).Split("!!")
[Code] .....
One section of UPdata would look something like
ABC#DEF@GHIHSJD!!143#ISJ@PSIODH!!
What I want it to do is firstly separate the lines using !! so i would be left with
ABC#DEF@GHIHSJD
143#ISJ@PSIODH
That part works fine and I am left with an array DataTBP() with 2 values. The strings found above. Its then suppose to extract the part before # for every string left in DataTBP (In my example two) but the function that's meant to do this:
For j As Integer = 0 To UBound(DataTBP)
Dim DataType As String = DataTBP(j)
DataType = DataType.Split("#")
Select Case DataTBP(j)
[Code] .....
Throws me the error
Value of type '1-dimensional array of String' cannot be converted to 'String'.
But I don't know why as DataTBP(j) is a string not an array but a string. I've also tried
For Each a As String In DataTBP
Dim DataType As String = a.Split("#")
Next
It throws the same error
I see that VB.NET doesn't support control arrays the same way VB6 did. how to do control arrays in VB.NET in my following example...I have an array of strings. I want to load a textbox for each item in the array, and when I press a button, I would like to cycle through each of these textboxes, retrieving their values.
I'm currently trying to add all the sections of a specified .ini into a combobox.[code]Now that's my section in the .ini, but it's scrambled and placed into multiple lines. I just want it on a single line as said in the .ini.Does anyone have any idea how to get values between brackets "[hi]" and place the value between the brackets into the combobox items?
I'm working on a project with a large multidimensional array
resrv(200,12,31,33) it keeps track of information on specific dates within a 200 year range.
What I'm looking to do is save the array to a file so that I can load it again when the program is started.
In VB 6 I used to be able to use a simple for next loop into an open file and load it the same way. It doesn't seem to work the same way with Fthe filestream class in VB.net
How can i remove an array item by selecting an item from listobx and press remove/delete button?for an example, if i want remove index 2 from listbox, so the array should remove index 2 item and move the item of index 3 to index 2 and so on.
I have a program that will compare an array of grocery list items glist and an array of coupon item clist.When I compare the two and if there is a match somewhere in the array I want to have a picturebox visible.When there is no match, I want the picture box not to be visible. [code] The code seems to work great until I come to the else statement.When the code finds a match it displays the picture box and the msgbox without error, but as soon as the message box is cleared, even though i've input it as an ELSE statement, the picturebox goes false again.Does anyone have any idea of how I can "hold" the picturebox to stay visible while the match between the arrays exists?
Regarding my college project. i'm working on a sales system . i have a form which consist of all the following information( item code , item name , item price , quantity of item ) which is display using a data grid . data input by user using text box and all this information will be stored in a database(sales database) i'm using ms access 2007. the grand total will be displayed in a text box . and amount paid will be input in a text box too , my major problem now is how to i create a reciept that will have all this information of the purcase. i have a reciept button . what the next step ? i dont have any idea how to get the reciept done.
I have an array of people stored in a custom structure array... how can i copy this array to a temp array so that the temp array has all the same values as the original custom array?
I am trying to build a front end for an access database I created I can connect to the database but when I try to pull data into a data grid view I get no results Here is the code what did I do wrong(I'm also new to vb)
search Private Sub searchbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles searchbtn.Click Dim srval As String Dim type As String
I can seem to find is vbs code for retrieving remote share permissions using WMI.I've tried to convert this code to run on vb.net but don't seem to be getting anywhere.should I try to convert the below code or are there other methods I can use to retrieve the permissions. I can easily get the list of remote shares using win32_share but not the permissions
I've search tons of .net pages and all I can seem to find is vbs code for retrieving remote share permissions using WMI.I've tried to convert this code to run on vb.net but don't seem to be getting anywhere.hould I try to convert the below code or are there other methods I can use to retrieve the permissions. I can easily get the list of remote shares using win32_share but not the
I'm using VS2010 Express. I have a VB.net project, where I need to find the metadata of individual files; Artist, Author, Comments, etc. (Specifically I need to find the video length in time of .wtv files). I have searched, but could only find VB6 examples and other code snippets that simply didn't work as they required some retired com or dll to do it. How do I do it in the latest VB.net? NOT VB6, C# or anything else. VB.Net in Visual Studio 2010 Express.
Public Class Pizza Public Sub New(ByVal name As String, ByVal cost As Decimal) Me.Name = name
[Code]....
But I want the Cost property to be displayed in a label as I add each item into a ListBox. In context, I add an item from a listbox into another and when I do the Cost of each item will be added into the label. Like a checkout system and that's the running total.
I am trying to retrieve data from a Ms Access backend DB. However, for some reason it is not working. Hence me asking for help lol. Here is my good faith effort
Public Class Form1 Dim dsMenu As New DataSet Dim con As New OleDb.OleDbConnection Dim dbProvider As String
I have decided to go down the MAPI / CDO or Winsock route in my application. Sending emails is easy enough. However, I need to retrieve and display emails. The slight twist in the tail is that I don't want to download / access all emails, just those from a certain sender's email address. Most users will have Outlook installed on the computer but i'd rather not rely on this unless I have to. I'm not sure which technology to use and how to go about this as I don't want to download all messages and then iterate through them. I'd rather just request emails with specific properties.
At the moment it reads in what I have in a text file, splits it up based on where commas are placed and puts the split data into an array, i.e. if the text file is a,b,c it will split up the 3 characters and put them into an array.
What I want to know is, is it possible to write each item from the array into a new TextBox - in the same way that It adds 1 to the 'i' variable each time, except with each new item the TextBox it uses goes up by one, i.e. 'a' in TextBox1, then 'b' in Textbox2
I have an app that I am developing to keep track of my members' names and phone #'s. I have all current names and numbers in a csv file and they are read into a structured array. The app can add, delete, and modify members. I have everything coded except the 'Modify' menu item. The list box is populated with only names at run time, I would like to have both the name and phone number displayed in the two text boxes I have on the form when a name is selected from the list box. I can get the name to display in the text box I have for names, but since the phone number is not in the list box I am wondering how I can get it into the appropriate phone text box. I used txtName.Text = lstMemberList.SelectedItem to get the name displayed but since the phone number is not in the lstMemberList list box I cannot figure out how to get it into the txtPhone text box.
I'm loading a file into an ArrayList, then looping through the ArrayList and each time adding a DataRow to a Datatable, then using the Datatable as the DataSource for a GridView. My problem though is that the file has one field at the end that I don't want to display. I'm not sure though how to not to add it as a DataRow or what to do so that it won't be displayed. Do you know what I might do. This is my
' Declare and setup a StreamReader object to read the file Dim objStreamReader As New StreamReader(fname) Dim arrText As New ArrayList
I am trying to get each item in a list box into a string array. However, I keep getting an index error and I am not sure why. I am doing this so i can perform a LINQ on the array.
Error:InvalidArgument=Value of '16' is not valid for 'index'.Parameter name: index
Module Dic_Select Public DicDataSelect() As DicDataList Public Selected_Dictionary_Name As New ArrayList Public Function New_Dictionary(ByVal Dic_Name As String) As Boolean For i As Integer = 0 To Selected_Dictionary_Name.Count - 1 Step +1 [Code] .....