maxpic55 Posted July 12, 2003 Posted July 12, 2003 Hello, How can I do to stop a Form with Visual Basic .NET? Bye Maxpic55 Quote
*Experts* Volte Posted July 12, 2003 *Experts* Posted July 12, 2003 What do you mean by "stop"; you can close a form by calling this line from within it:Me.Close()Or, if you have the form instance of the form you wish to close stored in a variable:frm.Close() 'replace frm with the form instance variable Note that you cannot simply sayForm2.Close()because Form2 is the form's class, and all forms are instances of that class. You can't call non-static methods on a class (which Close is not) itself, only instances of that class. This is valid: Dim frm As New Form1() 'creates an [i]instance[/i] of the form frm.Close() 'show the instance of the form This is not: Form1.Close() 'attempts to show the actual form class, rather than an instance Quote
maxpic55 Posted July 12, 2003 Author Posted July 12, 2003 Hi VolteFace, Sorry.... I want that a user can't move the form on the screen with the mouse. I hope that you can understend my bad English. By Quote
ballisticnylon Posted July 13, 2003 Posted July 13, 2003 I would just set the FormBorderStyle of the Form to None. Quote "It may be roundly asserted that human ingenuity cannot concoct a cipher which human ingenuity cannot resolve." - Edgar Allan Poe, 1841 I long to accomplish great and noble tasks, but it is my chief duty to accomplish humble tasks as though they were great and noble. The world is moved along, not only by the mighty shoves of its heroes, but also by the aggregate of the tiny pushes of each honest worker. - Helen Keller
*Experts* Volte Posted July 13, 2003 *Experts* Posted July 13, 2003 Oops, sorry, I missed the title of this thread. That would have cleared it up for me. :) Glad you got your answer anyway. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.