Hiya
On the Form class there is a method Resize
How to know if a Form is resizeable, so that Resize should work?
Thanks
How to know a Form is resizeable
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: How to know a Form is resizeable
Hi,
Sorry but there is no such property or method to check if the window is resizeable, but you can try following method:
Regards,
Peter
Ranorex Support team
Sorry but there is no such property or method to check if the window is resizeable, but you can try following method:
private static bool CheckIfResizeable(int x, int y, Ranorex.Form form) { form.Resize(x,y); if(form.ScreenRectangle.Size == new Size(x,y)) { Report.Log(ReportLevel.Info,"Resizeable","True"); return true; } else { Report.Log(ReportLevel.Info,"Resizeable","False"); return false; } }But this method depends on the technology of your application.
Regards,
Peter
Ranorex Support team
Re: How to know a Form is resizeable
ok thanks, the Resize method doesnt throw any exception if it cant resize?
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: How to know a Form is resizeable
Hi,
Resize throws an exception if the invoking actions fail, but doesn't check if the resize was successfully done.
Regards,
Peter
Ranorex Team
Resize throws an exception if the invoking actions fail, but doesn't check if the resize was successfully done.
Regards,
Peter
Ranorex Team