c# - Show notification Form at NotifyIcon's position as Dropbox -


i writting application uses notifyicon in c#. want when user clicks on notifyicon on system tray (bottom-right of screen) notification form (this not mainform, it's minor form used show notification) show @ location of notifyicon dropbox do: enter image description here

i have used event mouseclick of notifyicon , wrote follows:

private void notifyicon_mouseclick(object sender, mouseeventargs e) {     form2 form = new form2();     form.setdesktoplocation(mouseposition.x - form.width/2,mouseposition.y-form.height-20);     form.show();     form.focus();  } 

but not work expected, notification form show @ location of main form not @ location of notifyicon.

can can me:|

go form2 design, select properties of form2. startposition in properties of form2, set startposition manual or can as

form2 form = new form2(); form.startposition = system.windows.forms.formstartposition.manual; form.setdesktoplocation(mouseposition.x - form.width/2,mouseposition.y-form.height-20); form.show(); form.focus(); 

hope solve issue.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -