vb6打开默认浏览器网站

[ 2021/11/10 18:17 | by admin ]
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 web_Click() '这里是按钮名称web
  ShellExecute 0, "open", "http://www.hkfx.net", 0, 0, 1
End Sub


vb6 List列表增加一行数据

[ 2021/11/10 17:47 | by admin ]
前言:之前我说过,因为学习资料严重缺少,古老语言慢慢被丢失,所以先发一些简单代码。

Private Sub Command1_Click()  '这是按钮1名称
    add_item = InputBox("在此处输入一个英文软件包名", "增加软件")
    If add_item <> "" Then
    List1.AddItem add_item
    End If
End Sub


vb6 右键弹出菜单

[不指定 2021/11/10 17:37 | by admin ]
前言:因为古老语言,网上越来越小相关资料,中文搜索相关内容越来越少,故止新开一版块,专为编程而生。
Private Sub list1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) 'List1为组件名称
If Button And vbRightButton Then   '弹菜单,判断名称
    PopupMenu list '弹出(添加)菜单栏的名称,必须有子菜单才能正确使用
    End If
End Sub


版块建立时间:2021/11/10
分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]