¤ÀÃþ |
¼ÐÃD |
¤j·N |
§@ªÌ |
¤é´Á |
ÀÉ®× I/O | ¤å¦rÀɪº©w¦ì®æ¦¡¤Æ¿é¥X | Put # & Get # ªº¨Ï¥Î | ¦Ñ©Ç | 1998/4/30 |
ª«¥ó¥~Æ[ | ª«¥ó¸I¼²µ{¦¡¸Õ§@(¤@) | One Timer | ¦Ñ©Ç | 1998/4/30 |
ª«¥ó¥~Æ[ | ª«¥ó¸I¼²µ{¦¡¸Õ§@(¤G) | Two Timer | ¦Ñ©Ç | 1998/4/30 |
¹Ï§Î³B²z | ¦p¦ó«O¯d Paintpictrue ¼v¹³ | °õ¦æRefresh¤§«á¹Ï¤£¨£¤F | ¦Ñ©Ç | 1998/4/29 |
¹Ï§Î³B²z | ¹Ï±I´º³z©úªº§Þ¥© | ³z©ú¥|ªk | ¦Ñ©Ç | 1998/5/5 |
¹Ï§Î³B²z | °Ï¶ô¨ú¹Ï»P°Ï¶ô¶K¹Ï | PaintPicture() ªº°Ñ¼Æ¨Ï¥Î | ¦Ñ©Ç | 1998/5/5 |
®É¶¡´«ºâ | ¤é´Á®É¶¡®æ¦¡ªº¸ê®Æ«¬ºA | ¥H Now() ¨ç¼Æ¬°¨Ò | ¦Ñ©Ç | 1998/5/7 |
¦r¦ê³B²z | ¥Î VB 5.0 ºâ¦r¦êªø«× | StrConv() ªº LenB() ¨Ï¥Î | ¦Ñ©Ç | 1998/5/2 |
¦r¦ê³B²z | TextBox ¿é¤J¼Æ¦r | ¥H KeyPress Event ¬°¨Ò | ¦Ñ©Ç | 1998/5/15 |
¦r¦ê³B²z | TextBox ¨î¿é¤Jªø«× | ¥H TextBox_Change ¬°¨Ò | ¦Ñ©Ç | 1998/5/20 |
¦r¦ê³B²z | ¦p¦óÅã¥Ü "&" ¦r¤¸ | ¡@ | ¦Ñ©Ç | 1998/5/21 |
¦r¦ê³B²z | ¼Æ¦r©Î¦r¥À§PÂ_ | IsNumeric() ¨ç¼Æªº¨Ï¥Î | ¦Ñ©Ç | 1998/5/23 |
¦r¦ê³B²z | ¬ð¯} TextBox 32 K ªº¨î | Mid() ¨ç¼Æªº¨Ï¥Î | ¦Ñ©Ç | 1998/5/23 |
¦r¦ê³B²z | ¦r¥ÀÂন´`§Ç¼Æ¦r | Asc() ¨ç¼Æªº¨Ï¥Î | ¦Ñ©Ç | 1998/5/26 |
¦r¦ê³B²z | °O¨Æ¥»½s¿è¥\¯à¼ÒÀÀ | ClipBoard ª«¥óªº¨Ï¥Î | ¦Ñ©Ç | 1998/5/26 |
ÅܼƨϥΠ| ¦b°õ¦æ´Á²£¥Íª«¥ó | As ©M As New | ¦Ñ©Ç | 1998/5/19 |
ª«¥ó¤Þ¥Î | ¨Ï¥Î¶µ¥Ø»P¨Ï¥Î¤¸¥óªº¤À§O | ¡@ | ¦Ñ©Ç | 1998/5/22 |
ÀH¾÷¨ú¼Ë | ¦p¦ó§âµP¬~´²¬~¶Ã | Randomize ©M Rnd() ¨Ï¥Î | ¦Ñ©Ç | 1998/5/23 |
¬É±³B²z | ¥H Code §R°£¦r¦ê | Sendkeys ªº¨Ï¥Î | ¦Ñ©Ç | 1998/5/26 |
¬É±³B²z | TextBox.Text ªº¥þ¿ï¥\¯à | SelStart & SelLength ÄÝ©Ê | ¦Ñ©Ç | 1998/5/26 |
ÀH½t¡B±¤½t ¼¶¼g©ó¤å³¹
§Ú¨Ï¥Î¦p¤Uªºµ{¦¡½X
Form1.PaintPicture Form2.Picture, 100, 100, Form2.Picture.Width,
Form2.Picture.Height, , , , , vbSrcAnd
Form1.Refresh
¦b²Ä¤@Óstatement°õ¦æ§¹¹Ï·|¶K¹L¨ìform1,¦ýform1°õ¦æRefresh¤§«á¹Ï¤S¤£¨£¤F,½Ð°Ý¬°¦ó·|¦p¦¹??ÁÙ¦³¨º¸Ìnª`·Nªº¶Ü??
¦Ñ©Çµª¡G
Johnson ¼¶¼g©ó¤å³¹
¿é¥X¨ì¤å¦rÀÉ¡G
Y¦³¤ÓÄæ¦ìªº¸ê®Æ¡A¦p¦ó°µ¨ì©w¦ìªº«ü©w¡A¦p¦b²Ä´XÓ¦r¬°°_©lÂI¡A¹³c or fortran§@®æ¦¡¿é¥X¡A¥t¥~¦b³Ì«á¤@Ó¸ê®Æ¿é¥X«á¡A¦p¦ó¸õ¨ì¤U¤@¦Cªº²Ä¤@Ó¦r¤¸¡C½ÐÀ°¦£¤@¤U¡C
¦Ñ©Çµª¡G
'«Å§i¤@Ó¥]§t¤ÓÄæ¦ìªº¦Ûq§ÎºAÅܼÆ
Private Type Mytype
FirstName As String * 4
LastName As String * 4
ID_No As String * 10
Salary As Long
BirthDay As Date
End Type
'¦s©ñ¶}ÀÉ¥N¸¹ªºÅܼÆ
Dim F_Handle As Integer
'«Å§i MyRec ¬°¦Ûq§ÎºAÅܼÆ
Dim MyRec As Mytype
Private Sub Form_Load()
¡@'¥Î Freefile ¨ç¼Æ¨ú±o¶}ÀÉ¥N¸¹
¡@F_Handle = FreeFile()
¡@' For Random
¬O±Ä¥Î¶}ÀH¾÷ÀɼҦ¡¡ALen(MyRec) «h¬O«ü©w¨C¦¸Åª¤J
Mytype §ÎºA
¡@'¦Û©wÅܼƤ§¼e«×
Open "c:\temp\temp.txt" For Random
As #F_Handle Len = Len(MyRec)
¡@' ÀH«K¿é¤J¨Ç¸ê®Æ¡A¥H«KÆ[´ú¼g¤JÀɮפ§¥Î
MyRec.FirstName = "¹Å"
MyRec.LastName = "¾G"
MyRec.ID_No = "A1234"
MyRec.Salary = 5000
MyRec.BirthDay = #2/14/60#
¡@' ¥Î Put ¤èªk¡A§â MyRec ùتº¸ê®Æ¼g¨ì "c:\temp\temp.txt"
ùØ
Put #F_Handle, 1, MyRec
¡@'Éi¤W
MyRec.FirstName = "¥É"
MyRec.LastName = "¾G"
MyRec.ID_No = "A0034"
MyRec.Salary = 8000
MyRec.BirthDay = #5/15/60#
Put #F_Handle, 2, MyRec
¡@'¥Î Get ¤èªk±q "c:\temp\temp.txt"
ÀÉùØ®³¸ê®Æ¡A©ñ¨ì MyRec ùØ¡C
' [2] ªí¥Ü¨ú²Ä¤Gµ§°O¿ý
Get #F_Handle, 2, MyRec
Me.Show
Print "[³o¬O²Ä¤Gµ§°O¿ý]"
Print MyRec.FirstName
Print MyRec.LastName
Print MyRec.ID_No
Print MyRec.Salary
Print MyRec.BirthDay
¡@' [1] ªí¥Ü¨ú²Ä¤@µ§°O¿ý
Get #F_Handle, 1, MyRec
Print "[³o¬O²Ä¤@µ§°O¿ý]"
Print MyRec.FirstName
Print MyRec.LastName
Print MyRec.ID_No
Print MyRec.Salary
Print MyRec.BirthDay
¡@' Ãö³¬©Ò¶}¤§ÀÉ®×
Close #F_Handle
End Sub
VERSION 5.00
Begin VB.Form flishape
BackColor =
&H00FFFF80&
Caption
= "Form1"
ClientHeight = 3195
ClientLeft =
60
ClientTop =
345
ClientWidth =
4680
LinkTopic =
"Form1"
ScaleHeight =
3195
ScaleWidth =
4680
StartUpPosition = 3 '¨t²Î¹w³]È
Begin VB.Timer Timer1
Interval
= 1
Left
= 1800
Top
= 1320
End
Begin VB.Shape Shape2
BorderWidth
= 3
FillColor
= &H000000FF&
FillStyle
= 0 '¹ê¤ß
Height
= 855
Left
= 3360
Shape
= 4 '¶ê¨¤¯x§Î
Top
= 2040
Width
= 855
End
Begin VB.Shape Shape1
BorderWidth
= 3
FillColor
= &H0000FFFF&
FillStyle
= 0 '¹ê¤ß
Height
= 855
Left
= 600
Shape
= 4 '¶ê¨¤¯x§Î
Top
= 240
Width
= 855
End
End
Attribute VB_Name = "flishape"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Go_Oridging()
'Shape Âk¦ì¤èªk¡A¥Øªº¦b§ïÅܵøµ¡¤j¤p«á¡A_
'ÁקK Shape ±¼¨ìµøµ¡¥~
Shape1.Move 0, 0
Shape2.Move Me.ScaleWidth - Shape2.Width, _
Me.ScaleHeight - Shape2.Height
End Sub
Private Sub Form_Load()
Go_Oridging
End Sub
Private Sub Form_Resize()
Go_Oridging
End Sub
Private Sub Timer1_Timer()
'¨âÓ Shape ªº¥¿t¦V«ü¼Ð
Static Shp1XFwd As Integer, Shp1YFwd As Integer
Static Shp2XFwd As Integer, Shp2YFwd As Integer
'¨C¨B¨B¥ï
Static l_go As Integer
'³]©w¥¿t¦VªìÈ
If Shp1XFwd = 0 Then Shp1XFwd = 1
If Shp1YFwd = 0 Then Shp1YFwd = 1
If Shp2XFwd = 0 Then Shp2XFwd = -1
If Shp2YFwd = 0 Then Shp2YFwd = -1
l_go = 120
'Shape1 ªºÃä¬É³B²z
With Shape1
If .Left <0 Or .Left> Me.ScaleWidth
- .Width Then _
Shp1XFwd = Shp1XFwd * -1
If .Top <0 Or .Top> Me.ScaleHeight
- .Height Then _
Shp1YFwd = Shp1YFwd * -1
End With
'Shape2 ªºÃä¬É³B²z
With Shape2
If .Left <0 Or .Left> Me.ScaleWidth
- .Width Then _
Shp2XFwd = Shp2XFwd * -1
If .Top <0 Or .Top> Me.ScaleHeight
- .Height Then _
Shp2YFwd = Shp2YFwd * -1
End With
'Shape1 »P Shape2 ¸I¼²³B²z
If (Shape1.Left + Shape1.Width - Shape2.Left)
> 0 And _
Shape1.Left <(Shape2.Width + Shape2.Left) And _
(Shape1.Top + Shape1.Height - Shape2.Top) > 0 And _
Shape1.Top <(Shape2.Height + Shape2.Top) Then
'¸ô®|Âà¦V
Shp1XFwd = Shp1XFwd * -1
Shp2XFwd = Shp2XFwd * -1
Shp1YFwd = Shp1YFwd * -1
Shp2YFwd = Shp2YFwd * -1
End If
'²¾°Ê Shape1
Shape1.Move Shape1.Left + (Shp1XFwd * l_go), _
Shape1.Top + (Shp1YFwd * l_go)
'²¾°Ê Shape2
Shape2.Move Shape2.Left + (Shp2XFwd * l_go), _
Shape2.Top + (Shp2YFwd * l_go)
End Sub
³o¬O¥Î¨âÓp®É¾¹ªº¡A®ÄªG¤£¤@¼Ë¡C
VERSION 5.00
Begin VB.Form flishape
BackColor =
&H00FFFF80&
Caption
= "Form1"
ClientHeight = 3195
ClientLeft =
60
ClientTop =
345
ClientWidth =
4680
LinkTopic =
"Form1"
ScaleHeight =
3195
ScaleWidth =
4680
StartUpPosition = 3 '¨t²Î¹w³]È
Begin VB.Timer Timer2
Interval
= 100
Left
= 2400
Top
= 1320
End
Begin VB.Timer Timer1
Interval
= 10
Left
= 1800
Top
= 1320
End
Begin VB.Shape Shape2
BorderWidth
= 3
FillColor
= &H000000FF&
FillStyle
= 0 '¹ê¤ß
Height
= 855
Left
= 3360
Shape
= 4 '¶ê¨¤¯x§Î
Top
= 2040
Width
= 855
End
Begin VB.Shape Shape1
BorderWidth
= 3
FillColor
= &H0000FFFF&
FillStyle
= 0 '¹ê¤ß
Height
= 855
Left
= 600
Shape
= 4 '¶ê¨¤¯x§Î
Top
= 240
Width
= 855
End
End
Attribute VB_Name = "flishape"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Go_Oridging()
'Shape Âk¦ì¤èªk¡A¥Øªº¦b§ïÅܵøµ¡¤j¤p«á¡A_
'ÁקK Shape ±¼¨ìµøµ¡¥~
Shape1.Move 0, 0
Shape2.Move Me.ScaleWidth - Shape2.Width, _
Me.ScaleHeight - Shape2.Height
End Sub
Private Sub Form_Load()
Go_Oridging
End Sub
Private Sub Form_Resize()
Go_Oridging
End Sub
Private Sub Timer1_Timer()
'Shape ªº¥¿t¦V«ü¼Ð
Static Shp1XFwd As Integer, Shp1YFwd As Integer
'¨C¨B¨B¥ï
Dim l_go As Integer
'³]©w¥¿t¦VªìÈ
If Shp1XFwd = 0 Then Shp1XFwd = 1
If Shp1YFwd = 0 Then Shp1YFwd = 1
l_go = 120
'Shape1 ªºÃä¬É³B²z
With Shape1
If .Left <0 Or .Left> Me.ScaleWidth
- .Width Then _
Shp1XFwd = Shp1XFwd * -1
If .Top <0 Or .Top> Me.ScaleHeight
- .Height Then _
Shp1YFwd = Shp1YFwd * -1
End With
'Shape1 »P Shape2 ¸I¼²³B²z
If (Shape1.Left + Shape1.Width - Shape2.Left)
> 0 And _
Shape1.Left <(Shape2.Width + Shape2.Left) And _
(Shape1.Top + Shape1.Height - Shape2.Top) > 0 And _
Shape1.Top <(Shape2.Height + Shape2.Top) Then
'¸ô®|Âà¦V
Shp1XFwd = Shp1XFwd * -1
Shp1YFwd = Shp1YFwd * -1
End If
'²¾°Ê Shape1
Shape1.Move Shape1.Left + (Shp1XFwd * l_go), _
Shape1.Top + (Shp1YFwd * l_go)
End Sub
Private Sub Timer2_Timer()
Static Shp2XFwd As Integer, Shp2YFwd As Integer
Dim l_go As Integer
If Shp2XFwd = 0 Then Shp2XFwd = -1
If Shp2YFwd = 0 Then Shp2YFwd = -1
l_go = 120
'Shape2
ªºÃä¬É³B²z
With Shape2
If .Left <0 Or .Left> Me.ScaleWidth
- .Width Then _
Shp2XFwd = Shp2XFwd * -1
If .Top <0 Or .Top> Me.ScaleHeight
- .Height Then _
Shp2YFwd = Shp2YFwd * -1
End With
'Shape1 »P Shape2 ¸I¼²³B²z
If (Shape1.Left + Shape1.Width - Shape2.Left)
> 0 And _
Shape1.Left <(Shape2.Width + Shape2.Left) And _
(Shape1.Top + Shape1.Height - Shape2.Top) > 0 And _
Shape1.Top <(Shape2.Height + Shape2.Top) Then
'¸ô®|Âà¦V
Shp2XFwd = Shp2XFwd * -1
Shp2YFwd = Shp2YFwd * -1
End If
'²¾°Ê Shape2
Shape2.Move Shape2.Left + (Shp2XFwd * l_go), _
Shape2.Top + (Shp2YFwd * l_go)
End Sub
¶Àª÷²´ ¼¶¼g©ó¤å³¹
°²³]§ÚŪ¶i¤@Ó¦r¦ê¡A¦¹¦r¦ê¥i¯à¤º§t¤¤¤å¦r¡A§Ú·Qºâ¥X¸Ó¦r¦êªºªø«×¡A¸Ó¦p¦ó³B²z¡CEX : "abc¤¤¤å" ªºªø«×§Ú·Qºâ¦¨ 7¡C
¦Ñ©Çµª¡G
©p¬O§Ú¤µ¥Íªº·s®Q ¼¶¼g©ó¤å³¹
½Ð°Ý¤@ ¤U vb¤¤ ªº¹Ï± [I´º] ¥i¥H³]¦¨³z©úªº¹À?? Y¥i¥H¨ºn¦p¦ó¥Î©O???
¦Ñ©Çµª¡G
GIF 89A
MeTalFile (°ÆÀɦW *.wmf or *.emf)
¹Ï¥ÜÀÉ (°ÆÀɦW *.ico)
¨È¨È ¼¶¼g©ó¤å³¹
§Ún¦b picture1 ¤¤½Æ»s picture2 ªº¹Ï¡A¦ý¬On¥¦±qpicture1ªº¥k¤W¨¤¶}©l¥X²{¡A¬O¥ÎpaintPicture³oÓ¤èªk¨Ó¼gªº³á¡I
¦Ñ©Çµª¡G
²{¦b°²³]§ÚÌn¨ú Picture2 ¥ª¤U¨¤¡A20 ¥¤èÂIªº¹Ï¶K¦b picture1 ªº¥k¤W¨¤¡A¨º«ü¥O¬O³o¼Ë¤U¡G
picture1.paintpicture picture2.picture,picture1.scalewidth-20,0,20,20,0,picture2.scaleheight-20,20,20
¥D¦®: Re: ½Ð°ÝVB5¤¤«ç»òºâ®É¶¡
¦Ñ©Çµª¡G
¨g¼É¤§¬P ¼¶¼g©ó¤å³¹
§Ún¦btext ¤U...°²¦p¬O¨î¼Æ¦r...¤£¯à¦³¦r¤¸..n¥Î¤°»ò¨Ï¥Î...³Â·Ð¤@¤U..:
¦Ñ©Çµª¡G
Private Sub Text1_KeyPress(KeyAscii As Integer)
'KeyAscii 32 ¥H¤U¬O¤@¨Ç±±¨îÁä¡AÄdºI·|³y¦¨¾Þ§@»Ùê
If KeyAscii >= 33 Then
If KeyAscii <= vbKey9 And KeyAscii>= vbKey0 Then
Else
'§â KeyAscii ³]¬° 0 ´N¬O¨ú®ø¿é¤J
KeyAscii = 0
MsgBox "¤£¥i¿é¤J«D¼Æ¦r¦r¤¸"
End If
End If
End Sub
³ßÅw¿ß«}ªº¶Àª÷¹«
½Ð°Ý¦U¦ì°ª¤â:VB 5.0 n¦p¦ó¦bRun Time, °ÊºACreate new Object? Thank you!
¦Ñ©Çµª¡G
§A¦b VB Run Time, ·Q°ÊºA Create new Object¡An¬Ý Object ªº¯S©Ê¡A¦pªG Object ¬O VB Global ùتº Object¡A¤£¨ã¦³ Control ªºÄÝ©Ê¡A¨º¥Î Dim YourObjectName As New VBObject ªº¤è¦¡«Å§i¡A¦pªG§A¥Îªº¬O VB5.0 ¡A¦b§A¿é¤J New ªÅ¤@®æ«á¡A¨t²Î·|³qª¾§A¨º¨Ç Object ¬O¥i¥H Dim As New ªº(¤£¤Ó¦h¡A¥u¦³´X¶µ)¡C
¦pªG§An«Å§iªº Object ¬O Control(´N¬O¥i¥H©ñ¨ì Form ±ªO¤Wªº¨º¨ÇªFªF)¡A½Ð¥ý¦b³]p¶¥¬q¥¬¸m¤@Ó¦PÃþ«¬ªº Control ¨ì Form ¤W¡A¨Ã¦b Control.Index ÄÝ©ÊȤWµ¹¤@Ó¯Á¤ÞÈ(³q±`¬O 0)¡A¨ì¤F°õ¦æ¶¥¬q¡A´N¥i¥H¤£»Ý¥ý¦æ«Å§i¡Aª½±µ¥H Load TestComman(1),Load TestCommand(2)......¡A¨Ó°ÊºA¼W¥[¡A¤£¹L¥Î§¹½Ð¥H Unload ÄÀ©ñ±¼¡A¥H¾i¦¨¸`¬Ù°O¾ÐÅ骺¨}¦n²ßºD¡C
¦³¤@ÂIn¯S§Oª`·N¡A©Ò¦³ Load ¶i¨Óªº Control.Visible Äݩʳ£¬O False¡An§â¥¦§ï¦¨ True ¤~·|Åã²{¡A©Ò¥H Load §¹¥H«á¬Ý¤£¨£¡A¤£n¥H¬°¬O Load ¥¢±Ñ¡Aè Load ¶i¨Óªº Control ªº¦ì¸m¬OÅ|¦bì Control ¤Wªº¡An°µ Move °Ê§@¤~·|¤À¬°¨âÓ¡C
³Ì«á°µ¤@Á`¾ã²z¡G
±H¥óªÌ: Annie Chiu
¦bVB¤¤¨Ï¥Îtext ªºmaxlength ÄÝ©Ê,§Úªº¸ê®ÆÄæ¦ìªø«×¬°10, ¦p¦ó±±¨îtext ¥u¯à¿é¤J10Ó^¤å¦r, ©Î5Ó¤¤¤å¦r©O¡H
¦Ñ©Çµª¡G
©ñ¤@Áû¤ß.. ¼¶¼g©ó¤å³¹
§Ún¦p¦ó¦bLabel¤¤Åã¥Ü"&"³o¤@Ó¦r¤¸!!¦]¬°¦pªGª½±µ¥´"&"¦n¹³·|Åܦ¨under line.....
¦Ñ©Çµª¡G
³s¥´ "&&" ¨âÓ¡C
¤ß¥Xµo ¼¶¼g©ó¤å³¹
¦bvb5ªºÀô¹Ò¤U¡A±M®×/³]©w¨Ï¥Î¶µ¥Ø »P ±M®×/³]©w¨Ï¥Î¤¸¥ó ¦³¦ó¤£¦P©O¡H
¦Ñ©Çµª¡G
¬~µPªº³]p¼Ò«¬¡G
¨ä¹ê§âµP¬~´²¶}¨Ó¡A¬O¦³¥¦ªº¬~µP¼Ò«¬¦bªº¡A¾Ú¦Ñ©Ç©Ò·Q¨ìªº´N¦³¤U¦C´XºØ¡G
¥i¥H·Q¹³¦¨ n ±iµP¤@¦r±Æ¶}¡A¥ô¨ú¨â±i¤¬´«¡A´«·U¦h¦¸µP·U¶Ã¡C
¥i¥H·Q¹³¦¨ n ±iµP´N¦³ n Ó¦ì¸m¡A¦Ó©Ò¦³ªºµP³£©ñ¦b¥tÓ½c¤lùØ¡A¬~µP®É³v¤@¥ÑµP½c¤¤ÀH¾÷©â¥X¤@±i©ñ¦b¦ì¸m¤W¡A¨C¤@±iµP¤@©w·|³Q©â¨ì¤@¦¸¡A¦Ó¥B¥u·|³Q©â¨ì¤@¦¸¡A©âµP¦¸¼Æ´N¬OµP±i¼Æ¡C
¬~µPªº³]p¹ê¨Ò¡G
¤U±¬O§Ú¥Î 2.ÀH¾÷±Æ¦Cªk©Ò¼g VB Code¡A½Ð²³®a°ª¤â«ü±Ð¡G
Option Explicit
'«Å§i¼³§JµP¥|Óªá¦âªº±`¼Æ
Const CardSpear As Integer = 0
Const CardHeart As Integer = 1
Const CardDimond As Integer = 2
Const CardClub As Integer = 3
'«Å§i¤@Ó¦s©ñ¼³§JµPªá¦â¡BÂI¼Æªº¦ÛqÅܼƫ¬ºA
Private Type GameCard
'¼³§JµPªá¦â
CardColor As Integer
'¼³§JµPÂI¼Æ
CardNum As Integer
End Type
'«Å§i¦s©ñ 52 ±i¼³§JµPªºÅܼÆ
Private Poker(51) As GameCard
Private Sub Command1_Click()
'I,J,K ¬Ò°µ¬°°j°ép¼Æ¾¹¨Ï¥Î
Dim I As Long, J As Integer, K As Integer
'TempCard ¥Î¬°µP¸ê®Æ¤á´«ªº¼È¦s°Ï¡ARndRec
Àx¦s¶Ã¼ÆÈ¡C
Dim TempCard As GameCard, RndRec As Long
'§âªá¦â¥Nªí¼Æ´«¦^¦r¦êªº¼È¦sÅܼÆ
Dim ColorWord As String
'±Ò°Ê¶Ã¼ÆºØ¤l
Randomize
'§â¦Uªá¦âµP¸Ë¶i Poker °}¦CùØ
For J = 0 To 3
For K = 1 To 13
'¯Âºé¨¾¤î Poker ·¸¦ì¦Ó¤w¡A¦pªG§A½T©w¦Û¤v
'pºâµL»~¡A¥i¥H®³±¼³oÓ§PÂ_¦¡
If I > UBound(Poker) Then
Exit For
End If
Poker(I).CardColor = J
Poker(I).CardNum = K
I = I + 1
Next
Next
'¶}©l¥Î¶Ã¼Æ¬~µP¡A°ò¥»ªº³]pì²z¬O°²³]¼³§J¬O©ñ¦b©â¨ú½cùØ¡A
'nµoµP®É¦A¤@±i±i¥Ñ½c¤¤ÀH¾÷©â¥X¡A¨Ì§Ç±Æ¦n¡A¯S¦â¬O½c¤¤©Ò¦³
'ªºµP³£³Q©â¨ì¤@¦¸¡A¦Ó¥B¥u·|³Q©â¨ì¤@¦¸¡C
For I = UBound(Poker) To 1 Step -1
'¨ú¤@Ó¾ã¼Æ¶Ã¼Æ¨Ó©â¤@±iµP
RndRec = Int((I + 1) *
Rnd)
'§â¿ï¨ìªºµPªá¦â¤ÎÂI¼Æ¸ê®Æ¥æµ¹
TempCard
TempCard.CardColor =
Poker(RndRec).CardColor
TempCard.CardNum =
Poker(RndRec).CardNum
'§â²Ä I
±iµPªº¸ê®Æ²¾¨ì¿ï¨ìªºµP¤W
Poker(RndRec).CardColor
= Poker(I).CardColor
Poker(RndRec).CardNum
= Poker(I).CardNum
'§â TempCard
ùتº¸ê®Æ²¾¨ì²Ä I ±iµP¤W
Poker(I).CardColor =
TempCard.CardColor
Poker(I).CardNum =
TempCard.CardNum
Next
'§â±Æ¦nªº Poker Åã¥Ü¤@¤U
List1.Clear
For I = 0 To UBound(Poker)
Select Case Poker(I).CardColor
Case CardSpear
ColorWord = "Spear\"
Case CardHeart
ColorWord = "Heart\"
Case CardDimond
ColorWord = "Dimond\"
Case CardClub
ColorWord = "Club\"
End Select
List1.AddItem
ColorWord & Poker(I).CardNum
DoEvents
Next
End Sub
Â÷ ·T ¼¶¼g©ó¤å³¹ ...
½Ð°Ý§â¨Ï¥ÎªÌ©Ò¿é¤Jªº¤@¦ê¤å¦r,¦U§O©î¶}«á...¸Ó¦p¦ó §PÂ_Ó§O¦r¥À¬O§_¬°¼Æ¦r©Î¦r¥À°Ú?!
¦Ñ©Çµª¡G
½Ð§Q¥Î IsNumeric ¨ç¼Æ¡A¨Ã°Ñ¦Ò¤U± Vb Code
Dim I As Long, ShortString As String
For I = 1 To Len(Text1.Text)
ShortString = Mid(Text1.Text,
I, 1)
Debug.Print
"[" & ShortString & "]" & _
IIf(IsNumeric(ShortString), "¬O", "¤£¬O")
& _
"¼Æ¦r¦r¦ê"
Next
mason ¼¶¼g©ó¤å³¹
¦bVisual Basic¤¤,TextBox©Ò¯àÅã¥ÜªºText¥u¦³32K Bytes,Yn¦P®ÉÅã¥Ü 32K BytesªºText®É,n¦p¦ó¸Ñ¨M???
¦Ñ©Çµª¡G
Â÷ ·T ¼¶¼g©ó¤å³¹ ...
½Ð±Ð¥ý¶i...¦p¦óÅý¨Ï¥ÎªÌ¿é¤Jªº¦r¤¸"A"Âন10,"B"Âন11, "C"Âন12....µ¥...¨Ì¦¹Ãþ±À©O?!
¦Ñ©Çµª¡G
¥Î asc() ¨ç¼Æ°µ§PÂ_¡G
dim yourword as string*1
dim yourcode as integer
yourword="§A¿é¤Jªº¤@Ó¦r¤¸"
if asc(yourword)>=asc("A") and asc(yourword)<= asc("Z")
yourcode=asc(yourword)-asc("A")+10
end if
debug.print yourcode
§Ú¤£¬O°¨©Ô«×¯Ç ªº¤å³¹¤¤´£¨ì:
¦³¨S¦³¨ç¼Æ¬O¥i¥H§R°£¿é¤Jªº¤W¤@Ó¦r¤¸???(´N¹³«ö¤UBack Space¤@¼Ë)
¦Ñ©Çµª¡G
¨Ï¥Î Sendkeys ³¯z¦¡¡A¦p¤U¡G
'Åý text1 ¨ú±oµJÂI¡A¥H«K±µ¦¬Áä½L¦r¤¸¡C
text1.setfocus
'¼ÒÀÀ¨Ï¥ÎªÌ«ö¤U backspace «öÁä
sendkeys "{Backspace}"
²y²y ¼¶¼g©ó¤å³¹
¦b¤å¦r®Ø§Ö³t«ö·Æ¹«¨â¤U, ¨t²Î´N·|¦Û°Ê®Ø¿ï¤å¦r®Ø¤º©Ò¦³ªº¤å¦r,Y§Æ±æÂI«ö¤@¤U´N¯à¦Û°Ê®Ø¿ï¤å¦r®Ø¤º©Ò¦³ªº¤å¦r, µ{¦¡n¦p¦ó¼g©O?
¦Ñ©Çµª¡G
Private Sub Text1_Click()
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
End Sub
· ¼¶¼g©ó¤å³¹
½Ð°Ý¦pªG·QnVB 5.0¨Ó¼g¤@Ó°O¨Æ¥»..¦Ó¸Ì±ªº½Æ»s¡B¶K¤Wn¦p¦ó¼g©O...
¦Ñ©Çµª¡G
n¨Ï¥Î ClipBoard ª«¥ó¨Ó¹F¦¨¡C
'½Æ»s
Private Sub mnuCopy_Click()
Clipboard.SetText Text1.SelText
End Sub
'°Å¤U
Private Sub mnuCut_Click()
Clipboard.SetText Text1.SelText
Text1.SelText = ""
End Sub
'¶K¤W
Private Sub mnuPaste_Click()
Text1.SelText = Clipboard.GetText
End Sub
'¥þ¿ï
Private Sub mnuAll_Click()
Text1.SetFocus
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
Clipboard.SetText Text1.SelText
End Sub