Click here to Skip to main content
15,922,630 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to clear memory? Pin
Christian Graus19-Dec-07 23:21
protectorChristian Graus19-Dec-07 23:21 
GeneralRe: How to clear memory? Pin
Seraph_summer20-Dec-07 4:53
Seraph_summer20-Dec-07 4:53 
Generalrectangle over disabled toolstrip menuitems Pin
praveen pandey19-Dec-07 22:17
praveen pandey19-Dec-07 22:17 
QuestionC#:Problem in MenuStrip Hiding in MDIParent. Help Me! Pin
kssknov19-Dec-07 22:08
kssknov19-Dec-07 22:08 
GeneralRe: C#:Problem in MenuStrip Hiding in MDIParent. Help Me! Pin
CKnig19-Dec-07 23:05
CKnig19-Dec-07 23:05 
GeneralRe: C#:Problem in MenuStrip Hiding in MDIParent. Help Me! Pin
kssknov19-Dec-07 23:50
kssknov19-Dec-07 23:50 
GeneralRe: C#:Problem in MenuStrip Hiding in MDIParent. Help Me! Pin
CKnig20-Dec-07 0:33
CKnig20-Dec-07 0:33 
GeneralRe: C#:Problem in MenuStrip Hiding in MDIParent. Help Me! Pin
kaluk19-Dec-07 23:10
kaluk19-Dec-07 23:10 
Just a piece of suggestion...

Why don't you use a dialog box for your login? In that way your main form/MDI Parent form is hidden and it will only be visible not until the user gives the correct username/password..

Maybe you might want to consider this for your login: Roll eyes | :rolleyes:
**Create two forms, one is the Login Form, and the other is the Main Form.
LOGIN FORM:
1. Add a textbox control (say txtPassword) and button controls (OK & Cancel), set the form's FormBorderStyle to FixedDialog & set the ControlBox to false (this is one way on how you create your own custom dialog box Smile | :) )
2. on the OnClick event of the OK button, do your validation...
i.e.
********
private void button1_Click(object sender, EventArgs e)
{
if (txtPassword.Text == "whatever your condition is...")
{
this.Close();
//once the user inputs the correct username/password, just close
//the Login Form..
}
}
********
then this is just what you need to code in the MAIN FORM..
********
private void MainForm_Load(object sender, EventArgs e)
{
LoginForm log = new LoginForm();
log.ShowDialog();
}
*********

With this kind of program, you are more assured that your Main form will be displayed only if the user will input the correct username and password.

Hope this helps. Smile | :)
GeneralSearching for values in an rtf file and comparing them to values held in another array Pin
Spacedmc19-Dec-07 20:51
Spacedmc19-Dec-07 20:51 
GeneralRe: Searching for values in an rtf file and comparing them to values held in another array Pin
Paul Conrad24-Dec-07 19:39
professionalPaul Conrad24-Dec-07 19:39 
GeneralPrinting Pin
Shaahinm19-Dec-07 20:29
Shaahinm19-Dec-07 20:29 
GeneralRe: Printing Pin
Paul Conrad24-Dec-07 19:39
professionalPaul Conrad24-Dec-07 19:39 
QuestionConfused Between Two Codes ....Help Pin
sindhutiwari19-Dec-07 20:21
sindhutiwari19-Dec-07 20:21 
GeneralRe: Confused Between Two Codes ....Help Pin
N a v a n e e t h19-Dec-07 20:40
N a v a n e e t h19-Dec-07 20:40 
GeneralRe: Confused Between Two Codes ....Help Pin
Pete O'Hanlon19-Dec-07 22:57
mvePete O'Hanlon19-Dec-07 22:57 
GeneralRe: Confused Between Two Codes ....Help Pin
Christian Graus19-Dec-07 23:24
protectorChristian Graus19-Dec-07 23:24 
GeneralRe: Confused Between Two Codes ....Help Pin
Pete O'Hanlon20-Dec-07 0:38
mvePete O'Hanlon20-Dec-07 0:38 
GeneralRe: Confused Between Two Codes ....Help Pin
N a v a n e e t h20-Dec-07 0:07
N a v a n e e t h20-Dec-07 0:07 
GeneralRe: Confused Between Two Codes ....Help Pin
Colin Angus Mackay20-Dec-07 0:32
Colin Angus Mackay20-Dec-07 0:32 
GeneralRe: Confused Between Two Codes ....Help Pin
Pete O'Hanlon20-Dec-07 0:42
mvePete O'Hanlon20-Dec-07 0:42 
GeneralRe: Confused Between Two Codes ....Help Pin
Christian Graus19-Dec-07 21:45
protectorChristian Graus19-Dec-07 21:45 
GeneralRe: Confused Between Two Codes ....Help Pin
Anthony Mushrow19-Dec-07 23:54
professionalAnthony Mushrow19-Dec-07 23:54 
GeneralRe: Confused Between Two Codes ....Help Pin
sindhutiwari20-Dec-07 2:46
sindhutiwari20-Dec-07 2:46 
GeneralRe: Confused Between Two Codes ....Help Pin
Anthony Mushrow20-Dec-07 2:50
professionalAnthony Mushrow20-Dec-07 2:50 
GeneralWithout Framwork can run .net applications Pin
jason_mf19-Dec-07 20:10
jason_mf19-Dec-07 20:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.