473,396 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Follow up to question about Tab Control colors

http://www.thescripts.com/forum/thread199041.html asks the question "Change background/tab colour of tabControl?". I've been working on this problem for 2 days and have come up with a nice, neat, simply way of doing this that takes almost no pain.

See ** Removed link to external code ** for a completely free piece of sample code on what to do.

The source code is for Access 2003 and includes a VB5 ActiveX DLL along with all source code. It should be a fairly trivial process to use this in Access 2007 with VB6. You could even use it just with Access (no VB) with slight modification. The only code that is reliant on VB are the TwipsPerPixelX and TwipsPerPixelY calls, which could be substituted with hard coded values (probably 15 for most monitors).

TabControls in Microsoft Access do not implement the BackColor property and only implement the BackStyle property when the Access MDB file has "Use Themed Controls" property set to false. If you want to be able to have your TabControl use a transparent background, as I do in my code, you MUST set the "Use Windows Themed Controls on Forms" option to unchecked in Options -> Forms/Reports.
Feb 21 '08 #1
2 1544
sierra7
446 Expert 256MB
Hi again Max

This is very good but it would be interesting to learn how to detect the version of Access before it gets to the line
Expand|Select|Wrap|Line Numbers
  1.  
  2. If AccessApp.GetOption("Themed Form Controls") = 0 Then
  3.  
because 2000/2002 crashes there as it does not understand "Themed Form Controls"

I have recently had problems when porting code from 2000 to 2003, where it would be useful to check for 2003 and turn off the new functionality in 'Autocorrect'.

In a previous thread in a demo system I copied your code from the DLL into a module within Access to make it unnecessary to register and have reference to an external file. I have not yet had time to checkout Mr.Lebans solution to confirm he can change the colour of the tabs too.

S7
Feb 27 '08 #2
NeoPa
32,556 Expert Mod 16PB
Max,

You are welcome to include your code in a post, but linking offsite to code is not allowed.

Admin.
Mar 3 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: ourspt | last post by:
Hi, We are working on a .NET (ASP.NET/VB.NET) application with SQL Server database. In our application, we are using some standard controls and some custom controls (like list boxes, text...
1
by: Dean J Garrett | last post by:
We have a browser based application that requires us to display different colors of text inside of a Textbox control. We found out the standard .net textbox control may not be able to display...
4
by: | last post by:
Please, help. I created my contol, ButtonX, which subclasses System.Forms.Windows.Button class. I am doing my own paiting, by overriding OnPaint and OnPaintBackground (without calling base...
0
by: Bryce Budd | last post by:
Hi, I have a webform which has several server controls attached. The entire form is data bound to custom objects. The collection objects are cached using the Cache object. In my use case, I...
2
by: Cliff Lane | last post by:
I have an application that allows the user to select fore and back ground colors for command buttons. I use the dialog to select the colors and store the value returned in the db as a string. For...
5
by: jcrouse | last post by:
Many of you who may respond to this are somewhat familiar with my app in process (Cor). Simply, it's a form with 30 labels that is triggered from another application, with a hotkey. The labels text...
0
by: WhiteWizard | last post by:
I have built a custom control which sits on a panel. There is another panel on the form with a splitter between them. The custom control has a tab control on it, and I need to do two things: (1)...
5
by: Arpan | last post by:
In order to populate any server control with data dynamically, is it ALWAYS NECESSARY to either BIND the DataSource to that server control or call the DataBind method of that server control? For...
2
by: Xavier | last post by:
Hi, When I create a user control textbox (like "public class mytextbox : textbox") in C# and use it on another form, properties like font, colors, etc. are not inherited. Is this behavor normal...
7
by: Brian | last post by:
Hi, here is exactly what I want to try and do. On a simple level, when the user clicks on a textbox the matching label will change colors to hightlight the which field they are editing. By...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.