in the form_resize event, you should be able to simple adjust the properties of the controls you want to mess with. For example, when the form gets resized (maximized) you can figure out the percentage and ratio, and use the .top, .left, .width and .height properties of any control:
command1.height = 5
command1.width = 10
command1.top = 0
command1.left = 0
For example..... let me know what you figure out.
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
You should be able to do a simple text like...
if form1.state = vbmaximized then
' /* Code For Maximized Form */
end if
However, vbmaximizedMIGHT NOT be a constant, but numbers work, I believe 2 is maximized, but I could be mistaken. Also, The property might not be state, it might be style or something similar. So, Just test the property to find out if it's maximized or not.
As for adjusting the controls, you could do a loop of the control's collection, but you are going to be using a lot of comparisions to figure out the type of control you are working with. A Textbox doesn't have a caption property, for example, so you need to be aware of the differences involved with the properties of certain objects. I believe you can do a simple:
for each XCtrl in Controls
msgbox XCtrl
next XCtrl
Then you could adjust them all with their properties in a simple for each loop. I hope this helps some.
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215