|
Sorry if I'm being a bit annoying but, I was just wondering if it would be easier to use RichTextBox1.DetectURLs, because I have no idea on how to use the ArrayList, I'm not the best at VB.NET in the world
But I'm trying. Thanks though
Aaron
|
|
|
|
|
Nice idea but I'm afraid that is a property not a method.
Its purpose is to automatically format a Uniform Resource Locator (URL) when it is typed into the control.
Steve
|
|
|
|
|
I think I will try again with your idea, thanks;)
Aaron
|
|
|
|
|
Look up the Split function in your help file. You will see an example of how to split a string into an Array or ArrayList.
Get the data from the textbox into a string (strip out unwanted text at beginning). Then split it into an array. Loop each item in the array to see if it contains 'www', if it does, add it to your DataSet or write it to your database.
That would be a start. Then you can play with it to make it more efficient.
Steve
|
|
|
|
|
Thanks, your help is much appreciated, thanks, it looks like you have helped a lot of people to day, Well Done!! Thanks again
Aaron
|
|
|
|
|
You're welcome!
|
|
|
|
|
Hi,
I want to change the color of the Tab pages on form load. I want the Tab pages of the Tab control to have the same color as the tab control.Please tell me how can i give color to the Tab pages.There is nothing in the properties of the Tab control.
Urgent help is required.
Thanks
Riz
|
|
|
|
|
The Tab control properties relate to the whole control that hosts the tab pages. You can set the BackColor property for this.
To set color of individual Tab pages, you can select it in the designer and change its BackColor property. Alternatively, you can click the ellipsis (...) button to show the tab page collection editor and set the BackColor property for each page there.
In code, you need to set the TabPage.BackColor property.
Steve
|
|
|
|
|
There's no property for what you want to do. You'll have to draw the Tab Control (not the Tab Pages) yourself. You'll need to inherit from TabControl and supply your own painting code in the Paint event. Unless you have experience in creating your own controls, this could prove to be a frustrating experience for you.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave says there is no property for this.
I'm not sure if I understand you correctly. In Visual Studio 2003.NET i have properties for the tab page BackColor that I can set.
Are you using something different or am I misunderstanding your question?
Do you mena that you want to change the tabs themselves, not their page (control area)?
If you really can't do what you want, I suppose you could place a Panel control on your tab pages and set the color of that...
Steve
|
|
|
|
|
i need connection string for file excel 2003
thanks for help
MD_NADA
|
|
|
|
|
What do you need to do with this file?
Steve
|
|
|
|
|
i need to select , insert and delete
MD_NADA
|
|
|
|
|
|
i need connection string for file excel 2003
thanks for help
MD_NADA
|
|
|
|
|
i want to retrieve the values from a table which is portrayed in a datagridview and pass it to the properties in the class and display it on a form in textboxes. thanking you in advance
Nothing lasts but nothing is lost
|
|
|
|
|
hi all.
i create a database in access 2003 and i made a password for opening.
so when i open the base the user has to type the password.
i made a macro which i called it Autoexec and i add on it the action runcode
which is like this:
Dim db as Dao.DataBase
Set db = DBEngine.OpenDatabase("C:\MaBase.mdb", False, False, ";pwd=password")
db.Close
i wrote this code in order to hide the password window when i open the base.
but it stills appear so does someone may help me to hide the pessword window?
thanks
-- modified at 4:37 Wednesday 2nd August, 2006
|
|
|
|
|
Are you trying to open a password protected access database from VB.NET?
One thing to remember, if you have the database set to 'compact on close' the password window will re-appear.
Steve
|
|
|
|
|
I need to compare the value of a field in a row on an arraylist with the value of a field on a second arraylist
I have this bit of code working for arrays but cant get it working for arraylists
The second argument here (1) represents the second field in the row, with arraylists I get a message saying to many arguments.
Can I do this with arraylists or do I need to copy the arraylists to arrays?
Thanks
For q As Integer = 0 To 9
For j As Integer = 0 To 9
If StrArray1(q, 1) = StrArray2(j, 1) Then
count = count + 1
End If
Next
Next
Thanks
|
|
|
|
|
Arrays can have multiple dimensions.
ArrayList's always have exactly one dimension.
Steve
|
|
|
|
|
so how can I do something like this with an arraylist
there are actually two fields on each row, I understand what you said about
only one dimension, in this case if the first field is the one each array, the 2nd field will be the say, so I can just compare the entire row but when
I try something like
If StrArraylist(q) = StrArraylist(j) Then do something
I get a message 'Operator is not valid for type 'field name'
I thought this meant to try == instead of = , but this wouldn't compile
thanks
|
|
|
|
|
I tried to create one dimensional arrays and copy me arraylists to arrays so that I could do the compare in the arrays, but can't get that to work either, maybe its because my one dimensional arrays have two fields
Dim tempArray1 As Array = Array.CreateInstance(GetType(String), 10)
Dim tempArray2 As Array = Array.CreateInstance(GetType(String), 10)
Arraylist1.CopyTo(tempArray1)
Arraylist2.CopyTo(tempArray2)
always get this message
At least one element in the source array could not be cast down to the destination array type
|
|
|
|
|
OK. So you know ArrayList's do not have fields - only one dimension
One value per row if you like...
You could use the ArrayList.Item(index) property passing the index
or ArrayList.Contains(Value) passing the value.
Do you just want to see if a value exists in each array?
Do you want to see if a value exists in each array at the same index?
Do your arrays contain duplicate values?
Steve
|
|
|
|
|
I want to see if the value at a given index in one array is the same as the value at the same index in a different array, I don't need to know what the value is, just want to see if the values are the same
|
|
|
|
|
I tried
For r As Integer = 0 To 9
If arraylist1.Item(r) = arralist2.Item(r) Then
count = count + 1
End If
Next
but still get this message "Operator is not valid for type "
|
|
|
|