倒计时程序(VB6.0源代码编写) 倒计时程序是一个简单的倒计时程序。从10秒开始。 Dim TimerCount, OnTimer Dim i As Integer Private Sub Command1_Click() Me.Caption = "发射装置已启动-QQ223857666勾月" Timer1.Enabled = True OnTimer = Time TimerCount = DateAdd("s", "11", OnTimer) End Sub Private Sub T
任输入三个数,求得平均值,平均值程序(VB6.0源代码编写Function ave(ByVal a As Double, ByVal b As Double, ByVal c As Double) As Double ave = (a + b + c) / 3 End Function Private Sub Command1_Click() Text4 = ave(Val(Text1), Val(Text2), Val(Text3)) End Sub
限制鼠标移动区域程序(vb6.0源代码编写) Option Explicit Private Declare Function ClipCursor Lib "user32" (lpRect As Any) As Long Private Type RECT '用户自定义类型 Left As Long Top As Long Right As Long Bottom As Long End Type Dim mouse As RECT Private Sub Command1_Click()
隐藏与显示鼠标程序(vb6.0源代码编写)Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long Private Sub Command1_Click() '隐藏鼠标 ShowCursor True '计数加一 Command1.Enabled = False Command2.Enabled = True End Sub Private Sub Command2_Click() '显示鼠标
查找与替换程序(VB6.0源代码编写),替换区分大小写等功能. Private Sub Command1_Click() Dim st, te As String Dim i As Integer te = Text1.Text For i = 1 To Len(Text1.Text) st = Mid(Text1.Text, i, 1) If st = Text2.Text Then Mid(te, i, 1) = Text3.Text Next i Text1.Text = te End