You are here:

Visual Basic/VB- Frame -inside controls

Advertisement


Question
QUESTION: In VB, I placed a frame. Then placed 5 labels and text box inside that frame. When I move that frame to another place in the same form , it should  move as a single unit with all controls inside it. How it is possible ?

ANSWER: Dear Dr John,

Frame is a container control, especially designed to do such things - that's why it is possible.

If this is not an answer to your question, please, describe your situation using as much details as possible.

Regards,

Vitaliy

---------- FOLLOW-UP ----------

QUESTION: Dear Mr.Vitaliy,
 Thanks for the answer. But my question is the controls should move with the frame when frame is moving as a container. But in my case, only container is moving. The contents are not moving. How can I solve this problem ?

ANSWER: Dear Dr John,

In your case controls does not move because somehow they are placed on form, not on frame. That is normally happening when you first put controls on screen, then put frame on top of it.

To solve this problem open your form/screen in design time, make sure that control is fully inside frame boundaries and drug it with your mouse little bit left, then right. After this control should move with frame. Do it for every control on frame.

Regards,

Vitaliy

---------- FOLLOW-UP ----------

QUESTION: Frame should do like that. But natural case frame is not doing that. How can we rectify that ?

ie. when I moved the frame, controls inside frame is not moving with the frame. How can I solve this problem ?

Answer
Dear Dr John,

Did you do what I told you to do: did you open your form/screen in design time, make sure that control is fully inside frame boundaries and drug control with your mouse little bit left, then right? Did you do it for every control on frame?

Regards,

Vitaiy

Visual Basic

All Answers


Answers by Expert:


Ask Experts

Volunteer


VITALY

Expertise

Area of expertise is Visual Basic .NET (VS 2008 and Framework 3.5) design and development for Windows applications. You can ask me any Visual Basic questions and some questions about .NET Framework. You can also ask me how to use Component One controls in Visual Basic. Do not ask me questions about Web design and development in Visual Basic.

Experience

I'm working as VB programmer from 1997, so I have a lot of experience with Visual Basic .NET as well as Visual Basic 6. Area of expertise is Visual Basic .NET (VS 2008 and Framework 3.5) design and development for Windows applications; Component One controls for Visual Basic; User controls; Moving VB6 applications to .NET.

Education/Credentials
B.S. in Computer Science

©2016 About.com. All rights reserved.