C# .NET - Excel C#

Asked By Zhigeng Fan
22-Dec-11 09:24 PM
how to use C# to show tooltips in Excel
  Zhigeng Fan replied to Zhigeng Fan
22-Dec-11 09:25 PM
how to show tooltips in Excel with C#
  Vickey F replied to Zhigeng Fan
22-Dec-11 10:44 PM

Reference from-

http://social.msdn.microsoft.com/Forums/en/vsto/thread/4e4e46cf-d177-43ea-b2fd-54b0e3bb53da

If you want to let the form looks more like a tooltip, you can set its FormBorderStyle property to None, and ShowInTaskBar property to False (Maybe there will be other properties you can modify to make your form more like a tooltip). Also if you want your form always locate besides the statusbar, you should set form’s top and left properties according to the activewindow. Codes I write are as follows:

 

Code Snippet

      Form1 f = null;

 

      private void ThisDocument_Startup(object sender, System.EventArgs e)

      {

        this.Application.WindowSize += new Microsoft.Office.Interop.Word.ApplicationEvents4_WindowSizeEventHandler(Application_WindowSize);

        f = new Form1();

        f.Show();

        f.Left = System.Convert.ToInt32(this.ActiveWindow.Left*1.33);

        f.Top = System.Convert.ToInt32((this.ActiveWindow.Top + this.ActiveWindow.Height)*1.33-f.Height);

      }

 

    //Word and Winform have a different mesure of their location, so I multiply 1.33

      void Application_WindowSize(Microsoft.Office.Interop.Word.Document Doc, Microsoft.Office.Interop.Word.Window Wn)

      {

        f.Left = System.Convert.ToInt32(this.ActiveWindow.Left * 1.33);

        f.Top = System.Convert.ToInt32((this.ActiveWindow.Top + this.ActiveWindow.Height) * 1.33 - f.Height);

        f.Activate();

      }

Hope this can help you to have a start!

  Anoop S replied to Zhigeng Fan
22-Dec-11 11:28 PM
You can easily add an informative tooltip to any cell. The tooltip will appear when someone selects the cell.

1) Move the cell pointer to the cell. From the menu, choose Data – Validation. On the Validation dialog, go to the Input Message tab, as shown in Fig.

http://images.brighthub.com/c3/6/c36af66c455bac0787df03545d1f4e278b4bc6a5_large.jpg

Note: In Excel 2007 and later versions, the Data Validation feature is found on the Data tab.

2) On the Input Message tab, type a title for the tooltip. In the message area, type instructions for the person filling out the worksheet, as shown in Fig.

http://images.brighthub.com/2d/7/2d7f05accd34094c576fb2500f41359604271262_large.jpg


When you move the cell pointer to that cell, an informative tooltip will appear, as shown in Fig. below


http://images.brighthub.com/02/e/02e60345897372ffdb1917be5bbac8f63d58ecf1_large.jpg
  James H replied to Zhigeng Fan
23-Dec-11 12:50 AM

I think you will ahve to use a macro in the excel to add the tooltip in excel cell.

Also have a look at this post

http://www.eggheadcafe.com/software/aspnet/31472577/tooltips-with-optionbutto.aspx

Create New Account
help
Problem with Excel reports ::::Excel 2003 Migration To Excel 2007 .NET Framework Hi All, We are in the process of Upgrade Excel 2003 (Office 2003) to Excel 2007 (Office 2007) for one of web application. This web application is using Excel (Pivot Table
insert picture in microsoft office excel 2007 Excel inserting pictures in Excel 2007 different than in Excel 2003 i had tried it to insert picture I have found that Excel 2007 inserts pictures in a different way than Excel 2003. I added javascript to insert
Reinstall Office 2007 Office Office 2007, you don't have the option to REINSTALL. All you have is repair, add or remove, or uninstall. How can I perform a clean install of Office 2007 without having to uninstall the whole office suite and then reinstalling it? I'm particularily needing it for Excel. Office Miscellaneous Discussions
Update for Microsoft Office Excel 2007 (KB978382)Failed Office Error details: Code 646 Security Update for Microsoft Office Excel 2007 (KB978382)Failed Security Update for the 2007 Microsoft Office System (KB978380)Failed Office Update Discussions Office System (1) Excel 2007 (1) Office
Excel 2007 won't open Excel 2003 Excel I'm having an odd problem with my Excel 2007. Excel 2007 will not open my Excel 2003 files by double clicking on them. I tried to