Tab Controls on a Form

  • Thread starter Thread starter erv
  • Start date Start date
E

erv

Guest
I am putting several tabs on a form and would like to change the background color of the tabs to something different than the form's color and certainly not the default grey. I have tried the tab control and page control properties, but can not seem to find a property for tab background color. Is there a way to change the tab's background color? Any help is appreciated! thanks.
 
There is a way, kind of. It looks a little silly though, because tabs containing the page captions stay gray no matter what you do.

If you set the backstyle to transparent for the tab control, draw a box the same size, and set the fill color for the box to the desired color. You may need to do a Bring to Front on the tab control to float it on top of the colored box.

Anyway, it's the best I can think of.
 
Not as far as I'm aware, the best thing you can do is set the tab page's transparent property to yes and then at least it's the colour of the background that shows through. Still doesn't get rid of the gray tab tops or buttons.
 
After the piece of genius you pulled earlier, your's is definitely the more brilliant!
 
I recently downloaded Mr. Lebans' colored tab sample database and am in the process of integrating it into my own application but I would consider my self a novice (a couple of classes and 3 months worth of experience) within VBA and wonder if anyone would care to give me some helpful hints with this integration. I understand where he is putting his VB procedures on the form and so forth and am in the process of copying and pasting into my own but I have a couple of questions already. His form On Load procedure reads:

' Create an instance of our FormatByCriteria class
Set TB = New clsTabs

' You MUST set the CriteriaControl prop
TB.TabControl = Me.TabCtl
' You MUST set the BackGround control
' used to display the current pages background color
TB.BGControl = Me.RecBG
' Parent Form
TB.TabForm = Me

' Set the desired Rotation amount
TB.RotateDegree = 0

' Create the Tabs
TB.MakeTabs

I changed the TB.RotateDegree to = 0 as I don't want my tab text rotated but what does the TB.MakeTabs statement do?

Everything is now integrated but when I start the app I get this error "Unable to create DIBSection".

As a novice VB user if you can point out anything else that is going to cause me problems beforehand I would certainly appreciate it.

Autoeng
 
Last edited:
Am I missing something I have my tab page set to transparent but its still grey and my colour boxes are underneath the tab.


Help
 
Karen:

I never could get it to work because I use NT but I believe that you set the tab color by selecting the tab control property and setting it there.

Autoeng
 
I downloaded Steven's TabColors (link referenced above) and could not run it in A97. On opening the form received the following for both forms in the MDB:

Compile Error: Can't Find Project or Library

I find that I do not have in A97 the reference: MS Basic Visual Basic for Applications Extensibility 5.3 in A97
 
But it runs with MS Basic Visual Basic for Applications Extensibility which is in the Tools/References list. I removed the check on the 'missing' line and found the other.
 

Users who are viewing this thread

Back
Top Bottom