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?
Resize Application Window
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Resize Application Window
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
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
Re: Resize Application Window
Thanks but nothing is happening when Ranorex play the test.. the application Window still maximized.
Thank you
Thank you
Re: Resize Application Window
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.
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...
Ciege...
Re: Resize Application Window
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!!