重点statusbar外部控件的掌握
Option Explicit
Private Sub Form_MouseMove(button As Integer,Shift As Integer,X As Single,Y As Single)
stb1.Panels(3) = "X:" & Str(X) '第3个窗体上显示鼠标在图像框的水平位置
stb1.Panels(4) = "Y:" & Str(Y) '第4个窗体上显示鼠标在图像框的垂直位置
stb1.Panels(5) = Form1.Tag '第5个窗体上显示窗体的标识
End Sub
Private Sub Image1_MouseMove(button As Integer,Y As Single)
stb1.Panels(3) = "X:" & Str(X)
stb1.Panels(4) = "Y:" & Str(Y)
stb1.Panels(5).Text = Image1.Tag '第5个窗体上显示image1的标识
End Sub
Private Sub Image2_MouseMove(button As Integer,Y As Single)
stb1.Panels(3) = "X:" & Str(X)
stb1.Panels(4) = "Y:" & Str(Y)
stb1.Panels(5).Text = Image2.Tag '第5个窗体上显示显示image2的标识
End Sub
Private Sub Image3_MouseMove(button As Integer,Y As Single)
stb1.Panels(3) = "X:" & Str(X)
stb1.Panels(4) = "Y:" & Str(Y)
stb1.Panels(5).Text = Image3.Tag '第5个窗体上显示显示image3的标识
End Sub
Private Sub Image4_MouseMove(button As Integer,Y As Single)
stb1.Panels(3) = "X:" & Str(X)
stb1.Panels(4) = "Y:" & Str(Y)
stb1.Panels(5).Text = Image4.Tag '第5个窗体上显示显示image4的标识
End Sub
Private Sub Timer1_Timer()
stb1.Panels(1) = Date '在状态栏的第1个窗体显示当前日期
stb1.Panels(2) = Time '在状态栏的第2个窗体显示当前时间
End Sub
以上是内存溢出为你收集整理的VB工程---百例75--状态栏全部内容,希望文章能够帮你解决VB工程---百例75--状态栏所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)