Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Some radio buttons become all black with XP Theme?!?

0 views
Skip to first unread message

Michael Hansen

unread,
Jun 10, 2002, 6:17:21 AM6/10/02
to
I just tried to add a manifest to my VB6 app, to enable it for XP themes...
Now most of the UI is "themed" alright, but some radio buttons
(OptionButton's) become all black, instead of the desired theme-colors!
I have tried to compare the properties of the OptionButton's that is themed
OK, with the ones that are not - I can see no reason for some of them
failing...

Has anybody seen this / Solved the puzzle ?
If so, please share your wisdom!

Cheers
Michael.


Mick Doherty

unread,
Jun 10, 2002, 7:17:07 AM6/10/02
to
The Blacked Option Box's are contained in frames.
Add a Picture box to the frame and place the Option box's on the Picture
box.

Alternatively, create the frame through API and add the child controls to
the frame at run time.

"Michael Hansen" <m...@it-online.dk> wrote in message
news:#CcDsgGECHA.1880@tkmsftngp04...


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 19/04/2002


Michael Hansen

unread,
Jun 10, 2002, 7:15:28 AM6/10/02
to
It seems that this is only a problem, when the OptionButton is owned by a
Frame-control!
When the OptionButton's are placed dircetly on a form, or on a PictureBox
there is no problem.
Also when the OptionButton is owned by the form, but placed on top of a
Frame-control there is no problem.
By the way problem does not affect Checkboxes placed in the same way as
OptionButtons... Weird!

Now I can of course work around this behaviour by moving all my
OptionButtons from Frame's and onto the Form's.
The price being paid is of course that moving/enabling/disabling etc the
group of controls that used to be contained in a frame become more of a
hassle

Cheers
Michael.

"Michael Hansen" <m...@it-online.dk> wrote in message
news:#CcDsgGECHA.1880@tkmsftngp04...

Michael Hansen

unread,
Jun 10, 2002, 7:44:30 AM6/10/02
to
There seems to be a problem with painting the corners of CommandButtons
also!
It looks like CommandButtons contained in Frame's do no get the rounded
corners (using "Windows XP" theme), or more precisely it looks like the
whole rectangle of the button is painted with black giving the button
"sharp" corners...

Do you know of other "problems/controls" one should be aware of when
"theming" a VB6 app?

"Mick Doherty" <mdau...@ntlworld.com> wrote in message
news:#mLI7AHECHA.2296@tkmsftngp05...

Michael Hansen

unread,
Jun 10, 2002, 7:56:32 AM6/10/02
to
Yeat Another VB6 Theming Bug:
When you have a Frame contained inside of another Frame, the caption of the
interior Frame is displayed with a larger font, and the last part of the
caption is not displayed.


"Michael Hansen" <m...@it-online.dk> wrote in message

news:eM6bYRHECHA.1108@tkmsftngp04...

Mick Doherty

unread,
Jun 10, 2002, 10:34:21 AM6/10/02
to
I've never put a frame in a frame before so had not seen this.
It appears that the label of the frame has become detached and is using the
system font.
You can see the frame through the caption label.
However, as with other controls, put a Picture box control into the parent
frame. Then make the picture box the control container.

Other problems that you can avoid:
When adding MS Common Controls use version 5 not 6. Version 6 controls have
the wrong Classnames and so windows will not apply visual styles.
The exception to this rule is the Rebar Control which is not available in
version 5.
When you add a Rebar control you must also add another of the extended
Common controls.(i.e. Toolbar, ImageList).

When creating your own ActiveX Control You must add one of the extended
Common Controls (I add an empty ImageList as this is non obtrusive and adds
no size to the control.).

Failure to add an extended Common control will result in a Memory Access
error on unloading the compiled executable.

There is a lot to learn now that you wish to program for WinXP
compatibility.

"Michael Hansen" <m...@it-online.dk> wrote in message

news:#oEIHYHECHA.1700@tkmsftngp04...

0 new messages