Visual Studio 2010 Keyboard Shortcuts.

Visual Studio 2010 Keyboard Shortcuts.


Refer below link for Visual studio 2010 keyboard short cuts.
Different documents as pdf available to download.  

You can easily read and if want to print for stick on your desk board (:D I always do it) you can easily print it.





Posted in | 0 comments

New features in Visual C# in Visual Studio 2012 (C# 5.0).

New features in Visual C# in Visual Studio 2012 (C# 5.0).

    
     Two new features introduce in C# visual studio 2012. 
    1. Async and Await and 
    2. Caller Information. 

  Async and Await.

This feature introduces two new keywords Async and Await. For more details about this features please read below article.

   
  Caller Information.

      Using this feature you can easily get information about the caller of method. You can get details about path of the source code, the line number in the source code and member name of the caller. For more details about this features please read below article.

Posted in | 0 comments

How to set tooltip on Combobox Items in Windows Application.

How to set tooltip on Combobox Items in Windows Application.

Hello,
Below code block is set tool tip on combobox items. First you need to drop Tooltip UI Control on windows Form. Default name of tooltip control is toolTip1. Now we need to create different events to show tooltip on Combobox each items. Add Below code in form load events.


 
private void Form1_Load(object sender, EventArgs e)
        {
            cmbProperty.DrawMode = DrawMode.OwnerDrawFixed;
            cmbProperty.DrawItem += new DrawItemEventHandler(cmbProperty_DrawItem);
            cmbProperty.DropDownClosed += new EventHandler(cmbProperty_DropDownClosed);
            cmbProperty.Leave += new EventHandler(cmbProperty_Leave);
             

        }


In Above cmbProperty is Combobox name. Now add below event handler in form1.cs
 

void cmbProperty_Leave(object sender, EventArgs e)
        {
            toolTip1.Hide(cmbProperty);
        }

        void cmbProperty_DropDownClosed(object sender, EventArgs e)
        {
            toolTip1.Hide(cmbProperty);
        }

        void cmbProperty_DrawItem(object sender, DrawItemEventArgs e)
        {
            if (e.Index < 0) { return; } 
            string text = cmbProperty.GetItemText(cmbProperty.Items[e.Index]);
            e.DrawBackground();
            using (SolidBrush br = new SolidBrush(e.ForeColor))
            { e.Graphics.DrawString(text, e.Font, br, e.Bounds); }
            if ((e.State & DrawItemState.Selected) == DrawItemState.Selected)
            { toolTip1.Show(text, cmbProperty, e.Bounds.Right, e.Bounds.Bottom); }
            e.DrawFocusRectangle();
        }



Now run the application and Enjoy!!! Let me know if you are facing any problem.

Posted in | 3 comments