By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,776 Members | 1,302 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,776 IT Pros & Developers. It's quick & easy.

The Resize Function

P: 27
What is The Form_Resize Function All About! I am just new to this and want to know exactly where this can be used!

Pls Explain me!
Apr 26 '07 #1
Share this Question
Share on Google+
4 Replies


P: 4
In short, its the sub that fires when you resize the form

You could stretch controls or reposition them depending on the real time resize values, or you could move a row of buttons next to another row if there was two rows, goverened ofcourse only if the form has been streched enough
Apr 26 '07 #2

Expert 5K+
P: 8,434
What is The Form_Resize Function All About! I am just new to this and want to know exactly where this can be used!
Yes, this is a fairly basic (sorry) concept in VB. It's an event-driven language. So rather than the traditional method of programming which more or less runs from start to finish, you write pieces of code to be executed when particular events happen. For instance, user clicks a button. Or the form (window) is resized, which is your example.

One way to get a better feel for how it works would be to put some code in there to display the form position and size each time it is run. Then try changing the size of your form, and see what happens.
Apr 26 '07 #3

P: 27
Well i wanna all the forms of my project to be maximized at runtime and when, though i have been able to do this with the code below

Expand|Select|Wrap|Line Numbers
  1. Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
  2.     Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
  3.     Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
  4.     Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
i found that the form is maximized but the form can be dragged with the mouse,
so what i wanna is to disable the option of dragging this form and make it
vbmodal,

how can i do this, Suggestions please!
Apr 27 '07 #4

Expert 5K+
P: 8,434
If you want the form maximised, just maximise it. In VB6, you do that by setting the .WindowState property. Not sure how in VB.Net, though.
Apr 27 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.