Window size: Registry entries beat RunApplication setting

Class library usage, coding and language questions.
AshTon
Posts: 1
Joined: Wed Jan 29, 2014 3:17 pm

Window size: Registry entries beat RunApplication setting

Post by AshTon » Wed Aug 27, 2014 4:55 pm

Hi,
I have a problem using the RunApplication method. I'd like to start my AUT maximized and for this purpose I set 'bool maximized' to 'true'. Everything works fine as long as the application was most recently closed in maximized state. If this is not the case, the AUT first gets started maximized, but then is set to the main window sizes which are stored in the registry under "CurrentUser\Software\CompanyName\ProductName\ProductVersion\Windows".

This problem only occurs within Ranorex (5.0.3). When I e.g. use a script to start the application maximized via COM, everything works fine - no matter what window state was given before. Does anyone have a clue what could solve this?

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

Re: Window size: Registry entries beat RunApplication setting

Post by Support Team » Fri Aug 29, 2014 12:59 pm

Hi AshTon,

Unfortunately, we are currently not able to reproduce this issue. May I ask if it’s possible for you to provide a demo application which illustrates the issue? If yes, please send an email to: [email protected]

Thank you in advance.

Regards,
Robert
.
Image

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

Re: Window size: Registry entries beat RunApplication setting

Post by Support Team » Thu Sep 04, 2014 2:45 pm

Hello,

In order to overcome the issue, you could use following workaround:
Host.Local.RunApplication();

Delay.Seconds(5);

Form form= "/form[@controlname='ControlName']";
form.Maximize();
Regards,
Robert
.
Image