Group: Forum Members
Posts: 374,
Visits: 1.2K
|
Note: I have tried the same following routine with a regular Windows application and SF Application, and the problem only occurs with SF form. Very simple to duplicate.
a) Create an SF application.
b) Stretch the form bigger than the default.
c) Set the the "WindowState" to Minimize.
d) Drop a "NotifyIcon" component and put the following code for the "Double Click" event:
if (this.WindowState == FormWindowState.Minimized)
{
this.StartPosition = FormStartPosition.CenterScreen;
this.WindowState = FormWindowState.Normal;
this.Activate();
}
When the form shows, the top left conner gets centered, rather than the form itself. Therefore, the form gets pushed to bottom right of the screen.
I did the exact thing with Windows app, and it works right. I think SF creates a collection of forms in the "Program.cs" and when it tries to paint the form, it gets messed up.
Can you advise please?
Thanks!
..ßen
|