Resize Application Window : General Questions

Resize Application Window

Ask general questions here.

Resize Application Window

Postby rj-nora » Mon May 10, 2010 5:25 pm

Hello!

I'm trying to resize my Application under test doing something like this:

Ranorex.Form APPWindow = "/form[@controlname=APP]";
Ranorex.Control myControl = TaktWindow.As<Control>();
myControl.SetPropertyValue("Size", new Size(300, 200));
but it´s not working,
Ranorex tells that Control is an ambiguous reference. How can i do that?
rj-nora
 
Posts: 38
Joined: Thu Mar 11, 2010 4:56 pm

Re: Resize Application Window

Postby Support Team » Mon May 10, 2010 5:43 pm

Hi!

Use "Ranorex.Control" instead of "Control" if you have a "using System.Windows.Forms" in your code file.

BTW we have a blog about resizing windows. Please take a look on following link
http://www.ranorex.com/blog/resize-window

Regards,
Peter
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Resize Application Window

Postby rj-nora » Mon May 10, 2010 6:16 pm

Thanks but nothing is happening when Ranorex play the test.. the application Window still maximized.

Thank you
rj-nora
 
Posts: 38
Joined: Thu Mar 11, 2010 4:56 pm

Re: Resize Application Window

Postby Ciege » Mon May 10, 2010 6:35 pm

I am curious if the issue is you cannot change the size of a maximized window. Maybe you need to restore the window before you can change the size.
Try doing a form.restore then applying your window size change.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...
User avatar
Ciege
 
Posts: 965
Joined: Thu Oct 16, 2008 7:46 pm
Location: Arizona, USA

Re: Resize Application Window

Postby rj-nora » Mon May 10, 2010 7:02 pm

Ciege wrote:I am curious if the issue is you cannot change the size of a maximized window. Maybe you need to restore the window before you can change the size.
Try doing a form.restore then applying your window size change.



Thanks one mor time Ciege problem solve!!
rj-nora
 
Posts: 38
Joined: Thu Mar 11, 2010 4:56 pm


Return to General Questions

Who is online

Users browsing this forum: No registered users and 0 guests