Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 998633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:13:40+00:00 2026-05-16T07:13:40+00:00

Hi i am developing a custom panel for outlook. and i have a question,

  • 0

Hi i am developing a custom panel for outlook.
and i have a question, how can i autosize width and height the datagridview to the userControl?

This is what append:
alt text http://a.imageshack.us/img180/6938/custompanel.png

Edit:

Microsoft.Office.Tools.CustomTaskPane taskPane;
        Microsoft.Office.Interop.Outlook.Application applicationObject;
        Outlook.Explorer explorer;
        TaskPaneControl tpc;
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            explorer = this.Application.ActiveExplorer();
            explorer.SelectionChange+=new Microsoft.Office.Interop.Outlook.ExplorerEvents_10_SelectionChangeEventHandler(explorer_SelectionChange);
        }

        void explorer_SelectionChange()
        {
            if (taskPane == null)
            {
                tpc=new TaskPaneControl();
                taskPane = Globals.ThisAddIn.CustomTaskPanes.Add(tpc, "Sender Details", explorer);
                taskPane.Visible = true;
                taskPane.Width = 245;
                return;
            }

            if (taskPane != null)
            {
                taskPane.Visible = true;
                taskPane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionBottom;
                taskPane.Height = 245;
                }
            }
        }

And added a TaskPaneControl (userControl)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T07:13:41+00:00Added an answer on May 16, 2026 at 7:13 am

    Check that you have set the Anchor property to all four directions, or the Dock property to DockStyle.Fill.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone have any good links for developing custom field and content types that
I have built a custom administration panel into a Rails application that allows content
As a company specialized in developing custom CMS, we have been asked to deploy
I'm developing an Outlook 2010 Add-In in C# which adds a docked Custom Task
I'm developing an outlook addin that has a button in a custom task pane
I'm developing a custom widget with QGraphicsScene/View and I have no prior experience with
I am developing a custom control derived from System.Windows.Controls.ContentControl. In the controls default template
I'm developing a custom autocomplete control in pure WinApi, and the problem that I've
I'm developing a custom control, which most resembles a text area. I am drawing
I'm developing a custom wordpress blog theme. Does anyone know if there is a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.