2011-03-09 71 views
0

,当我浏览到特定的网页.NET中的Windows CE设备使用WebBrowser控件,它不走的点击次数在谷歌网页上page.eg搜索按钮按钮..WebBrowser控件为Windows CE

其实这适用于1设备,而不适用于其他设备。

任何人都可以帮助解决这个问题吗?

+1

哪些设备? SmartPhones或PocketPc触摸屏?它在哪里工作,哪里不工作?哪个windows mobile版本? – 2011-03-09 12:17:53

+0

@Davide:都是PocketPc设备 – Anant 2011-03-10 05:07:28

+0

问题与http://stackoverflow.com/questions/2689030/google-search-is-not-working-in-web-browser-control相同 – Anant 2011-03-10 05:41:36

回答

0

这需要设置注册表,并且需要设置的键是;

Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings并且需要在当前用户注册表中将“WarnOnZoneCrossing”设置为“0”。

Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Zones \ 3并且需要在本地计算机注册表中将“1601”设置为“0”和“1609”设置为“0”。

的代码看起来像

using (RegistryKey key = Registry.CurrentUser.OpenSubKey (@"\Software\Microsoft\Windows\CurrentVersion\Internet Settings", true)) 
      { 
       if (key == null) 
       {     Registry.CurrentUser.CreateSubKey(@"\Software\Microsoft\Windows\CurrentVersion\Internet Settings"); 
        using (RegistryKey newKey = Registry.CurrentUser.OpenSubKey(@"\Software\Microsoft\Windows\CurrentVersion\Internet Settings", true)) 
        { 
         newKey.SetValue("WarnOnZoneCrossing", 0); 
        } 
       } 
       else 
        key.SetValue("WarnOnZoneCrossing", 0); 
      } 
      //enable submission of non-encrypted form data 
      using (RegistryKey key = Registry.LocalMachine.OpenSubKey(@"\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3", true)) 
      { 
       if (key == null) 
       { 
        Registry.LocalMachine.CreateSubKey(@"\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3"); 
        using (RegistryKey newKey = Registry.LocalMachine.OpenSubKey(@"\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3", true)) 
        { 
         newKey.SetValue("1601", 0); 
        } 
       } 
       else 
        key.SetValue("1601", 0); 
      } 
      //enable the display of mixed content 
      using (RegistryKey key = Registry.LocalMachine.OpenSubKey(@"\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3", true)) 
      { 
       if (key == null) 
       { 
        Registry.LocalMachine.CreateSubKey(@"\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3"); 
        using (RegistryKey newKey = Registry.LocalMachine.OpenSubKey(@"\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3", true)) 
        { 
         newKey.SetValue("1609", 0); 
        } 
       } 
       else 
        key.SetValue("1609", 0); 
      }