Click here to Skip to main content
15,922,015 members
Home / Discussions / Windows Forms
   

Windows Forms

 
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 
Hi I have one question, in my code if pasword is incorrect, when I click Ok, I want to change label like that "your password is incorrect"

using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Drawing.Printing;
using System.Security;

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


...

public bool isModificed()
{
if (textBox1.Text==String.Empty)
{
return true;
}
else
{
return false;
}

}

}

}




using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

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

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

private void button1_Click(object sender, EventArgs e){

DialogResult = DialogResult.OK;
}




using System;
using System.Collections.Generic;
using System.Windows.Forms;





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);
if(ValidatePassword()) {
if(a) {
Application.Run(new Form1());
}

}
else
{
// MessageBox.Show("Erorr!");
<br />
here I wont my questions answer plz<br />




}


}
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;

}
}
}


thx

C# Developer

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 
GeneralRe: creating Doclet Application for windows Pin
kimozz10-Jul-08 11:35
kimozz10-Jul-08 11:35 
GeneralRe: creating Doclet Application for windows Pin
led mike10-Jul-08 11:48
led mike10-Jul-08 11:48 
GeneralRe: creating Doclet Application for windows Pin
kimozz10-Jul-08 11:57
kimozz10-Jul-08 11:57 
Questiondatatable in Dataset nullexception Pin
sam128749-Jul-08 9:19
sam128749-Jul-08 9:19 
AnswerRe: datatable in Dataset nullexception Pin
Christian Graus9-Jul-08 15:41
protectorChristian Graus9-Jul-08 15:41 
GeneralRe: datatable in Dataset nullexception Pin
sam1287410-Jul-08 6:45
sam1287410-Jul-08 6:45 
Questionhow to deploy 3-tire architecture(Windows applicaion) Pin
chiranjeevi20079-Jul-08 3:10
chiranjeevi20079-Jul-08 3:10 
AnswerRe: how to deploy 3-tire architecture(Windows applicaion) Pin
Christian Graus9-Jul-08 8:12
protectorChristian Graus9-Jul-08 8:12 

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.