1.vbС?小程序源???Դ??
2.VBç¼åå°ç¨åº
3.VBä¸ä¸ªå°ç¨åº
4.VB 6.0 教我编一个小程序
5.ç¨VBåä¸ä¸ªå°ç¨åº.
6.ç¨VBå¶ä½å°ç¨åº
vbС????Դ??
'vbs脚本
Set a=CreateObject("WScript.Shell")
Set oExec=a.Exec("C:\Program Files\Tencent\QQ\Bin\QQ.exe") '程序路径
WScript.Sleep '延时3秒
a.AppActivate "Q登录"
a.SendKeys "+{ TAB}"
a.SendKeys "Q号"
WScript.Sleep
a.SendKeys "{ TAB}"
a.SendKeys "密码"
WScript.Sleep
a.SendKeys "{ ENTER}"
set a=nothing
VBç¼åå°ç¨åº
代ç æ¹ä¸ºï¼Private Sub Form_Click()Dim a, b, c, d As StringDim sum, aver As Longa = Val(InputBox("请è¾å ¥ç¬¬ä¸ä¸ªæ°"))
b = InputBox("请è¾å ¥ç¬¬äºä¸ªæ°")
c = InputBox("请è¾å ¥ç¬¬ä¸ä¸ªæ°")
d = InputBox("请è¾å ¥ç¬¬å个æ°")
sum = a + b + c + d
aver = sum / 4
Print "æè¾å ¥ç4个æ°ååå«æ¯"; a, b, c, d
Print "4个æ°åçå为"; sum
Print "4个æ°åçå¹³åå¼ä¸º"; averEnd Sub VB6.0ä¸è°è¯éè¿ã
VBä¸ä¸ªå°ç¨åº
Option Explicit
Const pi = 3.
Private len_S As Single, len_M As Single, len_H As Single
Private Sub Form_Load()
'å ååæéçé¿åº¦
len_S = Sqr((LineS.Y2 - LineS.Y1) ^ 2 + (LineS.X2 - LineS.X1) ^ 2) 'ç§éé¿åº¦
len_M = Sqr((LineM.Y2 - LineM.Y1) ^ 2 + (LineM.X2 - LineM.X1) ^ 2) 'åéé¿åº¦
len_H = Sqr((LineH.Y2 - LineH.Y1) ^ 2 + (LineH.X2 - LineH.X1) ^ 2) 'æ¶éé¿åº¦
Call timer1_timer
End Sub
Private Sub timer1_timer() 'å®æ¶å¨çå®æ¶äºä»¶è¿ç¨
Dim s As Single, m As Single, h As Single
Form1.Caption = Time
s = Second(Time)
m = Minute(Time)
h = Hour(Time) + m /
'ç»å¶ç§é
LineS.X2 = LineS.X1 + len_S * Sin(pi * s / )
LineS.Y2 = LineS.Y1 - len_S * Cos(pi * s / )
'ç»å¶åé
LineM.X2 = LineM.X1 + len_M * Sin(pi * m / )
LineM.Y2 = LineM.Y1 - len_M * Cos(pi * m / )
'ç»å¶æ¶é
If h >= Then h = h -
LineH.X2 = LineH.X1 + len_H * Sin(pi * h / 6)
LineH.Y2 = LineH.Y1 - len_H * Cos(pi * h / 6)
End Sub
VB 6.0 教我编一个小程序
File--New--Standard.exe--点击左侧的Commandbutton控件
然后再Form1中用鼠标画出一个按钮
然后双击该按钮:写这段代码a = MsgBox("Hello,welcome to VB world!")
然后保存,运行
From1代码:
Private Sub Command1_Click()
End Sub
Private Sub Button_Click()
a = MsgBox("Hello,程序搭建跳转域名源码welcome to VB world!")
End Sub
Private Sub Form_Load()
End Sub
ç¨VBåä¸ä¸ªå°ç¨åº.
vb6代ç å¦ä¸ï¼æ·»å 模åï¼å·¥ç¨--å±æ§--å¯å¨å¯¹è±¡éæ©sub main
Sub main()
Open "c:\temp\.txt" For Input As #1
Clipboard.Clear
Clipboard.SetText StrConv(InputB(LOF(1), 1), vbUnicode)
End Sub
ç¨VBå¶ä½å°ç¨åº
Option Explicit
Private Sub Form_Load()
Randomize
Label1.Caption = Int((Rnd * ( - + 1)) + ) 'çæ-ä¹é´çéæºæ°
Timer1.Interval = 'ä¸ç§ä¸æ¬¡
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Static n As Integer
n = n + 1
If n = Then 'ä¸ç§ä¸æ¬¡ï¼ç´¯å å°æ¤å³ç§
n = 0
Randomize
Label1.Caption = Int((Rnd * ( - + 1)) + )
End If
End Sub
æé®é¢è¯·è¿½é®ï¼æ»¡æ请é纳ï¼å æ²¹ï¼