¤ÀÃþ |
¼ÐÃD |
¤j·N |
§@ªÌ |
¤é´Á |
µ{¦¡¥æ´« | ¦b VB ùذõ¦æ Dos ¤º«Ø©R¥O | ¡@ | ¤pà© | 1998/6/29 |
ÀÉ®×I/O | ¤G¶i¦ìÀɽƻs | For Binary | ¡@ | ¡@ |
ÀÉ®×I/O | ¨âÀɦX¨Ö¦¨¤@ÀÉ | ¡@ | ¦Ñ©Ç | 1998/7/8 |
ÀÉ®×I/O | °O¿ý¹q¸£¶}¾÷®É¶¡ | ¡@ | ¦Ñ©Ç | 1998/8/11 |
ª«¥ó¥Îªk | StdPicture ªº Scale ´«ºâ | vbHimetric »P Twip | ¤p¿« | 1998/7/4 |
ª«¥ó¥Îªk | ¦C¦L¦V¥k¹ï»ô | Printer ª«¥óªº¨Ï¥Î | ¦Ñ©Ç | ¡@ |
ª«¥ó¥Îªk | VB ªº±m¦â¤å¦r¦C¦L | Printer.ColorMode ªº¨Ï¥Î | ¦Ñ©Ç | 1998/8/1 |
ª«¥ó¥Îªk | ÅX°Ê¦Lªí¾÷ªº°ò¥»«ü¥O | Printer ª«¥óªº¨Ï¥Î | ¦Ñ©Ç | 1998/8/9 |
¬yµ{±±¨î | ¤ñ Timer §óºë½Tªºp®É | §â Time ÁÙ즨 Double «¬ºA | ¦Ñ©Ç | 1998/7/14 |
¬yµ{±±¨î | ¤@Ó²³æªº¶i«×ªí | ¡@ | ¦Ñ©Ç | 1998/8/10 |
¤¸¥ó¥Îªk | ¦b TextBox ùتº´«¦æ | ´«¦æ¦r¤¸ªº¨Ï¥Î | ¦Ñ©Ç | 1998/8/1 |
¬É±¥~Æ[ | ÀH¤ß©Ò±ýªº¾î¦C»PÁa¦C | °}¦C¤¸¥óªº Align | ¦Ñ©Ç | 1998/7/16 |
¬É±¥~Æ[ | ¥¶¶ªºÁä½L²¾°Ê | Â\²æÁä½L¦^À³³t²vªº¿ìªk | ¦Ñ©Ç | 1998/8/10 |
¬É±¥~Æ[ | ³sµoªº·Æ¹««öÁä | Åý·Æ¹«¤Þµo³sÄòªº¨Æ¥ó | ¦Ñ©Ç | 1998/8/11 |
¤¤¤å³B²z | ¦p¦ó§â¤¤¤å¤º½XÂন¤¤¤å | ¤£n§â VB ·íÊ¤Ñ | ¦Ñ©Ç | 1998/7/17 |
ÅܼƳB²z | ¥Î Array() «Å§i¦hºûÅÜ¼Æ | Collection «¬ºAªºÅÜ¼Æ | ¦Ñ©Ç | 1998/8/3 |
ÅܼƳB²z | Åܼƫŧiªº¦w¥þ°ÝÃD | ¦h¤Hµ{¦¡¶}µoªºª`·N¨Æ¶µ | ¦Ñ©Ç | 1998/8/8 |
ÅܼƳB²z | ÅܼÆÈ®ø¥¢¤F | ¤£¦PªºÅܼơA¬Û¦Pªº¦WºÙ¡C | ¦Ñ©Ç | 1998/8/9 |
¥j©Ç³B²z | ¤£¸Ó·¸¦ìªº·¸¦ì | ¡@ | ¦Ñ©Ç | 1998/8/9 |
¥j©Ç³B²z | µLªk¦b With °Ï¶ô¤¤°õ¦æªº°Ê§@ | ¡@ | ¦Ñ©Ç | 1998/8/11 |
±H¥óªÌ: ¤pà©
§Ú·|¥Î shell °õ¦æ dos «ü¥O¤F¡A¦pªGn dir or cls ....shell("command.com /c dir")´N¥i¥H¤F.... ¬Æ¦Ü©ó copy ¤]¥i¥H.....¸Õ¤F¦n¤[...¯u²Ö
¦Ñ©Çµª¡G
Dim Buff() As Byte '³]©w¤@Ó Byte«¬§Oªº°}¦C
Open "C:\temp\TestA.exe"
For Binary As #1 ' ¶}±Òì©lÀÉ®×
ReDim Buff(LOF(1) - 1) '«·s³]©w°}¦C¤j¤p
Get #1, , Buff()
Close #1 'Ãö³¬ÀÉ®×
Open "c:\temp\TestB.EXE" For Binary
As #1
Put #1, , Buff() '±N TEMP()¤¤ªº¸ê®Æ¼g¨ìÀÉ®×½s¸¹1ªºÀÉ
Close #1
¡°³o¬O±q¤@¦ì tw.bbs.comp.language ªº sonora ª©¤Íªºµ{¦¡§ï¼gªº ¡°
¦Ñ©Ç ¦b programming ª©´£¨ì:
½Ð°Ý¦³¨º¦ì°ª¤âª¾¹D¡AStdPicture ªº Width ©M Height n«ç¼Ë¸ò twip ´«ºâ¡C
¤p¿«µª¡G
·R¼wµØ ¼¶¼g©ó¤å³¹
½Ð°Ý¦U¦ì¡A¦³¤°»ò¤èªk¥i¥H¦p COPY A+B=Cªº¤è¦¡¥ÎVB±N¨âÓÀɮ׬ۥ[ ?
¦Ñ©Çµª¡G
Dim GetHandle As Integer, PutHandle
Dim Buff() As Byte
'¶}¦X¨ÖÀÉ C.txt
PutHandle = FreeFile
Open "c:\test\c.txt" For Binary
Access Write As #PutHandle
'¶}¨Ó·½ÀÉ A.txt
GetHandle = FreeFile
Open "c:\test\a.txt" For Binary
Access Read As #GetHandle
ReDim Buff(LOF(GetHandle) + 1)
'¥Î Buff ¨ú±o¸ê®Æ
Get #GetHandle, , Buff
Close #GetHandle
'¥[¤W´«¦æ¤ÎÂk¦ì¦r¤¸
Buff(UBound(Buff) - 1) = 13
Buff(UBound(Buff)) = 10
'©ñ¨ì C.txt ùØ
Put #PutHandle, , Buff
'¶}¨Ó·½ÀÉ B.txt
GetHandle = FreeFile
Open "c:\test\b.txt" For Binary
Access Read As #GetHandle
ReDim Buff(LOF(GetHandle) - 1)
'¥Î Buff ¨ú±o¸ê®Æ
Get #GetHandle, , Buff
Close #GetHandle
'©ñ¨ì C.txt ùØ
Put #PutHandle, , Buff
'Ãö±¼¦X¨ÖÀÉ
Close #PutHandle
End Sub
Bonjour ¼¶¼g©ó¤å³¹
¦pªGnpºâ¨ì¤ñ¤d¤À¤§¤@¬í¤pªº®É¶¡,n«ç¼Ë°µ©O??
¦Ñ©Çµª¡G
Option Explicit
'ºë±Kp®É¾¹¨ç¼Æ¡A¥i¶Ç¦^ ®É¡B¤À¡B¬í¤Î ¬í¤U¥|¦ì¼Æ
Private Function MiniTimer(ByVal FTime As Double, ByVal STime As Double)
Dim ReArray(3) As Integer
Dim CalcTime As Double
CalcTime = STime - FTime
ReArray(0) = Hour(CalcTime)
ReArray(1) = Minute(CalcTime)
ReArray(2) = Second(CalcTime)
'§â¤é®É¤À¬í¥h±¼
CalcTime = CalcTime * 100000
CalcTime = CalcTime - Int(CalcTime)
'¬í¤U¨ú¥|ӼƦr,¨ä¾l¤£¥Î
CalcTime = CalcTime * 10000
CalcTime = Int(CalcTime)
ReArray(3) = CalcTime
MiniTimer = ReArray
End Function
Private Sub Form_Click()
Dim varAccept As Variant
Dim ATime As Double, BTime As Double
Dim I As Long
Me.MousePointer = 11
ATime = Now
For I = 0 To 10000000
Next
BTime = Now
varAccept = MiniTimer(ATime, BTime)
Print "®É ¡G" & varAccept(0)
Print "¤À ¡G" & varAccept(1)
Print "¬í ¡G" & varAccept(2)
Print "·L¬í¡G" & varAccept(3)
Me.MousePointer = 0
End Sub
³]pªºì²z¬O VB ªº Date «¬ºA¡A¨ä¹ê´N¬O Double «¬ºA¡A¥¦¬O¥Î¾ã¼Æ¤¦ì¥Nªí¦~¤ë¤é¡A¤p¼Æ¤¦ì¥Nªí®É¤À¬í¡A¤p¼Æ¥H«á§óºë·Lªº¼Æ¦r¥¦´N¤£ºÞ¤F¡C¦]¦¹¾e¨ú¤p¼Æ¤¦ì¥H«áªº¼Æ¦r¡AÀ³¸Ó´N¬O¤ñ¬í§ó¤pªºp¼Æ¤F¡C¦Ü©ó¦¹ºØ¶Ç¦^ȬO§_¯uªººë·Ç¤Î¦³¹ê½è¤Wªº·N¸q¡A½Ð°ª¤â¬Ý¨ì¦¹½g®É¡A¶}¾É§Ú¤@¤U¡C
simonsays ¼¶¼g©ó¤å³¹
vb¦C¦L³øªí½Ð°Ý¦p¦ó¾a¥k¹ï»ô
¦Ñ©Çµª¡G
'«Å§i¦C¦L¦r¦ê
Dim PrintString As String
'«Å§i¦C¦L¦r¦ê¼e«×
Dim StrWidth As Single
'§An¿é¥Xªº¦r¦ê
PrintString = "You can say something"
'pºâ¦r¦ê¼e«×
StrWidth = Printer.TextWidth(PrintString)
'³]©w¦L¦rÀY¾î¦V¦ì¸m
Printer.CurrentX = Printer.ScaleWidth -
StrWidth
'¦Lªí¾÷¦L¥X¸Ó¦r¦ê
Printer.Print PrintString
¤p½÷ ¼¶¼g©ó¤å³¹
²{¦b§Ú¦³ 10 Óª«¥ó ex: button¡A·Q¥Îµ{¦¡Åý¥¦¦³®Éª½ªº±Æ¤@¦C¡A¦³®É¾îªº¤@¦C·Q½Ð°Ý¤@¤U³o¦³¥i¯à¶Ü???????
¦Ñ©Çµª¡G
·íµM¥i¥H¡A©³¤U¬O Command Button Áa¾î¤j¾\§L¸Õ§@¡G
'§â³o¤@¬q¶K¨ì°O¨Æ¥»¡A°ÆÀɦW¦s¦¨ .frm ¡A
'´N¬O VB ªº Form ÀÉ¡A¬Ù¥h¦Û¤vµe form¡C
'--------------- Cut Here ---------------------
VERSION 5.00
Begin VB.Form Form1
Caption
= "Form1"
ClientHeight = 4800
ClientLeft =
60
ClientTop =
345
ClientWidth =
4815
LinkTopic =
"Form1"
ScaleHeight =
4800
ScaleWidth =
4815
StartUpPosition = 3 '¨t²Î¹w³]È
Begin VB.CommandButton cmdAlign
Caption
= "¥k"
BeginProperty Font
Name
= "·s²Ó©úÅé"
Size
= 12
Charset
= 136
Weight
= 700
Underline
= 0 'False
Italic
= 0 'False
Strikethrough
= 0 'False
EndProperty
Height
= 495
Index
= 3
Left
= 2760
TabIndex
= 4
Top
= 2160
Width
= 495
End
Begin VB.CommandButton cmdAlign
Caption
= "¥ª"
BeginProperty Font
Name
= "·s²Ó©úÅé"
Size
= 12
Charset
= 136
Weight
= 700
Underline
= 0 'False
Italic
= 0 'False
Strikethrough
= 0 'False
EndProperty
Height
= 495
Index
= 2
Left
= 1800
TabIndex
= 3
Top
= 2160
Width
= 495
End
Begin VB.CommandButton cmdAlign
Caption
= "¤U"
BeginProperty Font
Name
= "·s²Ó©úÅé"
Size
= 12
Charset
= 136
Weight
= 700
Underline
= 0 'False
Italic
= 0 'False
Strikethrough
= 0 'False
EndProperty
Height
= 495
Index
= 1
Left
= 2280
TabIndex
= 2
Top
= 2640
Width
= 495
End
Begin VB.CommandButton cmdAlign
Caption
= "¤W"
BeginProperty Font
Name
= "·s²Ó©úÅé"
Size
= 12
Charset
= 136
Weight
= 700
Underline
= 0 'False
Italic
= 0 'False
Strikethrough
= 0 'False
EndProperty
Height
= 495
Index
= 0
Left
= 2280
TabIndex
= 1
Top
= 1680
Width
= 495
End
Begin VB.CommandButton cmdButton
Caption
= "1"
BeginProperty Font
Name
= "·s²Ó©úÅé"
Size
= 9.75
Charset
= 136
Weight
= 700
Underline
= 0 'False
Italic
= 0 'False
Strikethrough
= 0 'False
EndProperty
Height
= 495
Index
= 0
Left
= 720
TabIndex
= 0
Top
= 480
Width
= 495
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'button °}¦C¶}©l±Æ¦C¦ì¸m
Dim XPos As Single, YPos As Single
'³]©w button ¤j¤pªºÅܼÆ
Dim cmdWide As Single
'³]©w¹ï»ôÃä¬Éªº¤è¦¡
Dim ButtonAlign As Integer
Private Sub cmdAlign_Click(Index As Integer)
'¨Ì index ȧïÅÜ ButtonAlign ªº¤è¦¡
ButtonAlign = Index + 1
'IJµo Resize µ{§Ç
Form_Resize
End Sub
Private Sub cmdButton_Click(Index As Integer)
'¨SÔ£¤Ó¤j·N«ä¡A¦nª±¦Ó¤w¡C
MsgBox "§Ú¬O [" + Trim(CStr(Index
+ 1)) + _
"] ¸¹«ö¯Ã", vbOKOnly, "Button ¥\¯à"
End Sub
Private Sub Form_Load()
Dim I As Integer
'Load 9 Ó Button ¶i¨Ó
For I = 1 To 9
Load cmdButton(I)
'¨Ì¦¸µ¹©wÅã¥ÜÈ
cmdButton(I).Caption =
Trim(CStr(I + 1))
'load ¶i¨Óªºª«¥ó
visible=false
'n visible=true
¤~¯à¬Ý¨£
cmdButton(I).Visible =
True
Next
'¥ý³]©w¹ï»ô¤è¦¡¬°¦V¤W¹ï»ô
ButtonAlign = 1
End Sub
Private Sub Form_Resize()
'«·s³]©w button ¤j¤p,¨Ï¶ñº¡¾ãÓÃä¬É
If ButtonAlign = 1 Or ButtonAlign = 2 Then
cmdWide = Me.ScaleWidth
/ 10
Else
cmdWide = Me.ScaleHeight
/ 10
End If
'©I¥s§ïÅÜ button ¤j¤p Sub
cmdResize
End Sub
'§ïÅÜ button ¤j¤p Sub
Private Sub cmdResize()
Dim I As Integer
For I = 0 To 9
cmdButton(I).Width =
cmdWide
cmdButton(I).Height =
cmdWide
Next
'©I¥s³]©w±Æ¦CìÂI Sub
OrignXY
End Sub
'³]©w±Æ¦CìÂI Sub
Private Sub OrignXY()
Select Case ButtonAlign
'¦V¤W¹ï»ô
Case 1
XPos = Me.ScaleLeft
YPos = Me.ScaleTop
'©I¥s¾î±Æ Sub
WPutButton
'¦V¤U¹ï»ô
Case 2
XPos = Me.ScaleLeft
YPos = Me.ScaleHeight - cmdWide
'©I¥s¾î±Æ Sub
WPutButton
'¦V¥ª¹ï»ô
Case 3
XPos = Me.ScaleLeft
YPos = Me.ScaleTop
'©I¥sª½±Æ Sub
HPutButton
'¦V¥k¹ï»ô
Case 4
XPos = Me.ScaleWidth - cmdWide
YPos = Me.ScaleTop
'©I¥sª½±Æ Sub
HPutButton
End Select
End Sub
'¾î±Æ¨ç¼Æ
Private Sub WPutButton()
Dim I As Integer
For I = 0 To 9
'¤W¤U¦ì¸m¤£ÅÜ¡A¦V¥k»¼¼W
cmdButton(I).Move I *
cmdWide, YPos
Next
End Sub
'ª½±Æ¨ç¼Æ
Private Sub HPutButton()
Dim I As Integer
For I = 0 To 9
'¥ª¥k¦ì¸m¤£ÅÜ¡A¦V¤U»¼¼W
cmdButton(I).Move XPos,
I * cmdWide
Next
End Sub
'----------- End Here
--------------------------------
³s³s ¼¶¼g©ó¤å³¹
§Ú·Q§Q¥ÎChr()§â¤¤¤å¤º½XÂন¤¤¤å¦rÅã¥Ü¥X¨Ó¡G
¦Ñ©Çµª¡G
½Ð¤£n§Ñ¤F VB ªº¼Ð·Ç¦r½X¬O Unicode ¡A¬O Two Byte ªº¦r½X¡A¤£»Ýn¹³ Ansi(One Byte) ¤@¼Ë©î¶}¨Ó¦A¦X¤@°_¡A¦Ó¥B VB ¤£¤ä´© Chr(128)~Chr(255) ªº¦r½X¡A©Ò¥H¬OªÅ¥Õ¡C½Ðª½±µ Chr(&HB3CC) §Y¥i¡A¤U±ªº¦¡¤l«h¦b¤º½XÂà´«¤¤«Ü¦³¥Î¡C
Dim PutCode As String
PutCode = "B3CC"
Print Chr("&H" + PutCode)
angel tear ¼¶¼g©ó¤å³¹
¦b Visual BASIC ¤¤¦p¦ó¥Î¦Lªí¾÷¦L¥X±m¦â¤å¦r¡H§Ú³]¤F Printer.ForeColor ÄݩʡA¦ý¬O¦L¥X¨Ó³£¬O¶Â¦â¤å¦r¡C
¦Ñ©Çµª¡G
³®¦ ¼¶¼g©ó¤å³¹
¦b¤@Ó Multi-line `ªº Textbox ¤¤Åã¥Ü¦¨¨â¦æ?
¦Ñ©Çµª¡G
¥Áô ¼¶¼g©ó¤å³¹
¦bVB5 ¤¤¥i¥ÎARRAY()¨Óµ¹°}¦Cªì©lÈ,¦ý¥¦¦n¹³¥u¯à¥Î©ó¤@ºû, ¤£ª¾¦hºû°}¦C¦p¦óµ¹©wªì©lÈ?
¦Ñ©Çµª¡G
¨«¹L¤@©uÀéÄê ¼¶¼g©ó¤å³¹
§Ú¦b¤@Ó MDI Parent Form ¤¤ªº General ³¡¥÷«Å§i¤F¤@Ó ¦r¦êÅÜ¼Æ ¡G
Public MyStr as String
Private Sub Form_Load()
MyStr = "ABCDE"
End Sub
¦ý¦b¥t¤@Ó MDI Child Form ¤¤¨Ï¥Î MyStr ®É¥X¤F°ÝÃD , MyStr ªºÈ¥¢±¼¤F ,À³«ç¼Ë¼g¤~¹ï ?
¦Ñ©Çµª¡G
MyStr ¥[¤W MDIForm ªº¦WºÙ§Y¥i©I¥s¨ì¡A¦p Debug.Print MDIParentForm.Mystr¡C
Origin:·¦ªL·±¡
¤½¥ÎÅܼÆÀ³¸Ó«Å§i¦b .BAS Module¤¤§a!
¦Ñ©Çµª¡G
¥¼¥²¡ABAS Module ªº¤½¦@Åܼƫŧi¡AÁöµM¦³¨ä¦@³q©Ê¤Î¨Ï¥Î¤è«K¡A¦ý¦pªG¤@Ó±M®×¥Î¤F³\¦h¼Ò²Õ¡A©Î¬O¦h¤H¶}µoªº¦X¤O±M®×¡A«h©¹©¹¬O¨t²Î¿ù»~ªº¨Ó·½¡A¦]¬°¤£¦Pªº¼Ò²Õ¦pªG«Å§i¤F¦P¦WªºÅܼơA·|³y¦¨°õ¦æ¿ù»~¡A¦Ó¥B³oºØ¿ù»~¦b½sͶ¥¬q¬OµLªk¥Ñ½s;¹µo²{ªº¡A¤]¬O Bug ªº¨Ó·½¡C
¦ý¦b Form ªº¤½¦@Åܼƫŧi¡A«h¦]¦³ Form ¼Ò²Õªº°Ï¹j¡A¦]¦¹¤£·|¦³½Ä¬ðªº±¡ªpµo¥Í¡A³o¦b¦h¤H¶}µoÀô¹Ò¤Î¼Ò²Õ¾ã¦X¤W«O»Ù¤FÓ§O Form ªº¥¿½T°õ¦æ¤Î©¼¦¹©I¥sªº«K§Q¡C©Ò¥H¡A¦b³Ì¤jªº¥i¯à½d³ò¡A§ÚÌÀ³¤Ö¥Î BAS ªº Public Åܼƫŧi¡A¦Ó¥N¥H Form ªº Public «Å§i¡C
¹ï¿ù³£¬O¬°¤F·R ¼¶¼g©ó¤å³¹
Private Sub FindName_Click()
strInput = InputBox(........¬Ù)
dtaCrtve.Recordset.FindFirst "Name Like '*"
& RTrim(strInput) & "*'"
Private Sub NameOneMore_Click()
dtaCrtve.Recordset.FindNext "Name Like '*"
& RTrim(strInput) & "*'"
¥Ñ©ó¤GÓ¬O¤£¦Pªºµ{§Ç¡A©Ò¥HÅÜ¼Æ strInput ¦b¥Ñ InputBox ¿é¤J¨M©w«á¡A¨ì¤F NameOneMore ³oÓµ{§Ç´NÅܬ°ªÅ¦r¦ê¤F¡C§Ú·Q°Ýªº¬O¡An¦p¦ó§â strInput ÅܼƤº®e¥Ñ FindName ³oÓµ{§Çµ¹¶Ç»¼¨ì NameOneMore¡H
¦Ñ©Çµª¡G
(Xavier21) ªº¤j§@¤¤´£¨ì
dim i as double
i=1000*1000
µ²ªG³ºµM¥X²{·¸¦ìªº°T®§,¦Ó¥B§Ú¤À§O¦b§O¤Hªº¹q¸£¤W¤]°µ´ú,¸Õ,µ²ªGÁÙ¬O¤@¼Ë
¦Ñ©Çµª¡G
¦Ñ©Ç´¿¦^µª¬O Bug ¡A¦ý¸gª©¤W°ª¤â«üÂI¡A¤§©Ò¥H·|¦³¦¹ºØ²{¶H¡A¬O¦]¬° VB ¹Bºâªk«h¨ÏµM¡A¦]¬° VB ·|§â¨â¼Æ¹Bºâªºµ²ªG©ñ¨ì»P«á¤@Ó¹Bºâ¤¸¬Û¦P«¬ºAªºÅܼƤ¤¡A¥Ñ©ó 1000 ÄÝ©ó Integer ½d³ò¡A©Ò¥H 1000000 ¶W¹L Integer ªø«×¡A¦]¦¹²£¥Í·¸¦ì¿ù»~¡C
¦ý§Úı±o³o»ò»¡¬O¤£³qªº¡A¦]¬°¦pªG§Ṵ́õ¦æ i=0.111111111111111 * 1000 ©úÅ㪺¹Bºâµ²ªG¶W¹L¤F Integer ½d³ò¡A¦ý«o¨S¦³¿ù»~¡A¹Bºâµ²ªG¬O i=111.111111111111¡C
©Ò¥H©úÅ㪺 VB pºâªk«h¤£²Î¤@¦Ó¦³¨Ç¯É¶Ã¡A°µ¬°¤@ӨϥΪ̡A°£¤F´Á«Ý VB ¯à§ïµ½¦¹ÂI²V¶Ã¥~¡A©Î³\¥u¯à¥Î¬Yª©¤Í´£¨Ñªº¿ìªk¡A i=1000 * CDbl(1000) ±j¢«á¤@¹Bºâ¤¸Âন Double¨Ó«OÃÒµ{¦¡¤£¥X¿ù¡A©Ò¥H i ³Q«Å§i¬O¤°»ò«¬ºA¡A«á¹Bºâ¤¸´NnÂন¤°»ò«¬ºA¡A¬O«O»Ùµ{¦¡¤£¥X¿ùªº¿ìªk¡C
¦Ñ©Ç¡G
ºÃ´bªº¤H
±ý¥HKeyboard±±¨î¹Ï§Î²¾°Ê,¦p¦ó¤~¯à¨Ï¹Ï§Î²¾°Êªº§ó¬y§Q¡A¦Ó¤£·|¦³¥ý²¾°Ê¤@®æ ==> Delay ==> ¦A³sÄò¤£°±ªº²¾°Êªº²{¶H©O?
¦Ñ©Çµª¡G
- ½Ð§A¦bªí³æ¤W©ñ¤@Ó timer ¡Atimer.enabled=false
- ·í KeyDown ®É timer.enabled=true
- ·í KeyUp ®É timer.enabled=false
- ¦b timer ¨Æ¥óùؼg¹Ï§Î²¾°Ê±Ôz
- ¦p¦¹¼vÅT§A°õ¦æ³t«×ªº´N¥u¦³ KeyUp ©M KeyDown ¡A¨ä¥L´N¬O Timer.Interval ªº³]©w³t«×°ÝÃD¡A¦Ó¤£¦A¨ü¨ì KeyPress ¦^À³³t²vªº±±¨î¡C
- ¤U±¬O§Ú¼gªº¤@¬q¡A½Ð¦Û¦æ¤ñ¸û¬O§_¤ñ§¹¥þ¥Ñ KeyPress ¸û¶¶ºZ¡C
Option Explicit
Dim ¾î¦V As Integer
Dim Áa¦V As Integer
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Dim «D¤è¦V¶s As Boolean
Select Case KeyCode
Case vbKeyLeft
¾î¦V = -60
Áa¦V = 0
Case vbKeyRight
¾î¦V = 60
Áa¦V = 0
Case vbKeyUp
¾î¦V = 0
Áa¦V = -60
Case vbKeyDown
¾î¦V = 0
Áa¦V = 60
Case Else
«D¤è¦V¶s = True
End Select
If Not «D¤è¦V¶s Then
Timer1.Enabled = True
End If
End Sub
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
Timer1.Enabled = False
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
Timer1.Interval = 30
Me.WindowState = 2
Me.Show
Image1.Move (Me.ScaleWidth - Image1.Width) / 2, (Me.ScaleHeight -
Image1.Height) / 2
End Sub
Private Sub Timer1_Timer()
Image1.Left = Image1.Left + ¾î¦V
Image1.Top = Image1.Top + Áa¦V
End Sub
¦Ñ©Ç¡G
·Æ¹««öÁ䪺«öÁä²Õ¦X¡A»P«ezÁä½L«öÁä²Õ¦X¦³«Ü¤jªº¤£¦P¡C
Option Explicit
Dim Working As Boolean
Private Sub ContinueClick()
Dim I As Long
Do While Working
I = I + 1
Label1.Caption = I
DoEvents
Loop
End Sub
Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.Caption = ""
Working = True
ContinueClick
End Sub
Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Working = False
End Sub
ellen ¼¶¼g©ó¤å³¹
·í§Ú«ö¤U¤@Ó«ö¶s,³oÓ«ö¶s·|¥h°õ¦æforªº°j°é,¦Ó¦¹°j°é»Ý°õ¦æ¤@¬q®É¶¡...§Ú·Qn¦bµ¥«Ýªº®É¶¡¤¤,¼g¤@Ó¥X²{¦Ê¤À¤ñªºªF¦è.....·íµ{¦¡¶]§¹,¦¹¦Ê¤À¤ñ¤]µ²§ô...¤£ª¾vb¸Ó¦p¦ó¼g......
¦Ñ©Çµª¡G
Private Sub Command1_Click()
Dim I As Long
For I = 1 To 100000
'§Aªºµ{¦¡°Ê§@.........................
Label1.Caption = Format(I / 100000, "0%")
DoEvents
Next
End Sub
¥d¥¬¨ä¿Õ) ªº¤å³¹¤¤´£¨ì
¦p¦ó¼g¤@Óµ{¦¡....¦b¶}¾÷®É©Î¶iwin95¥H«á.....¿Ã¹õÅã¥Ü¥X¤W¦¸¶}¾÷®É¶¡.....
©_²§ªG ¼¶¼g©ó¤å³¹
§A¥i¥H¼g¤@Óµ{¦¡,¥Lªº¥\¯à¬O:
- Ū¨úDatabase¸Ì³Ì«á¤@µ§¬ö¿ý,¨Ã¥ÎMessageBoxÅã¥Ü¥X¨Ó
- ¬ö¿ý¸Óµ{¦¡°õ¦æ®Éªº®É¶¡,¦s¦¨¦ÛqªºDatabase®æ¦¡
- µM«á§âµ{¦¡©ñ¨ì"±Ò°Ê"¸Ì´N¥i¥H¤F.
sonic ¼¶¼g©ó¤å³¹
½Ð°Ý¥i§_¥Î¨ä¥L¤èªk©O¡H¦]¬°¥ÎDatabase¤S·|¥Î¨ìDAOªºDLL°Ú¡I
¦Ñ©Çµª¡G
Option Explicit
Private Sub Command1_Click()
Dim TimeCalc As Date
TimeCalc = Timer
Label1.Caption = "§Æ±æ¥»¹q¸£Åý±z¨Ï¥Î´r§Ö"
Do While Timer - TimeCalc < 1
DoEvents
Loop
Unload Me
End Sub
Private Sub Form_Load()
Dim Today As Date
Dim DayString As String
Dim PathString As String
Dim DateRec As Integer
Today = Now
PathString = App.Path
If Right(PathString, 1) <> "\" Then
PathString = PathString + "\"
End If
If Dir(PathString + "StartPc.log") <> "" Then
DateRec = FreeFile
Open PathString + "StartPc.log" For Input As #DateRec
Line Input #DateRec, DayString
Close #DateRec
Label1.Caption = "§A¤W¦¸¶}¾÷¬O[" & DayString & "]"
Else
Label1.Caption = "§A²Ä¤@¦¸¨Ï¥Î¥»¹q¸£"
End If
DateRec = FreeFile
Open PathString + "StartPc.log" For Output As #DateRec
DayString = Today
Print #DateRec, DayString
Close #DateRec
End Sub