Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
Generalbuilding a canned email sender Pin
frank2122-Sep-03 14:05
frank2122-Sep-03 14:05 
GeneralRe: building a canned email sender Pin
fadee22-Sep-03 20:43
fadee22-Sep-03 20:43 
GeneralObjectStreams in .NET Pin
Anonymous22-Sep-03 13:18
Anonymous22-Sep-03 13:18 
GeneralRe: ObjectStreams in .NET Pin
J. Dunlap22-Sep-03 15:38
J. Dunlap22-Sep-03 15:38 
GeneralRe: From MFC to C# Serialization Pin
J. Dunlap22-Sep-03 10:54
J. Dunlap22-Sep-03 10:54 
GeneralBinding on Tab Controls Pin
Wjousts22-Sep-03 9:35
Wjousts22-Sep-03 9:35 
GeneralRe: Binding on Tab Controls Pin
Wjousts23-Sep-03 4:24
Wjousts23-Sep-03 4:24 
GeneralValidating a windows form Pin
Wjousts22-Sep-03 7:44
Wjousts22-Sep-03 7:44 
Hi,

I have a windows form which is used to config my application settings. It contains a couple of text boxes that are supposed to contain file paths to some other applications which are used by my application. What I would like to do is when the user clicks the okay button (to accept the changes they've made to the settings) I like the form to validate both text boxes to check that they are okay (a simple test to see if the files actually exist). The problem is that I've tried using the validating event on the text boxes but that gets fired when the textbox losses focus (which I don't want), but doesn't get fired when I click the okay button (which I want to have happen). I tried using the validate event on the form itself, but that never seems to get fired. What's the right way to do this? I know I can just validate the boxes in the OnClick event of the okay button, but I'll probably be adding more controls to the form and I don't want to lump all the validation in one place when it seems to make more sense to have the controls deal with their own validation.

Cheers
Generalcall unmanaged ActiveX method from C# Pin
rishikt22-Sep-03 6:16
rishikt22-Sep-03 6:16 
GeneralAccessing datasets on form Pin
phimix22-Sep-03 6:10
phimix22-Sep-03 6:10 
GeneralRe: Accessing datasets on form Pin
Mike Osbahr22-Sep-03 7:26
Mike Osbahr22-Sep-03 7:26 
GeneralRe: Accessing datasets on form Pin
phimix22-Sep-03 19:26
phimix22-Sep-03 19:26 
GeneralMultithreaded Apps Pin
Ricardo Moncada22-Sep-03 6:04
Ricardo Moncada22-Sep-03 6:04 
GeneralRe: Multithreaded Apps Pin
scadaguy22-Sep-03 8:11
scadaguy22-Sep-03 8:11 
GeneralRe: Multithreaded Apps Pin
Ricardo Moncada22-Sep-03 10:27
Ricardo Moncada22-Sep-03 10:27 
GeneralFreeze form when it removing and reloading ctls Pin
Chris#22-Sep-03 5:57
Chris#22-Sep-03 5:57 
GeneralRe: Freeze form when it removing and reloading ctls Pin
Julian Bucknall [MSFT]22-Sep-03 7:03
Julian Bucknall [MSFT]22-Sep-03 7:03 
GeneralMS Word programming in C#. Pin
bimpy22-Sep-03 5:25
bimpy22-Sep-03 5:25 
GeneralC# switch case style Pin
Don Kackman22-Sep-03 5:24
Don Kackman22-Sep-03 5:24 
GeneralRe: C# switch case style Pin
Julian Bucknall [MSFT]22-Sep-03 7:14
Julian Bucknall [MSFT]22-Sep-03 7:14 
GeneralRe: C# switch case style Pin
Don Kackman22-Sep-03 8:39
Don Kackman22-Sep-03 8:39 
GeneralRe: C# switch case style Pin
Julian Bucknall [MSFT]22-Sep-03 10:05
Julian Bucknall [MSFT]22-Sep-03 10:05 
GeneralRe: C# switch case style Pin
Don Kackman22-Sep-03 10:18
Don Kackman22-Sep-03 10:18 
GeneralSmoothing as in MSVisio2002 Pin
Wizard_0122-Sep-03 3:54
Wizard_0122-Sep-03 3:54 
GeneralIE and .NET question Pin
yoaz22-Sep-03 2:34
yoaz22-Sep-03 2:34 

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.