Can I lock position of program?

totti

Member
Joined
Sep 22, 2005
Messages
7
Programming Experience
1-3
I want to lock the position of my program. This makes user cannot move that windows to anywhere else.

Does it has any command like vbmodal (vb 6) in vb.net?
 
Locking form's position

Ok say your form is located at the center of the screen and you want to make it stay there as long as form is opened. Means user will not be able to move the form around
VB.NET:
[size=2][color=#0000ff]Private [/color][/size][size=2][color=#0000ff]Sub[/color][/size][size=2] form1_LocationChanged([/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] sender [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Object[/color][/size][size=2], [/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] e [/size][size=2][color=#0000ff]As[/color][/size][size=2] System.EventArgs) [/size][size=2][color=#0000ff]Handles [/color][/size][size=2][color=#0000ff]MyBase[/color][/size][size=2].LocationChanged
 
[/size][color=blue][color=blue][size=2]Me.CenterToScreen() '[/size][size=2][color=#008000]or you can move it to one custom location i.e. [color=blue]Me.[/color][color=#000000]Location = [/color][size=2][color=#0000ff]New[/color][/size][size=2][color=#000000] Point(0, 0) [/color][/size][/color][/size][/color][/color]
 
[size=2][color=#0000ff]End [/color][/size][size=2][color=#0000ff]Sub[/color][/size]
[size=2][color=#0000ff]
[/color][/size]

HTH
Regards ;)
 
Back
Top