|
I am working in C# 2005 1.Modal Dialog and Modeless Dialog in C# Modal Dialog and Modeless Dialog in C# : Class Form2 } class Form1 frm.Show() ;// For Modeless Dialog 2.C# MDI forms Wecan display more than one forms at a time in MDI forms. For the parent Form, we have to enable the IsMdiContainer property as true. and then drill down in to the coding as follows : class ChildForm private void mnuShowChildForm_Click()
while opening the chm file, sometimes it displays the dialog with "always ask before opening this file" check box. if this check box is not selected by us then it will not display the chm contents. So To display the chm file contents, we must enable "always ask before opening this file" check box. 4.CheckOnClick property in a menu item Sometimes we may need Checked property in a menuitem. For Instance, if the user selects the menuitem then it will show the Checked mark in a menuitem and if we select once again, the checkbox will if we enable this property, then we can display the check mark and we can change the execution behavior also based on the check mark. CheckedState property is set to true or false based on whether the check mark is currently displayed in a menuitem or not. This feature can be aptly used in the following Scenario. if we have MDI parent form, based on the checked selection of the menuitem we have to display the MDI child form.
hided... By default set the menuitem's CheckOnClick property as true and Checked property as false. For doing this one , add the menu event handler as follows : void mnuShowChildForm_Click()
|
Wednesday, September 26, 2007
C# Tips
Posted by
Sundar
at
1:11 PM
0
comments
Tuesday, September 25, 2007
?? operator (C#)
|
The ?? operator returns the left-hand operand if it is not null, or else it returns the right operand. For example: int? x = null; ... // y = x, unless x is null, in which case y = -1. int y = x ?? -1; The ?? operator also works with reference types: //message = param, unless param is null //in which case message = "No message" string message = param ?? "No message" ; |
Posted by
Prakash
at
10:17 AM
1 comments
Tuesday, September 11, 2007
Interoperability Tips
|
Interoperability : [DllImport("MAPI32.DLL", CharSet = CharSet.Ansi)]
if we want to rename the MAPISendMail fn as SendMail within C# , How can we do it ? we can do the following.
[DllImport("MAPI32.DLL", EntryPoint = "MAPISendMail", CharSet = CharSet.Ansi)]
EntryPoint = "MAPISendMail" // specified function address is obtained from the DLL
SendMail( ...) Literally what will happen is the address of the MAPISendMail() fn is assigned to the SendMail() fn. So if we call the SendMail() fn from C#, it will in turn calls the MAPISendMail() functionality from MAPI32.dll |
Posted by
Sundar
at
5:51 PM
0
comments
Wednesday, August 8, 2007
Tuesday, August 7, 2007
C# 2.0 Features
|
C# 2.0 new features (.NET framework SDK): |
Posted by
Sundar
at
9:55 AM
0
comments
Labels: C#
Sunday, August 5, 2007
A Developers Toolkit for C# and .Net
|
A developer, no matter how skilled, is dependent on the tools at his disposal. There are numerous free tools to aid in .Net development; from source control to debugging to documentation and profiling. Here, I've compiled a complete list of tools that I've used for years that cover the entire development lifecycle. C# and .Net are a powerful language and platform for developing software. The high levels of abstraction, garbage collection, architecture, and runtime provide an amazing platform for writing high quality software. It's a great start, but it's not enough. In the end, quality software comes down to developer skill and organization. This article will provide some links to free tools that every .Net developer should have on hand in order to write high quality software. If you don't know what a tool does, I encourage you to explore it, you may learn something new about source control, test driven development, profiling, continual integration, or debugging that you didn't know before. What follows is a best of breed toolkit that I use personally and professionally almost every day. All the tools are freely available for download online (with the exception of the full Visual Studio 2005 suite). IDE Visual Studio 2005 Express Edition (Free) - If you are getting started you don't need to buy the fully Visual Studio package yet, Visual Studio 2005 Express Edition is free and let's you do just about everything you can do in the full package. Profiling Tools Debugging Code Analysis Tools DevMetrics by Anticipating Minds- This is a closed source but free tool for running basic analysis on your .Net projects. The application installs as a plugin to the Visual Studio environment as well as provides a console utility. The tool will provide you a breakdown of lines of code, cyclomatic complexity, and other metrics by solution, project, file, and object. Unit Testing Tools Documentation Tools Compliance Tools Build Tools Contiuous Integration Tools Source Control Tools CVS and TortoiseCVS- CVS is a popular and free source control system. TortoiseCVS provides Windows Explorer integration for repository management. This is the system I use at home and you'll find most projects on the web use CVS as well. |
Posted by
Prakash
at
10:11 AM
0
comments
Labels: C#
Saturday, August 4, 2007
Frequently asked Differences in .Net
Posted by
Prakash
at
10:42 AM
1 comments
Thursday, July 26, 2007
C# Tips
|
1.How to Write debug string in C# ? |
Posted by
Sundar
at
10:30 AM
0
comments
Labels: C#
Wednesday, July 25, 2007
Effective C# mechanisms
|
Effective C# mechanisms: |
Posted by
Sundar
at
9:00 PM
1 comments
Labels: C#
Tuesday, July 24, 2007
Generics
|
C# Generics : |
Posted by
Sundar
at
11:58 AM
0
comments
Monday, July 23, 2007
Cross thread operation failure in .NET 2.0
|
Cross thread operation failure in .NET 2.0 : |
Posted by
Sundar
at
1:39 PM
0
comments
Friday, July 20, 2007
Difference between Delegate and Delegate With event
|
Is there any difference between the delegate and delegate with event ?... |
Tuesday, July 17, 2007
Difference between == and .Equals Method
|
What is Difference between == and .Equals() Method? |
Posted by
Prakash
at
9:02 PM
1 comments
Sunday, July 15, 2007
Code Snippet - Email Validation using Reg. Exp (C#)
|
public { } |
Posted by
Prakash
at
3:43 PM
0
comments
Labels: C#, Code Snippet