扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
Private Sub Command1_Click() frmTest.Show ‘当开始按钮被点击时激活超级菜单 End Sub Private Sub Form_Load() Me.left = (Screen.Width - Me.Width) / 2 Me.tOp = (Screen.Height - Me.Height) / 2 ‘窗体位置居中 End Sub Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) If frmTest.Visible = True Then Unload frmTest End If ‘当鼠标离开菜单时卸载菜单 End Sub Private Sub Form_Unload(Cancel As Integer) End ‘结束程序 End Sub |
Option Explicit Dim cL As New cLogo ‘引用类模块 Private Sub Form_Load() Me.left = Form1.left Me.tOp = Form1.tOp - Form1.Height ‘指定窗体位置 Me.Caption = App.Title ‘窗体标题 cL.DrawingObject = picLogo ‘指定piclogo为载体 cL.Caption = ″ 欢迎使用国产软件! --zouhero 2000 ″‘文本 cL.StartColor = vbBlue ‘前段颜色-蓝色 cL.EndColor = vbRed ‘后段颜色-红色 End Sub Private Sub Form_Resize() On Error Resume Next picLogo.Height = Me.ScaleHeight cL.Draw End Sub Private Sub Label1_Click(Index As Integer) MsgBox ″你选择了菜单″ & Index, vbExclamation ’在这里添加你的相应代码 End Sub Private Sub Label1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single) Dim i As Integer ‘当鼠标移动标签控件时,前景色变成白色,背景色变成蓝色 Label1(Index).BackColor = vbBlue Label1(Index).ForeColor = &HFFFFFF For i = 0 To Label1.Count - 1 ‘其他标签颜色恢复原状 If i = Index Then GoTo aa Label1(i).BackColor = vbButtonFace Label1(i).ForeColor = &H0 aa: Next ‘恢复除选定标签外的所有标签的前景色和背景色 End Sub ‘代码结束 |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者