Alex Ngai wrote: 2.) Also, I wonder if it is possible to include a link to my e-mail in
the Message Box?
No. You'll have to create your own dialog class that looks like the dialog that MessageBox.Show displays. Otherwise, just put your email address in a LinkLabel in a Form to be used as your About box from the Help menu.
Since you're a newbie and asking pretty basic questions, you should also read the .NET Framework SDK, especially reviewing the class library to see what's available. Many of the properties on the Form class are easily set (as Colin showed you). Being familar with the class library (not necessarily memorizing it) and truly understanding the .NET Framework (like that all compilers for all languages targeting the CLR produce IL so the source language really doesn't matter, which is a common misunderstanding) is important.
Put a Button in your application. Create a ContextMenu and when the user clicks your button call ContextMenu.Show passing the Button reference and the position (like the Button.Location property value) to the method. See the ContextMenu.Show method in the .NET Framework SDK documentation for more information and even an example.
But again - like we told you the first time - this is way-overdone and will most likely only confuse users. Read the Windows UI guidelines I linked you.
Try debugging your code. Put a break-point at the beginning of that case and step through your code, checking the state of variables as you step over each line. And keep in mind that using the == operator for strings results in a case-sensitive comparison. See String.Compare for a better, culture-aware comparison with many more capabilities.
Is there any way so that all the below conditions give me true results.
String val = “Hello”
Now comparing val it with the following code.
1 “Hello “ //Note white space at the end of Hello.
2 “ Hello” //Note white space at the beginning of Hello.
3 “Hello “ //Note two white spaces left at the end.
4 “ Hello “ //Note white space both at thebegining and end of Hello.
5 “hello” //Note the caps change.
6 “HEllo” //Note the caps change.
Look at the documentation for the String class - not reading won't teach you anything. Specifically, look at the Compare (like I mentioned before which can do case-insensitive and culture-specific comparisons) and Trim methods.