adamkushner
asked on
Move Controls on User Control when it, and its containing form are resized to maintain correct positioning on the form.
Basically I have a form and a user control. I bought ResizeKit hoping it would take care of all the resizing I need. . .but.
On the user control I have a textbox, three command buttons and a listview. I have the usercontrol resizing proportionatly to the form. Resizekit seems to only resize everything into crayon draw blurb where I just want the list view to grow proportionatly to the size of the screen, and the other controls(two command buttons below the list box) to move to where they should be relative to where they started.
I have been search for a while for the code I would need to do this with no luck. I don't need to resize anything but the listview, I just want to move everything else.
How do I do this?
On the user control I have a textbox, three command buttons and a listview. I have the usercontrol resizing proportionatly to the form. Resizekit seems to only resize everything into crayon draw blurb where I just want the list view to grow proportionatly to the size of the screen, and the other controls(two command buttons below the list box) to move to where they should be relative to where they started.
I have been search for a while for the code I would need to do this with no luck. I don't need to resize anything but the listview, I just want to move everything else.
How do I do this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
UserControl.ScaleMode = vbPixels
The only reason I did that is force of habit as the windows API uses Pixels as its logical measurement. I hope I habve not confused you as you did not need that line in this example.
The only reason I did that is force of habit as the windows API uses Pixels as its logical measurement. I hope I habve not confused you as you did not need that line in this example.
ASKER
No problem.
Thanks for the code, it was just the example I needed for my app.
Thanks for the code, it was just the example I needed for my app.
ASKER
What exactly does this do? I'm using a usercontrol so .ScaleMode is not availible.