Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/297.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
壁虎在C#中的用法(壁虎)_C#_Geckofx - Fatal编程技术网

壁虎在C#中的用法(壁虎)

壁虎在C#中的用法(壁虎),c#,geckofx,C#,Geckofx,有一些事情我没有发现如何使用geckofx: 获取已单击链接的URL 显示打印预览窗口 geckofx中是否存在此功能?如果没有,最好的方法是什么 要在使用GeckoWebBrowser显示html页面的C#项目中实现它 感谢OnNaviagted事件应为您提供链接,并在Geckofx中查找打印接口nsIPrintingPromptService::ShowPrintDialog。OnNaviagted事件应为您提供链接,并在Geckofx中查找打印接口nsPrintingPromptServi

有一些事情我没有发现如何使用geckofx:

  • 获取已单击链接的URL

  • 显示打印预览窗口

  • geckofx中是否存在此功能?如果没有,最好的方法是什么 要在使用GeckoWebBrowser显示html页面的C#项目中实现它


    感谢

    OnNaviagted
    事件应为您提供链接,并在Geckofx中查找打印接口
    nsIPrintingPromptService::ShowPrintDialog

    OnNaviagted
    事件应为您提供链接,并在Geckofx中查找打印接口
    nsPrintingPromptService::ShowPrintDialog

    有关打印,请参阅开始前确保阅读所有内容。基本上,您必须对GeckoFX进行修补和重新编译。

    要进行打印,请参阅确保在开始之前阅读所有内容。基本上,您必须修补和重新编译GeckoFX

    geckoWebBrowser.url
    
    这将在我认为geckoWebBrowser是控件名称的任何位置为您提供url,但是正如所指出的,您将能够使用e.url从文档完成并导航事件中获得它


    这将在我认为geckoWebBrowser是控件名称的任何位置为您提供url,但是正如所指出的,您可以使用e.url从文档完成和导航事件中获取url。

    要获取单击链接的url,您可以使用:

        void domClicked(object sender, GeckoDomMouseEventArgs e)
        {
         if(geckoWebBrowser1.StatusText.StartsWith("http"))
         {
          MessageBox.Show(geckoWebBrowser1.StatusText);//forward status text string somewhere
         }
        }
    
        geckoWebBrowser1.Navigate("javascript:print()");
    
    要显示“打印”对话框,可以使用:

        void domClicked(object sender, GeckoDomMouseEventArgs e)
        {
         if(geckoWebBrowser1.StatusText.StartsWith("http"))
         {
          MessageBox.Show(geckoWebBrowser1.StatusText);//forward status text string somewhere
         }
        }
    
        geckoWebBrowser1.Navigate("javascript:print()");
    

    要获取已单击链接的url,您可以使用:

        void domClicked(object sender, GeckoDomMouseEventArgs e)
        {
         if(geckoWebBrowser1.StatusText.StartsWith("http"))
         {
          MessageBox.Show(geckoWebBrowser1.StatusText);//forward status text string somewhere
         }
        }
    
        geckoWebBrowser1.Navigate("javascript:print()");
    
    要显示“打印”对话框,可以使用:

        void domClicked(object sender, GeckoDomMouseEventArgs e)
        {
         if(geckoWebBrowser1.StatusText.StartsWith("http"))
         {
          MessageBox.Show(geckoWebBrowser1.StatusText);//forward status text string somewhere
         }
        }
    
        geckoWebBrowser1.Navigate("javascript:print()");