Click here to Skip to main content
15,867,568 members
Home / Discussions / C#
   

C#

 
GeneralRe: Console-Like Text Output Control Or.... Pin
Alex Korchemniy16-Oct-04 8:50
Alex Korchemniy16-Oct-04 8:50 
GeneralRe: Console-Like Text Output Control Or.... Pin
Alex Korchemniy16-Oct-04 8:52
Alex Korchemniy16-Oct-04 8:52 
GeneralGDI+ - line chart Pin
xiaowenjie16-Oct-04 4:56
xiaowenjie16-Oct-04 4:56 
GeneralRe: GDI+ - line chart Pin
Kiran Satish16-Oct-04 6:11
Kiran Satish16-Oct-04 6:11 
GeneralRe: GDI+ - line chart Pin
xiaowenjie16-Oct-04 9:40
xiaowenjie16-Oct-04 9:40 
GeneralRe: GDI+ - line chart Pin
Kiran Satish16-Oct-04 18:21
Kiran Satish16-Oct-04 18:21 
GeneralRe: GDI+ - line chart Pin
Alex Korchemniy16-Oct-04 9:22
Alex Korchemniy16-Oct-04 9:22 
QuestionHow can i close my Form Pin
Zapss16-Oct-04 1:31
Zapss16-Oct-04 1:31 
Hello,
Iam new to c#
My Problem is something like this.

Create a sample windows application, having 2 textboxes & a command
button

Set the forms controlbox property to True

Write validation event for the textbox

private void txtpassword_Validating(object sender,System.ComponentModel.CancelEventArgs e)
if (txtempno.Text=="")
{
MessageBox.Show("Please Enter User Id and password","Invalid Data",MessageBoxButtons.OKCancel);
e.Cancel = true;
}

while running the application when the user clicks the button1
even button1 causes validation set false

the focus is still in of the textbox,
the validation event of the textbox still fire.

Same is the case when the user clicks the [X] button on the control box.

i.e validation event is fired and form is not closed

Form Causesvalidation property aslo set flase.

if i write the code in the Form1_closing event then also the problem is not being solved.

This is because the validation event of the textboxes is fired first so the execution never reaches the Form1_closing event.

How can i close my Form when user user click [X] button on the control box.
or button1??????????????????Eek! | :eek:
AnswerRe: How can i close my Form Pin
sreejith ss nair16-Oct-04 4:45
sreejith ss nair16-Oct-04 4:45 
GeneralRe: How can i close my Form Pin
Zapss16-Oct-04 20:40
Zapss16-Oct-04 20:40 
GeneralSubclass control over main class Pin
Nekosan16-Oct-04 1:00
Nekosan16-Oct-04 1:00 
GeneralRe: Subclass control over main class Pin
J4amieC16-Oct-04 2:36
J4amieC16-Oct-04 2:36 
GeneralRe: Subclass control over main class Pin
Nekosan16-Oct-04 2:47
Nekosan16-Oct-04 2:47 
GeneralRe: Subclass control over main class Pin
Alex Korchemniy16-Oct-04 9:40
Alex Korchemniy16-Oct-04 9:40 
GeneralRe: Subclass control over main class Pin
Nekosan16-Oct-04 10:01
Nekosan16-Oct-04 10:01 
GeneralRe: Subclass control over main class Pin
Alex Korchemniy16-Oct-04 10:25
Alex Korchemniy16-Oct-04 10:25 
QuestionHow to draw a custom graph/2D plot? Pin
Kiran Satish15-Oct-04 19:24
Kiran Satish15-Oct-04 19:24 
AnswerRe: How to draw a custom graph/2D plot? Pin
Alex Korchemniy16-Oct-04 8:42
Alex Korchemniy16-Oct-04 8:42 
GeneralRe: How to draw a custom graph/2D plot? Pin
Kiran Satish16-Oct-04 18:23
Kiran Satish16-Oct-04 18:23 
GeneralResource Globalization Pin
codes/w15-Oct-04 19:07
codes/w15-Oct-04 19:07 
GeneralRe: Resource Globalization Pin
Alex Korchemniy16-Oct-04 10:00
Alex Korchemniy16-Oct-04 10:00 
QuestionHow to use the play list function of the Pin
skywen15-Oct-04 17:47
skywen15-Oct-04 17:47 
GeneralDatabase access error Pin
StephenMcAllister15-Oct-04 16:11
StephenMcAllister15-Oct-04 16:11 
GeneralRe: Database access error Pin
Carl Mercier15-Oct-04 17:14
Carl Mercier15-Oct-04 17:14 
GeneralRe: Database access error Pin
Alex Korchemniy16-Oct-04 10:13
Alex Korchemniy16-Oct-04 10:13 

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.