2012-02-23 140 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的一个实例,从而创建一个具有所需结构的选项卡。

如果你还没有找到解决方案或有问题,请留下评论,我会提供一些代码来帮助你。