tags:

views:

567

answers:

3

I'm using the ssOption control (Sheridan 3d Option control) in VB6.

In Windows 98 the text area background color is the same color as the background color around the Option Circle, and that color is the default form color. So the Option button appears to be transparent.

There is no Background color property and on Windows XP the background color of the text area is a different color from the background color around the Option circle.

Any ideas as to why this would happen? The control's wrapper is in Threed32.ocx and I have the same version of it in the Windows\system32 directory on both the Win98 and WinXP systems.

  1. Why might it behave differently on 98 vs XP?
  2. Any ideas on a fix?
A: 

Threed32.ocx is ancient - it was designed for VB4. I would replace it with the built-in VB6 option control.

Alex Warren
Replacement is not a complete answer as the SS Option has different features than the native VB6 option control.
RS Conley
I have to agree with Alex. Threed32.ocx is unsupported on Vista and XP x64 and it hasn't been Microsoft-recommended since VB4 (VB5 incorporated most of its functionality into the native option control)
rpetrich
The VB5/6 option control does not do everything that the SSOption does. Namely in the alignment of the text when the option button is to the right and the 3D Fonts. A complete answer will give alternatives.
RS Conley
True, but it is still useful. Is your answer not useful because it neglects to explain the nuances of tab order, focus and mouseclick issues when replacing ssOption with the native option? No, of course not; both are useful. Alex's answer is relevant and could be used to provide context.
rpetrich
Both answers have my upvote :)
rpetrich
+3  A: 

SSOption sets it background to the Windows Button Face on Windows XP. This the same background you get when you make a new form. You will need to use a frame or another type of enclosure that has a background of button face if you want to use it on a multi-colored form. Otherwise use VB6's Option button.

The advantages of the SSOption is the ability to display it's text in a 3D raised or inset format. This really only works well using the default button face color which is why it is hard coded into the control. It also has better formatting of the text when the option button is to the right of the text.

If you can't use a enclosing frame or panel then you have a tedious alternative. You can make an VB6 option with no text. If you are using the 3D font. Then you can use two labels to achieve the same effect. Make the bottom white (or top depending on raised vs inset) and offset by one pixel or 15 twips.

You can use the ZoomIn tool if you installed VB6 as part of the Visual Studio 6 package to make sure it is right.

If you are using it for the Alignment. Then you can fiddle with the width of the VB6 native option control until it looks right or make the option with no text and use a label.

RS Conley
+1  A: 

Alex is right. Threed32.ocx is old and has a number of problems. It's not supported on Vista, it grabs the focus when it's made visible, it's hard to upgrade to VB.NET - there are more. For my company these are strong enough to outweigh the extra functionality it gives - we're droppping it from all our programs.

MarkJ