I have problem with C# application, if I switch from current account or let pc until account log out and then log on I found that form size change, for example Form size before log out is {Width=1024, Height=768} and after is {Width=1024, Height=690} there is no any code do something like that, also I try to reset form size at Event FormPaint but value still {Width=1024, Height=690} and doesn't apply change.
restore form size after log out
Collapse
X
-
Tags: None
-
If you want to remember the form size, when the program exits try storing the current form size in the Application settings. You can then resize the form to the last known size in the Form_Load event. -
Program still running but the size of the form change after widows stand by. This is what I mean by restore form size.Comment
-
-
Form doesn't change its size expect when windows reach to stand by or when I go to Logoff at start menu then switch user then log on to the same account .
Only these two cases change the form sizeComment
-
I cannot test switching users resizing the windows as my current configuration does not allow it. In the past however there has never been an issue of my windows being changed when I switched users.
I still suspect something is not being comminucated correctly here.Comment
-
Then, how can I solve this problem?
Form size before standby is full screen i mean that task bar doesn't appear after stand by window form just maximized not full screen task bar appear . All controls size depend on the form is full screenComment
-
You can try handling the Form.SizeChange d event to restore the window size when it changes, but it looks like the size is being changed somewhere else in your code.
You could try looking for all references to .Size, .Width, .Height in your code just to make sure that you don't change the size yourself in response to some event.Comment
-
So you are doing some sort of windows message override to have it cover up the taskbar. NO I didn't do that .there is no code override hiding Taskbar.
I just set form window state to maximized with size 800,600
I try to display message box display with form size at form Resize event
There are some thing wrong happen:
Message box shown four times before form appear with four sizes
First is: 1030,684
Seconed: 1024,786
Third: 1024,684
Fourth: 1024,786
Then i switch user and re login
And Message box display twice
First with size: 1024,780
Second: 1024,690Comment
Comment