Click here to Skip to main content
15,921,840 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to get the system idle time to logoff the system? Pin
Dave Kreskowiak3-Nov-06 6:56
mveDave Kreskowiak3-Nov-06 6:56 
GeneralRe: how to get the system idle time to logoff the system? Pin
jamesjk8-Nov-06 0:31
jamesjk8-Nov-06 0:31 
QuestionCheck user in domain Pin
stancrm2-Nov-06 23:13
stancrm2-Nov-06 23:13 
AnswerRe: Check user in domain Pin
Jan Hirak3-Nov-06 1:30
Jan Hirak3-Nov-06 1:30 
Questionask to save before starting new file Pin
Aj_ling2-Nov-06 22:58
Aj_ling2-Nov-06 22:58 
AnswerRe: ask to save before starting new file Pin
Pete O'Hanlon2-Nov-06 23:02
mvePete O'Hanlon2-Nov-06 23:02 
QuestionRe: ask to save before starting new file Pin
Aj_ling2-Nov-06 23:29
Aj_ling2-Nov-06 23:29 
AnswerRe: ask to save before starting new file Pin
Pete O'Hanlon2-Nov-06 23:41
mvePete O'Hanlon2-Nov-06 23:41 
I'm assuming here that you've already created the Click event for the button. If you haven't then you need to do this first. Then, assuming your textbox is called myTextbox, you would type something like this:

if (myTextbox.Text.Trim().Length != 0)<br />
{<br />
    //... Show the messagebox here and do the save<br />
}


The Trim() removes any spaces from the end of the text. If the user had just pressed space, this would ensure that the messagebox was not shown.

There are many ways to accomplish this test. You could test to see if myTextbox.Text.Trim() == string.Empty.

Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."

Deja View - the feeling that you've seen this post before.

GeneralRe: ask to save before starting new file Pin
Aj_ling3-Nov-06 0:13
Aj_ling3-Nov-06 0:13 
GeneralRe: ask to save before starting new file Pin
Stefan Troschuetz3-Nov-06 0:24
Stefan Troschuetz3-Nov-06 0:24 
Questionregex Pin
ldr_2-Nov-06 22:58
ldr_2-Nov-06 22:58 
AnswerRe: regex Pin
Guffa3-Nov-06 0:20
Guffa3-Nov-06 0:20 
QuestionSearch Item in List View Pin
MJay2-Nov-06 22:28
MJay2-Nov-06 22:28 
AnswerRe: Search Item in List View Pin
HakunaMatada2-Nov-06 23:04
HakunaMatada2-Nov-06 23:04 
GeneralRe: Search Item in List View Pin
MJay3-Nov-06 21:15
MJay3-Nov-06 21:15 
AnswerRe: Search Item in List View Pin
rah_sin2-Nov-06 23:23
professionalrah_sin2-Nov-06 23:23 
GeneralRe: Search Item in List View Pin
MJay3-Nov-06 21:19
MJay3-Nov-06 21:19 
Questioncopy and paste a control at designtime Pin
webseal2-Nov-06 22:28
webseal2-Nov-06 22:28 
AnswerRe: copy and paste a control at designtime Pin
Stefan Troschuetz2-Nov-06 22:34
Stefan Troschuetz2-Nov-06 22:34 
GeneralRe: copy and paste a control at designtime Pin
webseal2-Nov-06 23:26
webseal2-Nov-06 23:26 
QuestionDraw arc Pin
rzvme2-Nov-06 21:40
rzvme2-Nov-06 21:40 
AnswerRe: Draw arc Pin
Stefan Troschuetz2-Nov-06 22:31
Stefan Troschuetz2-Nov-06 22:31 
QuestionHow to draw graphs in Image control of Report Pin
Ramith Sivanarain2-Nov-06 21:30
Ramith Sivanarain2-Nov-06 21:30 
QuestionTo change child property attribute . Pin
praveenqwe2-Nov-06 18:51
praveenqwe2-Nov-06 18:51 
AnswerRe: To change child property attribute . Pin
sam#2-Nov-06 19:37
sam#2-Nov-06 19:37 

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.