General discussion

Locked

VB6 forms

By setivi ·
My VB 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 RSV In reply to VB6 forms

Here again, what you are making the form design (height and width), you can get the same at runtime also. Give the height and width of the form as in the design time, in the form load event or form resize event. I mean, for example, at design time your form height=100 and width=100, then in the form load event or form resize event, write code as
me.height=100
me.width=100

This will display the same height and width at runtime also.

Hope this is clear. If u have any more clarifications, please feel free to write to me.

Good Luck...:)

Collapse -

VB6 forms

by setivi In reply to VB6 forms

Poster rated this answer

Collapse -

VB6 forms

by Limbo In reply to VB6 forms

Partial correct response.

Inculde in either Form_Initalise or Form_Load events

Me.Height = 100
Me.Width = 100

But it's not because you are doing anything wrong. Various window states default to standard sizes, this is deemed 'normal' behaviour for some reason, although I've never found a satisfactory explanation.

If your forms are MDI Children, then this is often the result you see, but it's nothing to worry about if you use the above implmentation.

Collapse -

VB6 forms

by setivi In reply to VB6 forms

Poster rated this answer

Collapse -

VB6 forms

by donq In reply to VB6 forms

On the specific Form you are having trouble with make sure the Form's "BorderStyle" property is set to 1-Fixed Single (allows you to create a thin border that can't be resized) or 3-Fixed Dialog. It sounds like it's set to 2-Sizable now?

Collapse -

VB6 forms

by setivi In reply to VB6 forms

Poster rated this answer

Collapse -

VB6 forms

by setivi In reply to VB6 forms

This question was closed by the author

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

Related Discussions

Related Forums