Rajeshm8484
asked on
How to make the controls fit to Scrren?
Question:
I have developed a Simple Dialog Based Application in that dialog i have two controls(OK and cancel),when i try to maximum the dialog into full screen the controls are not fitting to the screen coordinates.The position of the controls is same as when the dialog was minimizes.How can i make to fit to screen?
I have developed a Simple Dialog Based Application in that dialog i have two controls(OK and cancel),when i try to maximum the dialog into full screen the controls are not fitting to the screen coordinates.The position of the controls is same as when the dialog was minimizes.How can i make to fit to screen?
ASKER
How can i get the exact position of controls where to place,when i maximize or minimize?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Create an OnResize() event handler for the Dialog.
Within the handler, set the desired position of the controls.
When the window maximizes or returns to normal, or when it's resized by dragging a corner/edge the handler will be executed allowing you to move the controls as appropriate.
Good Luck,
Kent