|
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 "
|
|
|
|
|
Should be:
For r As Integer = 0 To 9
If arraylist1.Item(r) = arralist2.Item(r) Then
r = r + 1
End If
Next
Where did 'count' come from?
You can also increment by using r += 1
|
|
|
|
|
You may need to try something like this:
Dim str1, str2 As String
For r As Integer = 0 To 9
str1 = arraylist1.Item(r)
str2 = arralist2.Item(r)
If str1 = str2 Then
'Implementation code here - set bool flag, exit sub etc
End If
r = r + 1
Next
|
|
|
|
|
I should not need to increment 'r'
the for - next structure does that
the count is a count of the number of times the two rows match, dimmed before the for next statement
but when I try to run this I get a message
Operator is not valid for type
|
|
|
|
|
Oh! You are right. I'm sorry...don't know what I was thinking there!
Did you try:
str1 = ArrayList1(0)
str2 = ArrayList2(0)
and then compare the strings?
Steve
|
|
|
|
|
I've tried various combinations setting = to a string, using Cstr, referencing field, not referencing field
I've also tried copying to a array using copyto and setting an specific row = to a specific row in an array, but nothing works
My compare logic works for arrays, if I could figure out how to copy the arralyist to an array I would do the compare there
|
|
|
|
|
Ok. Give me a while and I'll try doing it myself.
I'll get back to you...
Steve
|
|
|
|
|
I'm thinking actually to create two sets of data
one in arraylists and one in arrays, sounds like a bad design, but there are things that I can only figure out how to do in an arraylist and things I can only figure out how to do in an array
Anyway, if I do this, my problem is solved, I can make it work this way
thanks
|
|
|
|
|
I have just tried it and this works:
Dim Arr1 As ArrayList
Dim Arr2 As ArrayList
Arr1 = New ArrayList(10)
Arr2 = New ArrayList(10)
Arr1.Add("Fred")
Arr2.Add("Fred")
If Arr1.Item(0) = Arr2.Item(0) Then
MessageBox.Show("There is a match!")
Else
MessageBox.Show("There is no match...")
End If
Change the string for Arr2 and you will get the 'no match' message.
Hope that helps.
Steve
|
|
|
|