首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > VB Dotnet >

对于linklabel请高手来看看!

2011-12-18 
关于linklabel请高手来看看!!!我在画面里添加一个linklabel工具,然后在它里面写了代码:LinkLabel1.LinkVis

关于linklabel请高手来看看!!!
我在画面里添加一个linklabel工具,   然后在它里面写了代码:
  LinkLabel1.LinkVisited   =   True
                System.Diagnostics.Process.Start( "http://www.microsoft.com/press/ ")
王页出来是出来,   我本来开了一个IE(CSDN网站),   然后运行上面的,一点机的话不在新的IE里出http://www.microsoft.com/press/,而是我原先开的IE(CSDN网站)里出来了.这样的话不是我开的IE(CSDN网站)不是被http://www.microsoft.com/press/覆盖了吗?     有没有把上面的运行出来个新的IE上???????????????????

[解决办法]
Imports System
Imports System.Diagnostics
Imports System.ComponentModel


Namespace MyProcessSample
_
'/ <summary>
'/ Shell for the sample.
'/ </summary>
Class MyProcess
'/ <summary>
'/ Opens the Internet Explorer application.
'/ </summary>
Public Sub OpenApplication(myFavoritesPath As String)
' Start Internet Explorer. Defaults to the home page.
Process.Start( "IExplore.exe ")

' Display the contents of the favorites folder in the browser.
Process.Start(myFavoritesPath)
End Sub 'OpenApplication


'/ <summary>
'/ Opens urls and .html documents using Internet Explorer.
'/ </summary>
Sub OpenWithArguments()
' url 's are not considered documents. They can only be opened
' by passing them as arguments.
Process.Start( "IExplore.exe ", "www.northwindtraders.com ")

' Start a Web page using a browser associated with .html and .asp files.
Process.Start( "IExplore.exe ", "C:\myPath\myFile.htm ")
Process.Start( "IExplore.exe ", "C:\myPath\myFile.asp ")
End Sub 'OpenWithArguments


'/ <summary>
'/ Uses the ProcessStartInfo class to start new processes, both in a minimized
'/ mode.
'/ </summary>
Sub OpenWithStartInfo()

Dim startInfo As New ProcessStartInfo( "IExplore.exe ")
startInfo.WindowStyle = ProcessWindowStyle.Minimized

Process.Start(startInfo)

startInfo.Arguments = "www.northwindtraders.com "

Process.Start(startInfo)
End Sub 'OpenWithStartInfo


Shared Sub Main()
' Get the path that stores favorite links.
Dim myFavoritesPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Favorites)

Dim myProcess As New MyProcess()

myProcess.OpenApplication(myFavoritesPath)
myProcess.OpenWithArguments()
myProcess.OpenWithStartInfo()
End Sub 'Main
End Class 'MyProcess
End Namespace 'MyProcessSample

参考微软的实例——完全可以做出你要的效果~~

热点排行