Minimizing a form ?

Class library usage, coding and language questions.
vonBrabant
Posts: 15
Joined: Wed May 23, 2007 11:12 pm

Minimizing a form ?

Post by vonBrabant » Fri May 16, 2008 10:26 pm

Hi everybody,

what is the best way to minimize a form (top level window) ?
FormActivate() restores a minimized form, but there seems to be no FormMinimize() !?

Thanx

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Mon May 19, 2008 1:51 pm

You are right, there are no explicit functions to maximize/minimize a form. You can, however, send keystrokes that do the same using the ControlSendKeys method. Use the following string for the keys parameter ('%' means holding the Alt-key):
"%{SPACE}x" to Maximize
"%{SPACE}n" to Minimize
"%{SPACE}r" to Restore a form.

Regards,
Alex
Ranorex Support Team

vonBrabant
Posts: 15
Joined: Wed May 23, 2007 11:12 pm

Post by vonBrabant » Mon May 19, 2008 3:26 pm

Okay, thanks.
I also found a way using element functions, but this is much easier.

vonBrabant