Hi.
I have added some Tools to our Forms Captions to let the user move the open forms to right or left in their Desktop.
It works fine as long as the Form is not in a Maximized WindowState when they click the tools, as it looks like setting Location when changing the WindowState programmatically has no effect on moving the Form to the new Location.
I have attached a sample.
Steps to reproduce:
1 – Click on button to “Open Window”.
2 – Click on the Caption Tool Icon, either to move left or right.
3 – The window goes to the Normal WindowState, but Location has no effect.
4 – Try again and click either tool buttons in the Caption.
5 – Now it works.
Please, let me know if you guys can think of a workaround.
Thanks.
Ivan
(Wisej 2.2.51.0 – VS 2019 – C#)
Fantastic!
Version 2.2.52.0 added an Enhancement which made this work perfectly.
THANK YOU.
Hi guys.
I’ve found a dirty way of making this work.
I added a Timer to the code in case the Window is Maximized and set its Interval to 200 milliseconds to be triggered after the Window was put into Normal WindowState, and in the Timer Tick I changed its Size and Location.
I tried to use an Application.StartTask with a Sleep in it, but didn’t work.
If anyone thinks of a more elegant way of doing this, please let me know. 🙂
Find new Sample attached.
Cheers.
Ivan
Please login first to submit.