Discussion Locked

VB6 forms

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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?

7 replies

by rsv

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...:)

by limbo

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.

by donq

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?

This discussion is closed to new replies.