2012-02-23 138 views
0

我「米使用Awesomium,試圖實現我的Windows窗體應用程序中的網頁。形式使用awesomium實現在Windows瀏覽器

我用的awesomium .NET樣本,但我只是不明白的我的標籤我homeurl。

當我跑我的項目狀態欄是我的形式,並沒有別的內浮動情況。

任何人都知道我在哪裏可以得到關於如何做這嘖嘖或知道可能是什麼問題?

public Laboratory() { 
     WebCoreConfig webConfig = new WebCoreConfig() { 
      SaveCacheAndCookies = true, 
      HomeURL = "http://www.google.com", 
      LogLevel = LogLevel.Verbose 
     }; 

     // Using our executable as a child rendering process, is not 
     // available when debugging in VS. 
     if (!Process.GetCurrentProcess().ProcessName.EndsWith("vshost")) { 
      // We demonstrate using our own executable as child rendering process. 
      // Also see the entry point (Main function) in Program.cs. 
      webConfig.ChildProcessPath = WebCoreConfig.CHILD_PROCESS_SELF; 
     } 
     WebCore.Initialize(webConfig); 

     InitializeComponent(); 
    } 

    #region methodes 

    #region OpenTab 
    internal WebDocument OpenTab(string url = null, string title = null) { 
     WebDocument doc = String.IsNullOrEmpty(url) ? new WebDocument() : 
      String.IsNullOrEmpty(title) ? new WebDocument(url) : new WebDocument(url, title); 
     doc.Show(dockPanel); 

     return doc; 
    } 
    #endregion 

    protected override void OnLoad(EventArgs e) { 
     base.OnLoad(e); 
     this.OpenTab(); 
    } 

Windows form application

+0

使用WebControl類。 – 2012-02-23 13:43:44

回答

0

我已經完全重做的左側面板中的其它例子是與下載,那就像一個魅力。這是非常基本的,但現在會做。

0

我也有同樣的問題,但我設計了一個解決問題的方法。我實現了作爲用戶控件在每個選項卡(WebDocument Page作爲示例)上呈現的主瀏覽器引擎。然後我在mainForm中使用了一個DockPannel。

因此,我創建了一個用戶控件的實例,然後將其添加到DockPannel的一個實例,從而創建一個具有所需結構的選項卡。

如果你還沒有找到解決方案或有問題,請留下評論,我會提供一些代碼來幫助你。