Link to home
Create AccountLog in
Avatar of Rajeshm8484
Rajeshm8484Flag for India

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?
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Hi Rajeshm8484,

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
Avatar of Rajeshm8484

ASKER

How can i get the exact position of controls where to place,when i maximize or minimize?
ASKER CERTIFIED SOLUTION
Avatar of Rajeshm8484
Rajeshm8484
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer