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

increase the form size

P: 22
hi one and all
i have so many controls on a form,but the form has a limited size,how to increase the size of a form more than a window size by using scroll bars ,to place all the controls in single form, is there any way,
Apr 2 '07 #1
Share this Question
Share on Google+
5 Replies


vijaydiwakar
100+
P: 579
hi one and all
i have so many controls on a form,but the form has a limited size,how to increase the size of a form more than a window size by using scroll bars ,to place all the controls in single form, is there any way,
its not a good practise to have lot of ctrls spread all over the form
for that
Categorise all ctrl wrt their functionality and use tab stip ctrls
Apr 2 '07 #2

Expert 5K+
P: 8,434
hi one and all
i have so many controls on a form,but the form has a limited size,how to increase the size of a form more than a window size by using scroll bars ,to place all the controls in single form, is there any way,
You could put the controls in a picture box. You should be able to make the picture box bigger than the form, and move it around by use of scrollbars.

Of course, as vijaydiwakar pointed out, you need to consider whether you may simply have too many controls on your form, and need to try and simplify your UI.
Apr 2 '07 #3

devonknows
100+
P: 137
You could put the controls in a picture box. You should be able to make the picture box bigger than the form, and move it around by use of scrollbars.

Of course, as vijaydiwakar pointed out, you need to consider whether you may simply have too many controls on your form, and need to try and simplify your UI.
I usually find using the Menu Editor (CTRL+E) to create yourself some menu's to access certain parts of your form, or create some label menus with a mouseover or something snazzy. But if you do take the Picture box remember to set in your forms resize sub

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Resize()
  2. On Error Resume Next
  3.     if WindowState = 1 then Exit Sub 'Check For Minimization
  4.     Picture1.Move 0, 0, Width, Height
  5. End Sub
  6.  
Will keep your picture box to the edges of your form you may want to do the same for your scrollbars and such, but advice is with the others, i would reduce the amount of controls, and use things like InputBox if needbe to get certain data, save your settings to an INI file of some sort. and have other forms that can be called from a menu. Just use something like

Expand|Select|Wrap|Line Numbers
  1. frmSettings.Show vbModal, Me   '(this will keep frmSettings on top of the window and deny use of the other one till it is closed)
Kind Regards
Devon.
Apr 2 '07 #4

vijaydiwakar
100+
P: 579
I usually find using the Menu Editor (CTRL+E) to create yourself some menu's to access certain parts of your form, or create some label menus with a mouseover or something snazzy. But if you do take the Picture box remember to set in your forms resize sub

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Resize()
  2. On Error Resume Next
  3.     if WindowState = 1 then Exit Sub 'Check For Minimization
  4.     Picture1.Move 0, 0, Width, Height
  5. End Sub
  6.  
Will keep your picture box to the edges of your form you may want to do the same for your scrollbars and such, but advice is with the others, i would reduce the amount of controls, and use things like InputBox if needbe to get certain data, save your settings to an INI file of some sort. and have other forms that can be called from a menu. Just use something like

Expand|Select|Wrap|Line Numbers
  1. frmSettings.Show vbModal, Me   '(this will keep frmSettings on top of the window and deny use of the other one till it is closed)
Kind Regards
Devon.
ya this can be done with the given code also
but some times its also required to show infomatory and input ctrls on the same form
i wuld liek to give on e ex. of my own form. In that form nearlly all fields are manual and the no o f ctrls were 315.........
U may think its not possible but trust me it was the case.....
where i can't use another form.......
in such case use tab stip ctrls, grid, pic box etc........
Regards
Apr 2 '07 #5

Expert 5K+
P: 8,434
ya this can be done with the given code also
but some times its also required to show infomatory and input ctrls on the same form
i wuld liek to give on e ex. of my own form. In that form nearlly all fields are manual and the no o f ctrls were 315.........
U may think its not possible but trust me it was the case.....
where i can't use another form.......
in such case use tab stip ctrls, grid, pic box etc........
Yes, the tab strip especially, may be well worth considering. It allows you to logically group your controls, without having to put them on a separate form.
Apr 2 '07 #6

Post your reply

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