简体   繁体   English

将本地HTML文件从项目中的my.resources加载到WebBrowser控件中--vb.net

[英]Load local HTML file into a WebBrowser control from my.resources in the project - vb.net

 If TreeView1.SelectedNode.Name = 2 Then
        WebBrowser1.Url = My.Resources.Welcome
 End If

and it doesn't work so if you could please provide an example. 它不起作用,如果你能提供一个例子。

Also i don't really know how the treeview control works, i know with the combo box or listbox you just have an index of 0, 1, 2, 3 etc. but with the treeview you don't any just one of the things I want to do is whenever the root node is selected i want it to deselect that and select the node that I specify like node.name = 2. 另外我真的不知道treeview控件是如何工作的,我知道使用组合框或列表框你只有一个索引0,1,2,3等等但是使用树视图你不会只是其中一个东西我想要做的是每当选择根节点时我希望它取消选择它并选择我指定的节点,如node.name = 2。

I'm using visual basic 2010 我正在使用visual basic 2010

Use DocumentText Property: 使用DocumentText属性:

If TreeView1.SelectedNode.Name = 2 Then 
  WebBrowser1.DocumentText = My.Resources.Welcome
End If 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM