Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

radiobutton control array 1

Status
Not open for further replies.

rds747

Technical User
Mar 8, 2005
180
US
Think I've asked this question before, but cannot find the thread. Also tried searching for the answer.

In Design Time, I created two radio button control arrays. Option1 has 3 indexes and Option2 has 2 indexes. Option1 doesn't have any values set to true before run time. Option2(0) by default has a value of true in design time. If I click on Option1(0) then the value of option2 is false and value of option1 is true.

I thought the two control arrays are independent of each other?? If that isn't true how do I create two different sets of radio buttons.

Thanks.
 
Add 2 frames to your form and put each group of radio buttons in to their own frame.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Thanks.

Why do the radio button group have to be in its own frame?
 
According to MSDN documentation, radio buttons need to be placed within a container such as a frame or a picture box. Of course, a form is also a containter control. All of the radio buttons within the same container control work in conjunction with each other (so one option is deselected when another is selected).

I think I would like to change my suggestion. Instead of using a frame, I suggest using a picture box control to group your radio buttons. For some reason, frames and radio buttons don't play well when you are using an XP manifest file.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
An XP manifest file allows your application to have an XP appearance. It's actually very cool (something I learned from one of strongm's post a long time ago).

Here's how to get it to work...

Copy/paste the contents of the code window to a notepad document.

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <assemblyIdentity 
        version="1.0.0.0" 
        processorArchitecture="X86" 
        name="CompanyName.ProductName.YourAppName" 
        type="win32" />
    <description>Your application description here</description>
    <dependency>
        <dependentAssembly>
            <assemblyIdentity 
                type="win32" 
                name="Microsoft.Windows.Common-Controls" 
                version="6.0.0.0" 
                processorArchitecture="X86" 
                publicKeyToken="6595b64144ccf1df" 
                language="*" />
        </dependentAssembly>
    </dependency>
</assembly>

Then, save the file in the same folder as your VB6.exe. On my computer, it's C:\Program Files\Microsoft Visual Studio\VB98

Name the file vb6.exe.manifest

Now, when you open VB, the controls will have an XP appearance. This works with any app that was created with VB (and possibly others that weren't).

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
See thread222-602411 for some issues related to XP appearance.

See also thread222-542249 for a method that does not require the .manifest file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top