问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

关于VB打开网站的问题

发布网友 发布时间:2022-05-07 08:06

我来回答

4个回答

热心网友 时间:2023-10-21 21:57

'API函数定义
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

'用api打开TEXT1中的网址
Private Sub Command1_Click()
ShellExecute Me.hwnd, "Open", trim(Text1.Text), 0, 0, 1
End Sub

热心网友 时间:2023-10-21 21:57

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub OpenUrl(tUrl As String) 'url函数
ShellExecute Me.hwnd, "Open", tUrl, 0, 0, 0
End Sub

Private Sub Command1_Click()
OpenUrl Text1.Text
End Sub追问呃,能不能稍微给我解释一下,我是新手...

追答Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

这是一个API ,ShellExecute 自己百度一下。
Private Sub OpenUrl(tUrl As String) 'url函数
ShellExecute Me.hwnd, "Open", tUrl, 0, 0, 0
End Sub
自己写的函数过程,可以省略。
Private Sub Command1_Click()
OpenUrl Text1.Text 也可以是 ShellExecute Me.hwnd, "Open", 网址, 0, 0, 0
End Sub
调用过程。

热心网友 时间:2023-10-21 21:58

从引用对话框中引用该项目: Microsoft Internet Controls
可以建立ie的一个实例
如:
Dim ie As InternetExplorer
Set ie = New InternetExplorer
ie.Visible = True
ie.Navigate "http://www.baidu.com/"

热心网友 时间:2023-10-21 21:57

'API函数定义
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

'用api打开TEXT1中的网址
Private Sub Command1_Click()
ShellExecute Me.hwnd, "Open", trim(Text1.Text), 0, 0, 1
End Sub

热心网友 时间:2023-10-21 21:57

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub OpenUrl(tUrl As String) 'url函数
ShellExecute Me.hwnd, "Open", tUrl, 0, 0, 0
End Sub

Private Sub Command1_Click()
OpenUrl Text1.Text
End Sub追问呃,能不能稍微给我解释一下,我是新手...

追答Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

这是一个API ,ShellExecute 自己百度一下。
Private Sub OpenUrl(tUrl As String) 'url函数
ShellExecute Me.hwnd, "Open", tUrl, 0, 0, 0
End Sub
自己写的函数过程,可以省略。
Private Sub Command1_Click()
OpenUrl Text1.Text 也可以是 ShellExecute Me.hwnd, "Open", 网址, 0, 0, 0
End Sub
调用过程。

热心网友 时间:2023-10-21 21:58

从引用对话框中引用该项目: Microsoft Internet Controls
可以建立ie的一个实例
如:
Dim ie As InternetExplorer
Set ie = New InternetExplorer
ie.Visible = True
ie.Navigate "http://www.baidu.com/"

热心网友 时间:2023-10-21 21:58

Private Sub Command1_Click()
Shell "C:\Program Files\Internet Explorer\iexplore.exe " & Text1.Text, vbNormalFocus
End Sub

热心网友 时间:2023-10-21 21:58

Private Sub Command1_Click()
Shell "C:\Program Files\Internet Explorer\iexplore.exe " & Text1.Text, vbNormalFocus
End Sub

热心网友 时间:2023-10-21 21:57

'API函数定义
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

'用api打开TEXT1中的网址
Private Sub Command1_Click()
ShellExecute Me.hwnd, "Open", trim(Text1.Text), 0, 0, 1
End Sub

热心网友 时间:2023-10-21 21:57

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub OpenUrl(tUrl As String) 'url函数
ShellExecute Me.hwnd, "Open", tUrl, 0, 0, 0
End Sub

Private Sub Command1_Click()
OpenUrl Text1.Text
End Sub追问呃,能不能稍微给我解释一下,我是新手...

追答Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

这是一个API ,ShellExecute 自己百度一下。
Private Sub OpenUrl(tUrl As String) 'url函数
ShellExecute Me.hwnd, "Open", tUrl, 0, 0, 0
End Sub
自己写的函数过程,可以省略。
Private Sub Command1_Click()
OpenUrl Text1.Text 也可以是 ShellExecute Me.hwnd, "Open", 网址, 0, 0, 0
End Sub
调用过程。

热心网友 时间:2023-10-21 21:58

从引用对话框中引用该项目: Microsoft Internet Controls
可以建立ie的一个实例
如:
Dim ie As InternetExplorer
Set ie = New InternetExplorer
ie.Visible = True
ie.Navigate "http://www.baidu.com/"

热心网友 时间:2023-10-21 21:58

Private Sub Command1_Click()
Shell "C:\Program Files\Internet Explorer\iexplore.exe " & Text1.Text, vbNormalFocus
End Sub
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
...要求高吗?最低配置要求一览介绍_罪恶装备启示者配置要求高吗?最低... 罪恶装备启示者帧数怎么提升介绍_罪恶装备启示者帧数怎么提升是什么 ...在25平方米的房间开1个小时要用多少电拜托了各位 谢谢 高空抛物的法律赔偿责任如何规定 高空抛物罪一般怎么处罚 保时捷电动车和特斯拉哪个好 保时捷Mission E和特斯拉Model 3哪个好 特斯拉Model S和保时捷Tnycan你怎么选 探探怎么注销账号 探探APP注销账号教程 80枚5分硬币中有一枚是假的,他比真硬币重,用一架天平去称,不用砝码... 80枚5分硬币中有一枚是假的,它比真硬币重一些.用一架天平去称,不用砝码... 自学vB有哪些网站 推荐几个vb编程入门网站 介绍一些与VB有关的学习网站 VB 打开网站(要输入型的) VB怎样做登陆网站 sci论文发表难度有多大? 中国天才少年曹原在Nature再发文章,在Nature发布文章为何难? SCI论文发表太难了,怎么办? 梦见小泰迪腿断了 论文为什么那么难发表,我都发表好几次了都没有成功,为什么? word文档标记 家用煤气暖气片怎么保养? 做梦梦见自己抱养的小狗被自己家人放在锅里断了一条后腿? 小布怎么能上别人 广西桂林平乐同安镇 怎么坐车到东莞长安呢? 永泰县同安镇医保报销需要到村里打什么报告单? 新都到龙泉驿区同安镇花海路8号怎么去 请问成都龙泉驿区同安镇红旗村四组哪里的条件好不好 使命召唤怎么登录别人的 成都紫霞山要不要门票 谁能推荐个较好的学习VB用的网站或是资源站? VB 如何判断一个网页或网站 能否打开? 无线上网费是什么 无线接入上网流量费到底是什么费用 无线接入上网流量费是什么? 无线上网费怎么算的? 梦到姐姐趴在泥水里被别人欺负我自己怎么跑都跑不过去? 梦见朋友姐姐被婆婆欺负 梦见别人欺负我,姐和哥帮助我 做梦梦见去世的母亲问姐姐讲,有人欺负她,叫我为叫她出气这什么意思呀? 痛风能喝红酒吗.. 梦见妈妈姐姐她们都欺负我 痛风病人到底能不能喝红酒 梦见别人欺负我妹妹,我打了别人,快打死了,回来我妹妹说没事的。我 oppo手机忘记密码怎么解锁指纹解锁不匹配解不开怎么办 手机密码账户忘记了,打不开。上面也没有忘记密码怎么办? 前叉韧带手术20天,需要怎么锻炼 我是个足球运动员,刚做完右膝前交叉韧带重建和半月板后脚修复的手术,怎么做康复训练的话恢复得比较快呀 后交叉韧带重建后如何恢复锻炼 前交叉韧带重建术后康复问题