Click here to Skip to main content
15,905,233 members
Home / Discussions / C#
   

C#

 
AnswerRe: Net framework needed?? Pin
Heath Stewart3-Feb-04 6:06
protectorHeath Stewart3-Feb-04 6:06 
AnswerRe: Net framework needed?? Pin
Judah Gabriel Himango3-Feb-04 6:08
sponsorJudah Gabriel Himango3-Feb-04 6:08 
GeneralRe: Net framework needed?? Pin
Anonymous3-Feb-04 6:43
Anonymous3-Feb-04 6:43 
GeneralRe: Net framework needed?? Pin
Heath Stewart3-Feb-04 8:55
protectorHeath Stewart3-Feb-04 8:55 
QuestionHow to draw X and Y axis? Pin
Member 18556083-Feb-04 3:06
Member 18556083-Feb-04 3:06 
AnswerRe: How to draw X and Y axis? Pin
Heath Stewart3-Feb-04 3:58
protectorHeath Stewart3-Feb-04 3:58 
GeneralRun .NET executable without the framework installed Pin
jvbragt3-Feb-04 2:51
jvbragt3-Feb-04 2:51 
GeneralRe: Run .NET executable without the framework installed Pin
Joel Lucsy3-Feb-04 2:53
Joel Lucsy3-Feb-04 2:53 
GeneralRe: Run .NET executable without the framework installed Pin
OmegaSupreme3-Feb-04 3:04
OmegaSupreme3-Feb-04 3:04 
GeneralRe: Run .NET executable without the framework installed Pin
Heath Stewart3-Feb-04 3:56
protectorHeath Stewart3-Feb-04 3:56 
GeneralRe: Run .NET executable without the framework installed Pin
TigerNinja_3-Feb-04 17:41
TigerNinja_3-Feb-04 17:41 
GeneralCreate a file and set the extended properties like companyname, comment, etc. Pin
jvbragt3-Feb-04 1:30
jvbragt3-Feb-04 1:30 
GeneralRe: Create a file and set the extended properties like companyname, comment, etc. Pin
Heath Stewart3-Feb-04 4:05
protectorHeath Stewart3-Feb-04 4:05 
GeneralRe: Create a file and set the extended properties like companyname, comment, etc. Pin
jvbragt3-Feb-04 4:18
jvbragt3-Feb-04 4:18 
GeneralRe: Create a file and set the extended properties like companyname, comment, etc. Pin
Heath Stewart3-Feb-04 6:00
protectorHeath Stewart3-Feb-04 6:00 
Generalmessage boxes Pin
ASGill3-Feb-04 1:29
ASGill3-Feb-04 1:29 
GeneralRe: message boxes Pin
sps-itsec463-Feb-04 2:09
sps-itsec463-Feb-04 2:09 
GeneralRe: message boxes Pin
thomasa3-Feb-04 2:22
thomasa3-Feb-04 2:22 
GeneralRe: message boxes Pin
dxhdxh3-Feb-04 3:10
dxhdxh3-Feb-04 3:10 
GeneralRe: message boxes Pin
Heath Stewart3-Feb-04 6:17
protectorHeath Stewart3-Feb-04 6:17 
GeneralRe: message boxes Pin
ASGill3-Feb-04 16:58
ASGill3-Feb-04 16:58 
GeneralRe: message boxes Pin
Heath Stewart3-Feb-04 18:04
protectorHeath Stewart3-Feb-04 18:04 
This isn't a difficult problem if you'd only read the .NET Framework SDK documentation. Type MessageBox.Show in the help index and you'll see all the overloads. Most of your method calls are all wrong. The majority of your errors are because you're using the wrong parameters in the wrong order for MessageBox.Show - this is all documented in the .NET Framework SDK. "Error" 1 isn't even an error - it's a warning. If you're not going to use the exception information, then you don't need to declare an Exception variable. You can do either of the following:
try
{
}
catch (Exception)
{
}
// OR
try
{
}
catch
{
}
You must read the documentation. Fumbling around blind won't help. Even looking at the documentation displayed in IntelliSense (the drop-down menu that appears when you're coding statements) would tell you what parameters should go where.

Also, in one line you're trying to use the > operator with a string! This doesn't work. If you want to check the length, use txtPassword.Text.Length > 10.

In many of your incorrectly called MessageBox.Show calls, you call it using specific buttons but you never compare the return with a DialogResult! What's the point? If all you're doing is displaying an error to a user, you shouldn't even define which buttons to display because "OK" is the default button. If you actually get the return value and compare it against a DialogResult enumeration, that's a different subject:
DialogResult result = MessageBox.Show("Would you like to retry?", "Prompt",
  MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result == DialogResult.Yes)
{
  // Retry code.
}


 

Microsoft MVP, Visual C#
My Articles
GeneralPrintPreviewDialog Pin
Anonymous3-Feb-04 1:16
Anonymous3-Feb-04 1:16 
GeneralRe: PrintPreviewDialog Pin
Heath Stewart3-Feb-04 4:18
protectorHeath Stewart3-Feb-04 4:18 
GeneralRe: PrintPreviewDialog Pin
Anonymous4-Feb-04 1:05
Anonymous4-Feb-04 1:05 

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.