Click here to Skip to main content
15,749,279 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to move the form to the top right corner of the screen on form load..please help

Handle the FormShown event and set the Location property:
private void frmMain_Shown(object sender, EventArgs e)
    Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - Width, 0);

Sorry - didn't notice the VB...
Private Sub frmMain_Shown(sender As Object, e As EventArgs) Handles frmMain.Shown
    Location = New Point(Screen.PrimaryScreen.WorkingArea.Width - Width, 0)
    End Sub

Share this answer
harikrishnanmb 29-Aug-13 3:17am    
thank you very much friend...
OriginalGriff 29-Aug-13 3:55am    
You're welcome!
Hasan Habib Surzo 29-Aug-13 4:09am    
you are right. this is the solution
set form
1) StartPosition=Manual
2) location=(0,0)

from properties panel.
Share this answer
OriginalGriff 29-Aug-13 3:56am    
Psst! You need "R" and "L" painted on your shoes! :laugh:
Hasan Habib Surzo 29-Aug-13 4:01am    
sorry My mistake
Hasan Habib Surzo 29-Aug-13 4:07am    
sorry. I just read the job again and find where is my mistake. sorry for that.
harikrishnanmb 29-Aug-13 4:36am    

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900