问题描述
我的web程序是java的,需要在webbrowser下浏览,用.net写了个小exe文件,很简单,只有一个框框,没有任何其他功能,网站调用object文件在xp下使用正常,win7系统64位下不行,32位没关注,好像也是不行,希望大神解答下,webbrowser代码如下:usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;namespaceWindowsFormsApplication1{publicpartialclassForm1:Form{publicForm1(){InitializeComponent();}privatevoidwebBrowser1_DocumentCompleted(objectsender,WebBrowserDocumentCompletedEventArgse){}privatevoidForm1_Load(objectsender,EventArgse){webBrowser1.Navigate("C:\test\SDRdcard100_DEMO.htm");//webBrowser1.Navigate("http://192.168.0.58:8080/DFGZC");}}}
解决方案
解决方案二:
publicpartialclassForm1:Form{publicForm1(){InitializeComponent();}privatevoidButton1_Click(objectsender,EventArgse){webBrowser1.Navigate("C:\test\SDRdcard100_DEMO.htm");while(webbrowserreadstate.readstate!=readstate.complted)application,Doevent();}}
解决方案三:
引用1楼tangyanzhi1111的回复:
publicpartialclassForm1:Form{publicForm1(){InitializeComponent();}privatevoidButton1_Click(objectsender,EventArgse){webBrowser1.Navigate("C:\test\SDRdcard100_DEMO.htm");while(webbrowserreadstate.readstate!=readstate.complted)application,Doevent();}}
是加入下面的两句吗?我是做java的,c#语法不熟,加入了之后报语法错误while(webbrowserreadstate.readstate!=readstate.complted)application,Doevent();
解决方案四:
引用2楼skynofeng的回复:
Quote: 引用1楼tangyanzhi1111的回复:
publicpartialclassForm1:Form{publicForm1(){InitializeComponent();}privatevoidButton1_Click(objectsender,EventArgse){webBrowser1.Navigate("C:\test\SDRdcard100_DEMO.htm");while(webbrowserreadstate.readstate!=readstate.complted)application,Doevent();}}是加入下面的两句吗?我是做java的,c#语法不熟,加入了之后报语法错误while(webbrowserreadstate.readstate!=readstate.complted)application,Doevent();
解决方案五:
不报错了,是有个逗号,应该是点