Click here to Skip to main content
15,908,264 members
Home / Discussions / C#
   

C#

 
AnswerHow to use user-defined-type input and output parameters in Oracle Function using ODP.NET Pin
AnilJayanti18-Feb-09 22:09
AnilJayanti18-Feb-09 22:09 
QuestionHow to override Button Click EventArgs or use another ways to achieve it? Pin
mctramp16817-Feb-09 21:10
mctramp16817-Feb-09 21:10 
AnswerRe: How to override Button Click EventArgs or use another ways to achieve it? Pin
dan!sh 17-Feb-09 21:33
professional dan!sh 17-Feb-09 21:33 
GeneralRe: How to override Button Click EventArgs or use another ways to achieve it? Pin
mctramp16817-Feb-09 22:40
mctramp16817-Feb-09 22:40 
GeneralRe: How to override Button Click EventArgs or use another ways to achieve it? Pin
Guffa17-Feb-09 23:19
Guffa17-Feb-09 23:19 
GeneralRe: How to override Button Click EventArgs or use another ways to achieve it? Pin
dan!sh 18-Feb-09 2:10
professional dan!sh 18-Feb-09 2:10 
GeneralRe: How to override Button Click EventArgs or use another ways to achieve it? Pin
mctramp16818-Feb-09 14:02
mctramp16818-Feb-09 14:02 
AnswerRe: How to override Button Click EventArgs or use another ways to achieve it? Pin
Luc Pattyn18-Feb-09 2:54
sitebuilderLuc Pattyn18-Feb-09 2:54 
Hi,

if you want to make a button do nothing, then disable it by setting its Enabled property false; that will alter its appearance so the user knows, and it will prevent some events from firing.

if you want a button to do alternate things, then I suggest you change its Text property so the user knows what to expect; your clicked handler can check the Text to see what needs to be done (beware internationization though).

if you don't want the appearance changed (I strongly object to invisible GUI changes mind you) you can use a flag somewhere and test it in the handler; one easy place to store such a flag would be in the Tag property: each Control has a Tag property (type is Object) that is available for any purpose you choose. I have never done that for disabling buttons, and I never will!

Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles]

- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


modified on Sunday, June 12, 2011 8:16 AM

AnswerRe: How to override Button Click EventArgs or use another ways to achieve it? [modified] Pin
DaveyM6918-Feb-09 0:45
professionalDaveyM6918-Feb-09 0:45 
GeneralRe: How to override Button Click EventArgs or use another ways to achieve it? Pin
mctramp16818-Feb-09 15:00
mctramp16818-Feb-09 15:00 
Question.exe file creation Pin
aratireddy17-Feb-09 20:20
aratireddy17-Feb-09 20:20 
AnswerRe: .exe file creation Pin
N a v a n e e t h17-Feb-09 20:34
N a v a n e e t h17-Feb-09 20:34 
AnswerRe: .exe file creation Pin
Vimalsoft(Pty) Ltd17-Feb-09 21:46
professionalVimalsoft(Pty) Ltd17-Feb-09 21:46 
QuestionSQL Server, client-server connection Pin
MozhdehQeraati17-Feb-09 20:16
MozhdehQeraati17-Feb-09 20:16 
QuestionIIS Pin
MozhdehQeraati17-Feb-09 20:10
MozhdehQeraati17-Feb-09 20:10 
AnswerRe: IIS Pin
Vimalsoft(Pty) Ltd17-Feb-09 21:47
professionalVimalsoft(Pty) Ltd17-Feb-09 21:47 
QuestionFileStream write into file Pin
AndieDu17-Feb-09 19:35
AndieDu17-Feb-09 19:35 
AnswerRe: FileStream write into file Pin
N a v a n e e t h17-Feb-09 20:39
N a v a n e e t h17-Feb-09 20:39 
AnswerRe: FileStream write into file Pin
musefan17-Feb-09 22:04
musefan17-Feb-09 22:04 
GeneralRe: FileStream write into file Pin
Ennis Ray Lynch, Jr.18-Feb-09 3:57
Ennis Ray Lynch, Jr.18-Feb-09 3:57 
GeneralRe: FileStream write into file Pin
musefan18-Feb-09 4:24
musefan18-Feb-09 4:24 
GeneralRe: FileStream write into file Pin
Ennis Ray Lynch, Jr.18-Feb-09 4:32
Ennis Ray Lynch, Jr.18-Feb-09 4:32 
GeneralRe: FileStream write into file Pin
musefan18-Feb-09 7:04
musefan18-Feb-09 7:04 
GeneralRe: FileStream write into file Pin
Ennis Ray Lynch, Jr.18-Feb-09 7:13
Ennis Ray Lynch, Jr.18-Feb-09 7:13 
GeneralRe: FileStream write into file Pin
musefan18-Feb-09 7:24
musefan18-Feb-09 7:24 

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.