I created a new Desktop application.
I added the following line of code to the window1 open event…
Window1.Height = Window1.Height * .5
Everything works as expected. The window is 200, half it’s default height of 400
I cut this line of code and pasted it into the Resized event. And it doesn’t work correctly.
After I resize the window, the window always has 0 height.
But if I change the code in the resized event to…
Window1.Height = 200
It works correctly. The height will always be 200.
Anyone know why?
I even tried this…
Var X As Integer = Window1.Height * .5
Window1.Height = X
Height still always zero.
But If I use this code…
Var X As Integer = 200
Window1.Height = X
It works correctly and is always 200.
6 posts - 4 participants