VB6 to VB2005 question about Frame control

K

Kevin

I have a Windows form with several Frame controls containing
Textboxes, Comboboxes, Buttons, etc. The Enabled property on the
Frames are set to False and the user can't edit any of the Textboxes
until they click a button.

When I try this in VB2005 and set the Enabled property to False,
everything in the Frame turns gray and is hard to read (relatively
speaking).

Is there any way to duplicate the functionality of the VB6 Frames?
 
C

Cor Ligthert [MVP]

Kevin,

What do you mean with a frame, I know frames in web pages, but in VBNet
there are no frames.

Please be correct in the description of your questions, we see less than, so
using own invented of in past used words means only that other people cannot
help quick.

Cor
 
H

Herfried K. Wagner [MVP]

Cor Ligthert said:
What do you mean with a frame, I know frames in web pages, but in VBNet
there are no frames.

The OP refers to the groupbox control.
 
C

Cor Ligthert [MVP]

Herfried,
The OP refers to the groupbox control.

Are you sure, it shows that it is true what I wrote, while doing that I
thought that he meant the surface (background) of the window.

Cor
 
K

Kevin

Sorry I didn't make myself clear.

I'm using a frame control in VB6. I put all the controls on the form
inside the frame control. The frame's border property is set to None
so it's invisible on the form--the user doesn't know it's there.

When the Enabled property of the frame is set to False, all of the
controls inside appear like they would if they were directly on the
form, but the user is not able to access any of them. When I set the
frame's Enabled property to True, then the user can type in the
textboxes, etc.

I'm trying to use a panel control in VB2005. When I set the panel's
Enabled property to False, all of the controls inside it appear grayed
out. Is there some other control that I can use that will allow me to
lock other controls without changing their looks?
 
C

Cor Ligthert [MVP]

Kevin,

You can use for that two (one goes as well but this is easier to describe).

On one you put all the controls on the others you put nothing
You set the dock property of both in the form load event to Full
Than you can hide (visible = false or true) everytime one of those.

(If you use one you set the controls on the surface of the window and use
the panel to hide them by showing a blank pannel, I would use two because
that makes the way you do it in my idea more clear)

I hope this helps,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top