General discussion

Locked

VB6 forms

By setivi ·
My VB6 forms when compiled and run behave abnormally; the sizes of the forms displayed are different from those at the design phase. I want to see exactly what I designed at the design phase at the runtime.
What am I doing wrong?

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

VB6 forms

by Lo In reply to VB6 forms

In the Form Load event add settings for the form properties for:
HEIGHT - Height of the form (top to bottem)
WIDTH - Width of form (left to right)
TOP - Screen pos of Top Left corner
LEFT - Screen pos of left side of Screen

If these aren't set, positin and size are calculated and set by standard algorithms.

There is a way to make the window dynamic relative to the screen size. A given setting for the above will display a different size and position on a 640x480, 800x600, 1024x768, etc. resolution monitor. I thik you can get the current monitor settings at run-time but I don't know how/where.

Collapse -

VB6 forms

by setivi In reply to VB6 forms

The question was auto-closed by TechRepublic

Collapse -

VB6 forms

by RSV In reply to VB6 forms

HI,
You try to set the forms size and the position in the form load event or form resize event, so that whenever the form is loaded or resized, the size and position of form will be maintained as you required.

In the form load or resize event, specify the left, top, width, height properties of the form. For example ,

me.top=0 'setting the form at top of screen
me.left=0 'setting the left of the screen
me.width=screen.width 'setting the width of the form as the width of the screen.me.height=screen.heigth 'setting the height of the form as the height of the screen.

Hope this helps you.
GOOD LUCH...:)

Collapse -

VB6 forms

by setivi In reply to VB6 forms

The question was auto-closed by TechRepublic

Collapse -

VB6 forms

by donq In reply to VB6 forms

double click on the form in Design View to open it's Propertie's window. Set the "BorderStyle" property to "1 - Fixed Single", or "3 - Fixed Dialog".

What you design is what you get after that unless you enter some modifyer in Width, Left, Top,or Height.

Collapse -

VB6 forms

by setivi In reply to VB6 forms

The question was auto-closed by TechRepublic

Collapse -

VB6 forms

by setivi In reply to VB6 forms

This question was auto closed due to inactivity

Back to Web Development Forum
7 total posts (Page 1 of 1)  

Related Discussions

Software Forums