HI all again here with some problem. I m making a project in which i made a form MDI container and on running the application login screen opens within the Main form(MDi).
I want that until user logins he should not b able to access main form or its options.
i have tried
main.Enabed = false

First Dont make the Login form as MDI Child.

When Showing Login Form Use ShowDialog () Instead of Show() to Show the Form Modally and Set Owner is MDI

Ex

LoginForm.ShowDialog(MDIMainForm);

Sorry for providing insufficient information. My purpose was that nobody should be able to move the form from its location to other location in the application.
Wt should i do for that

On Form Properties, Set FormBorderStyle = None.
It will make your form haven't border and not able to move.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.