In visual studio, I made a windows application is there any way that I can lock the window in the sense that the user cannot move it around?
3 replies to this topic
#1
Posted 16 August 2011 - 12:12 PM
|
|
|
#2
Posted 16 August 2011 - 02:07 PM
I dont think there is property to set to fix this, but you could set the form back when someone try's to move it.
Good luck ~ Committed. :)
int xPos = 50; [COLOR=#006400] // x Locked position[/COLOR]
int yPos = 50; [COLOR=#006400]// y Locked position[/COLOR]
private void Form1_Move(object sender, EventArgs e)
{
this.Location = new Point(xPos, yPos);
}
Good luck ~ Committed. :)
A man can be defined by what he does when no one is looking.
Science is only an educated theory, which we cannot disprove.
Science is only an educated theory, which we cannot disprove.
#3
Posted 16 August 2011 - 02:10 PM
In the property of the form, set the FormBorderStyle to none... but this will remove the border
A other way to do so is with the Form1_LocationChanged event
Do something like this
You didn't specify what language, this code is for c#, but the vb.net or c++ code will be very similar
A other way to do so is with the Form1_LocationChanged event
Do something like this
private void Form1_LocationChanged(object sender, EventArgs e)
{
this.Location = new Point(0, 0);
}
where 0,0 is the position of your formYou didn't specify what language, this code is for c#, but the vb.net or c++ code will be very similar
#4
Posted 17 August 2011 - 04:52 AM
Nevermind, all probems solved, thank you all for the help.
Edited by Braydon Vaughan, 17 August 2011 - 12:19 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









