TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
cdh
NA
3
0
No text in message box
Apr 15 2005 10:07 AM
In the interest of full disclosure, I am not a programmer and I'm learning C# on the fly (and don't know much yet). I took over a job in which I must use a custom application coded in C#. Part of my job entails troubleshooting the custom application. (By the way, they knew when they hired me that I didn't know programming). I've purchased a couple of books and I'll be taking an online C# class starting next week. However, I'm in need of some quick assistance. I have a try-catch statement in which the catch calls (this might not be the right terminology) a message box that is supposed to display an error message. When I run the code, the error is obviously being caught because the message box displays. However the error does not display. I end up with a blank message box that includes a blank OK button. However, the title bar displays. The try-catch statement is as follows: try { if (Directory.Exists(dir)==true) { files.DeleteFilesInDir(dir,"*.*"); if (Directory.Exists(dir)==true) files.DeleteFilesInDir(dir+@"040\","*.*"); if (Directory.Exists(dir)==true) files.DeleteFilesInDir(dir+@"5500\","*.*"); if (Directory.Exists(dir)==true) files.DeleteFilesInDir(dir+@"2100\","*.*"); if (Directory.Exists(dir)==true) files.DeleteFilesInDir(dir+@"2604\","*.*"); } else Directory.CreateDirectory(dir); } catch { MessageBox.Show("An error occurred while creating or clearing the installation directory"+"\n"+"Adapt will not be installed.","InstallAdapt.exe"); return; } MODE="RUN"; } I've changed the entire message within the parens to just "hi" thinking that maybe the syntax was incorrect, but I still ended up with an empty message box. The only difference was the message box was smaller. So it recognizes the size of the message. Any suggestions?
Reply
Answers (
4
)
reading a cookie from C# windows application
web cam