質問

私のMicrosoft Outlookビュー制御、理解しようとその能力が少なくなってきている。で表示が可能な端末またはアプリでデザインが実行時にそれだけで、"E_CLASSNOTREG"例外です。わからどのようなクラスで主張しですか?

私が作成したwinform、追加の制御のツールボックス、ドラッグします。く展望は受信トレイです。では、次のコード:

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
    System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
    this.axViewCtl1 = new AxMicrosoft.Office.Interop.OutlookViewCtl.AxViewCtl();
    ((System.ComponentModel.ISupportInitialize)(this.axViewCtl1)).BeginInit();
    this.SuspendLayout();
    // 
    // axViewCtl1
    // 
    this.axViewCtl1.Enabled = true;
    this.axViewCtl1.Location = new System.Drawing.Point(384, 184);
    this.axViewCtl1.Name = "axViewCtl1";
    this.axViewCtl1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axViewCtl1.OcxState")));
    this.axViewCtl1.Size = new System.Drawing.Size(192, 192);
    this.axViewCtl1.TabIndex = 0;
    // 
    // Form1
    // 
    this.ClientSize = new System.Drawing.Size(1093, 633);
    this.Controls.Add(this.axViewCtl1);
    this.Name = "Form1";
    ((System.ComponentModel.ISupportInitialize)(this.axViewCtl1)).EndInit();
    this.ResumeLayout(false);
}

それでも金型をもって私:

System.Runtime.InteropServices.COMException occurred
  Message="Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"
  Source="System.Windows.Forms"
  ErrorCode=-2147221164
  StackTrace:
       at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
       at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
       at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
       at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
       at System.Windows.Forms.AxHost.CreateInstance()
       at System.Windows.Forms.AxHost.GetOcxCreate()
       at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
       at System.Windows.Forms.AxHost.CreateHandle()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.AxHost.EndInit()
       at Sample.OutlookForm.Form1.InitializeComponent() in D:\source\tests\OutlookView\Sample.OutlookForm\Form1.Designer.cs:line 50
  InnerException: 

を---例外がEndInit().

また、他の物となっていをクリックし制御のデザイナー、visual studio凍結期間は、時短で30秒、時には私を殺し、先行きの課題に対すが対応いたします。

私は走VS2008年と最新のパッチ/SP、Windows7x64、office2007すべての最新のパッチおよびサービスパック導入。

なぜこの作品は私にとって、設計時には実行時間がかかる?かにすることができますのでどのようなことは決別したいと考えているが登録されていません?

役に立ちましたか?

解決

いま、何かの間違い、お申込みは64ビット機?また、同じ問題が入っていた64ビット不可、先行きActiveXコントロールです。

場合の実行アプリもネイティブ64モードにすることは要件になっていないときに修正プログラムを強力にバック32ビット互換モードに64bitます。この解決は私の問題です。

きのいずれかの目標X86プラットフォームビルソリューション(推奨)、きものだけを築の実行後、 corflags.

他のヒント

まず簡単な質問:どのようにして、ツールバー上のコントロールを取得したのですか? ActiveXコントロール内の?

もしそうなら、私はあなたがそれを使用することはできません怖いです。そのコントロールは、それが外部からの制御ではありません、Outlook内で使用するために開発されました。

あなたは、このような措置に頼ることなく見通しのルックアンドフィールをエミュレートするために使用できるいくつかのサードパーティのコントロールがあります。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top