Click here to Skip to main content
15,893,508 members
Home / Discussions / Windows Forms
   

Windows Forms

 
AnswerRe: Resize problem with Listbox Pin
emailthiaga24-Jul-08 0:05
emailthiaga24-Jul-08 0:05 
AnswerRe: Resize problem with Listbox Pin
darkelv15-Jul-08 23:09
darkelv15-Jul-08 23:09 
AnswerCross Post Pin
Thomas Stockwell16-Jul-08 5:10
professionalThomas Stockwell16-Jul-08 5:10 
QuestionSkins.. Pin
Slick6914-Jul-08 0:06
Slick6914-Jul-08 0:06 
AnswerRe: Skins.. Pin
Thomas Stockwell15-Jul-08 8:46
professionalThomas Stockwell15-Jul-08 8:46 
QuestionA CheckBox with a LinkLabel Pin
Domenic Denicola13-Jul-08 12:27
Domenic Denicola13-Jul-08 12:27 
QuestionRead the URL of the Browser Pin
M_Menon13-Jul-08 5:00
M_Menon13-Jul-08 5:00 
Questionpassword change Pin
Sider8912-Jul-08 5:43
Sider8912-Jul-08 5:43 
Well I want I have password in my Form but I want to change it and how? what will you advice me


namespace WestNotePad
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void changePasswordToolStripMenuItem_Click(object sender, EventArgs e)
{
PasswordChange ps = new PasswordChange();
ps.ShowDialog();

}

}
}



namespace WestNotePad {
public partial class frnPassword : Form {
public frnPassword() {
InitializeComponent();
}

private void button2_Click(object sender, EventArgs e) {
DialogResult = DialogResult.Cancel;

}

private void txtPassword_TextChanged(object sender, EventArgs e) {

}

private void button1_Click(object sender, EventArgs e) {

DialogResult = DialogResult.OK;
}



}
}








namespace WestNotePad
{
public partial class PasswordChange : Form
{
public PasswordChange()
{
InitializeComponent();
}

private void ChnButton1_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
}


}
}










namespace WestNotePad
{
static class Program
{
public static bool a = true;


///
/// The main entry point for the application.
///

[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
int n = 0;

m:
if (ValidatePassword())
{
if (a)
{
Application.Run(new Form1());
}

}
else
{

n++;
while (n<4)
{
MessageBox.Show("Erorr");

goto m;
}

}



}


private static bool ValidatePassword()
{
if (string.IsNullOrEmpty(Settings1.Default.Password))
{
return true;
}



frnPassword f2 = new frnPassword();


if (f2.ShowDialog() == DialogResult.OK)
{

return f2.txtPassword.Text== Settings1.Default.Password;
}
else
{
a = false;

}
return true;
}


}

}


Settings1.cs


Password | string | User | ABCD

C# Developer

QuestionPrinterSettings/DefaultPageSettings incredibly slow on a machine Pin
nxtwothou11-Jul-08 5:31
nxtwothou11-Jul-08 5:31 
AnswerRe: PrinterSettings/DefaultPageSettings incredibly slow on a machine Pin
Luc Pattyn11-Jul-08 6:19
sitebuilderLuc Pattyn11-Jul-08 6:19 
GeneralRe: PrinterSettings/DefaultPageSettings incredibly slow on a machine Pin
nxtwothou14-Jul-08 3:18
nxtwothou14-Jul-08 3:18 
QuestionWindows Media Encoder get installed Automatically, when i instal mu project set up. Pin
balaji_vbr10-Jul-08 21:20
balaji_vbr10-Jul-08 21:20 
GeneralSkip readonly columns in DataGridView Pin
WILLIAM MAIN10-Jul-08 11:43
WILLIAM MAIN10-Jul-08 11:43 
GeneralRe: Skip readonly columns in DataGridView Pin
Kschuler11-Jul-08 6:38
Kschuler11-Jul-08 6:38 
QuestionChild list for field RelLicData cannot be created. Pin
sam1287410-Jul-08 9:18
sam1287410-Jul-08 9:18 
QuestionPassword&Label in Windows application Pin
Sider8910-Jul-08 8:28
Sider8910-Jul-08 8:28 
AnswerRe: Password&Label in Windows application Pin
Ashfield10-Jul-08 9:33
Ashfield10-Jul-08 9:33 
GeneralRe: Password&Label in Windows application Pin
Sider8910-Jul-08 20:35
Sider8910-Jul-08 20:35 
GeneralRe: Password&Label in Windows application Pin
Ashfield10-Jul-08 21:05
Ashfield10-Jul-08 21:05 
GeneralRe: Password&Label in Windows application Pin
Sider8910-Jul-08 21:42
Sider8910-Jul-08 21:42 
GeneralRe: Password&Label in Windows application Pin
Ashfield11-Jul-08 1:14
Ashfield11-Jul-08 1:14 
Questioncreating Docklet Application for windows [modified] Pin
kimozz9-Jul-08 13:02
kimozz9-Jul-08 13:02 
AnswerRe: creating Doclet Application for windows Pin
led mike10-Jul-08 4:52
led mike10-Jul-08 4:52 
GeneralRe: creating Doclet Application for windows Pin
kimozz10-Jul-08 10:52
kimozz10-Jul-08 10:52 
GeneralRe: creating Doclet Application for windows Pin
led mike10-Jul-08 11:31
led mike10-Jul-08 11:31 

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.