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 ‘代码结束 |
欢迎访问最专业的网吧论坛,无盘论坛,网吧经营,网咖管理,网吧专业论坛
https://bbs.txwb.com
关注天下网吧微信/下载天下网吧APP/天下网吧小程序,一起来超精彩
|
本文来源:网络 作者:佚名