¤ÀÃþ |
¼ÐÃD |
¤j·N |
§@ªÌ |
¤é´Á |
µøµ¡¬É± | ÅÜ´«¦P¦æ¦r¦ê¤§¦rÅé¤j¤p | ¡@ | ¦Ñ©Ç | 1999/3/1 |
µøµ¡¬É± | ¦b Form ¤W¦C¦L¶W¹L Form ªø«×¸ê®Æ | ¡@ | ¦Ñ©Ç | 1999/3/7 |
µøµ¡¬É± | ¦p¦ó°ÊºA·s¼Wªí³æ | ª«¥ó¤@¼Ë¥i¥H¥Î°ÊºA°}¦C | ¦Ñ©Ç | 1999/3/29 |
µøµ¡¬É± | ¦P®É©T©wªí³æ¤ÎÅã¥Ü³Ì¤p¤Æ«ö¶s | ¡@ | ¦Ñ©Ç | 1999/5/4 |
µøµ¡¬É± | ¨Ï¥Î·Æ¹«¥kÁä¥s¥X¿ï³æ | PopupMenu ¤èªk | ¦Ñ©Ç | 1999/5/9 |
¹Ï§Î³B²z | ¨ú±o BMP ¹Ï§ÎÃC¦â¼Æ | ¡@ | Sun Jack | 1999/3/20 |
¹Ï§Î³B²z | ¤@¤j¹Ï¤Á¦¨¼Æ¤p¹Ï | PaintPicture °Ñ¼Æªº¨Ï¥Î | ¦Ñ©Ç | 1999/4/8 |
¹Ï§Î³B²z | ¦A½× PaintPicture ªº³B²z°Ê§@ | PictureBox ªº¹Ï¼hÆ[©À | ¦Ñ©Ç | 1999/4/13 |
¹Ï§Î³B²z | ²©ö¤ô¤¤Ë¼v¸Õ°µ | PaintPicture °Ñ¼Æªº¨Ï¥Î | ¦Ñ©Ç | 1999/4/16 |
±±¨î¶µ¨Ï¥Î | §Y®ÉÅã¥Ü Scroll.Value | ¡@ | ¦Ñ©Ç | 1999/3/11 |
±±¨î¶µ¨Ï¥Î | Åý Combo.AddItem ¤£«ÂÐ | ¡@ | ¦Ñ©Ç | 1999/5/16 |
OCX »s§@ | ¦p¦ó§@¥iÂI¿ïÃC¦âªº Property | OLE_COLOR ª«¥ó | ¦Ñ©Ç | 1999/4/9 |
OCX »s§@ | ¦p¦ó³]©wDefault Property | ¡@ | ¦Ñ©Ç | 1999/4/9 |
ª«¥ó¨Ï¥Î | ¦p¦ó§ó§ï¦Lªí¾÷ªº¯È±i¤j¤p³]©w | ¥¿½Tªº¾Þ§@ PaperSize ÄÝ©Ê | ¦Ñ©Ç | 1999/4/2 |
ª«¥ó¨Ï¥Î | ¥Îª«¥ó¦WºÙ¦r¦ê¾Þ§@ª«¥ó | Controls ¶°¦Xª«¥óªº¨Ï¥Î | Sun Jack | 1999/5/6 |
¬yµ{±±¨î | ¦p¦ó°µ¥X VB Delay() | ¡@ | ¦Ñ©Ç | 1999/3/19 |
¤é´Á®É¶¡ | ¦p¦óÅý VB Show ¥X¦Ê¤À¤§¤@¬í | ¡@ | ¦Ñ©Ç | 1999/3/20 |
¤é´Á®É¶¡ | ¥Î Format ²£¥Í¥Á°ê¦~¥÷ | ¡@ | Sun Jack | 1999/3/21 |
¤é´Á®É¶¡ | ªø®É¶¡±Æµ{³qª¾ | Timer ª«¥ó¨Ï¥Î | ¦Ñ©Ç | 1999/4/25 |
ÅܼƳB²z | Form Unload «áÅܼƦû¥Î°O¾ÐÅ骬ªp | ¡@ | ¦Ñ©Ç | 1999/4/25 |
»{....¯u(male) ¼¶¼g©ó¤å³¹
¬O§_¦nªº¤èªk¥i¥Î¤@Óªí³æ¥i¥HÅã¥Ü¤Î¦C¦LµL¶µµ²ªG??
¦Ñ©Çµª¡G
¨Ï¥ÎÅܼư}¦C¤ÎÅã¥Ü«ü¼Ð¡A¦A¤À¬q¦b Form ¤WÅã¥Ü¡AÄ´¦p¡G
Dim pºâµ²ªG°}¦C() As Variant
Dim Åã¥Ü«ü¼Ð As Long
1.pºâ©Ò¦³µ²ªG¡G
Redim pºâµ²ªG°}¦C(0)
Do
If pºâÄ~Äò Then
pºâµ²ªG°}¦C(0)=pºâµ²ªG
ReDim Preserve pºâµ²ªG°}¦C(Ubound(pºâµ²ªG°}¦C)+1)
Else
Exit Do
End IF
Loop
2.³]©wÅã¥Ü«ü¼Ð
Select Case KeyCode
Case vbKeyPageUp
Åã¥Ü«ü¼Ð=Åã¥Ü«ü¼Ð-1
Case vbKeyPageDown
Åã¥Ü«ü¼Ð=Åã¥Ü«ü¼Ð+1
End Select
3.¦b Form ¤WÅã¥Üµ²ªG
Dim I As Integer
Me.Cls
For I=Åã¥Ü«ü¼Ð*10 TO Åã¥Ü«ü¼Ð*10+9 'Ä´¦p¤@¦¸Åã¥Ü¤Qµ§¸ê®Æ
Form.Print pºâµ²ªG°}¦C(I)
Next
¥H¤W¤j·N¦p¦¹¡A§A¦A°t¦X¦Û¤vªºµ{¦¡×§ï¡C
w101 ¼¶¼g©ó¤å³¹
¨Ï¥Î VScroll or HScroll «öµÛ·Æ¹«²¾°Ê®É, ¥i§Y®Éªº¶Ç¦^¥¦ªº²¾°Ê¶q¶Ü??
¦Ñ©Çµª¡G
§Y®ÉÅã¥Ü²¾°Ê¶qn¨Ï¥Î Scroll Event ¡AChange Event ¬O©ñ¶}·Æ¹«¤~·|Åã¥Üªº¡C½d¨Ò¦p¤U¡G
Private Sub Form_Load()
HScroll1.Max = 100
HScroll1.Min = 1
End Sub
Private Sub HScroll1_Scroll()
Text1.Text = HScroll1.Value
End Sub
¨Ìµ·©« ¼¶¼g©ó¤å³¹
½Ð°Ý¤@¤U¦³½Öª¾¹Dvbªº ¦³¨S¦³delayªº«ü¥O...
¦Ñ©Çµª¡G
jay ¼¶¼g©ó¤å³¹
½Ð°Ý¦b VB ¤¤,¦p¦ó¦C¦L¥X¦Ê¤À¤§¤@¬í©O? ¦p 17:59:00.10 or 17:58:20:30¡C
¦Ñ©Çµª¡G
Print Format(Now,"eemmdd")
¶§¥ú¤Uªº¨k«Ä ¼¶¼g©ó¤å³¹
§Ú¼g¤F2ÓForm¤À§O¬°Form1¤ÎForm2
¦Ñ©Çµª¡G
eeyore ¼¶¼g©ó¤å³¹
¦]¬°§Úªº±M®×¶·n«Ü¦hºØ³øªí®æ¦¡ ¦p A4,LETTER SIZE¡A§Ú¨Ï¥Î VBªº PRINTER.PAPERSIZE ¥h§ó§ï³]©w¦ý¬O¨S¦³§@¥Î !!!!·Q½Ð±Ð¦U¦ì¥ý¶i,¦³¨º¤@Ó C++ OR API OR VB «ü¥O¥i¥H°ÊºA³]©w¦Lªí¾÷ªºª¬ºA¡C
¦Ñ©Çµª¡G
Option Explicit
Private Type BITMAPINFOHEADER '40 bytes
biSize As Long
biWidth As Long
biHeight As Long
biPlanes As Integer
biBitCount As Integer
biCompression As Long
biSizeImage As Long
biXPelsPerMeter As Long
biYPelsPerMeter As Long
biClrUsed As Long
biClrImportant As Long
End Type
Private Type BITMAPFILEHEADER
bfType As Integer
bfSize As Long
bfReserved1 As Integer
bfReserved2 As Integer
bfOffBits As Long
End Type
Private Sub Command1_Click()
Dim FileName As String
Dim ff As Integer
Dim FileHeader As BITMAPFILEHEADER
Dim InfoHeader As BITMAPINFOHEADER
FileName = "h:\delete.bmp"
'read the file header info
ff = FreeFile
Open FileName For Binary Access Read As #ff
Get #ff, , FileHeader
Get #ff, , InfoHeader
Close #ff
MsgBox InfoHeader.biBitCount & " (" & 2 ^ InfoHeader.biBitCount & "
colours)"
End Sub¦Ñ©Çªþµù¡G
¥u¯à¾A¥Î BMP ¹ÏÀÉ¡A¨ä¥L®æ¦¡¹ÏÀÉ·|²£¥Íµ{¦¡¿ù»~¡C
Tako _ ¼¶¼g©ó¤å³¹
½Ð°Ý¦bVB¤UŪ¤J¤@ÓBMPÀÉ,¦p¦ó§â¥¦¤Á¦¨4x4Ópictureª«¥ó©O?? ¬O»¡¤@Ó800x600ªºbmpÀÉ.. n¤Á¦¨50x37ªº16Ópictureª«¥ó...¦³¿ìªk¶Ü??
¦Ñ©Çµª¡G
'½d¨Ò¥\¯à¡G¤@¤j¹Ï¤Á¦¨¼Æ¤p¹Ï
'´ú¸Õ¥»½d¨Ò½Ð©óªí³æ¥¬¸m Text1(0),Text1(1),Picture1,Picture2
Option Explicit
Private Sub Command1_Click()
Dim XNum As Integer, YNum As Integer
Dim I As Integer, J As Integer
Dim PWidth As Single, PHeight As Single
'§â Text ¤º®eÂন¤p¹ÏÁa¾î¤Á³Î¼Æ
XNum = Val(Text1(0).Text)
YNum = Val(Text1(1).Text)
'´«ºâ¨C¶ô¤p¹Ïªºªø¼e
With Picture1
PWidth = .ScaleWidth / XNum
PHeight = .ScaleHeight / YNum
End With
'¨Ì¤p¹Ïªø¼e¨M©w Picture2 ªø¼e
With Picture2
.Width = PWidth + .Width - .ScaleWidth
.Height = PHeight + .Height - .ScaleHeight
End With
'§â Picture1 ¹Ï¤ù¤@¤p¶ô¤@¤p¶ô¶K¨ì Picture2 ¤W¡A¦A§â Picture2.Image ¦s
ÀÉ¡C
For I = 0 To YNum - 1
For J = 0 To XNum - 1
With Picture2
.AutoRedraw = True
.PaintPicture Picture1.Picture, .ScaleLeft, .ScaleTop, , _
, J * PWidth, I * PHeight, .ScaleWidth, .ScaleHeight
.AutoRedraw = False
SavePicture .Image, "c:\test\" & Right(String(3, "0") _
& Trim(Val(I)) & Trim(Val(J)), 3) & ".bmp"
End With
Next
Next
End Sub
Private Sub Form_Load()
Picture1.AutoSize = True
Picture2.Visible = False
Text1(0).Text = ""
Text1(1).Text = ""
Picture1.Picture = LoadPicture("c:\temp\a18a.jpg")
End Sub
Private Sub Text1_KeyPress(Index As Integer, 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
yclin ¼¶¼g©ó¤å³¹
½Ð°Ý¥HVB»s§@OCX, ¨äProperty ¤¤¦p¦ó¥X²{backcolor³oproperty(¥iÂI¿ïÃC¦â)?
¦Ñ©Çµª¡G
·í§A§â BackColor ¶Ç¤J¤Î¶Ç¦^ȳ]¬° OLE_COLOR ´N¥i¥H¦bÄݩʵ¡ÂI¿ïÃC¦â¡C¦p¤U¨Ò¡G
Public Property Get BackColor() As OLE_COLOR
BackColor = UserControl.BackColor
End Property
Public Property Let BackColor(ByVal New_BackColor As OLE_COLOR)
UserControl.BackColor() = New_BackColor
PropertyChanged "BackColor"
End Property
§Ú³ºµM¬O¤p§b¥Ê)
Picture1¨S¦³¸ü¤J¹Ï§Î
Picture1.PaintPicture Picture2,1,1,,,,,,vbSrcCopy
Form1.PaintPicture Picture1,1,1,,,,,,vbSrcCopy
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
µ²ªG¦³Error¡HPaintPicture¥u¯à§â¹Ïµe¦bª«¥ó¤W¦Ó¤£¯à¯u¥¿¼g¤Jª«¥ó¶Ü!?
¦Ñ©Çµª¡G
§Ú²¤Æ¤@¨Ç¨Ó»¡§a¡A§A¥i¥H§â VB ø¹Ï¤¸¥ó¬Ý¦¨¬O¦³¤T¼h±ª©¡A©³¼hºÙ°µ Picture¼h¡A¤¤¼h¥s°µ Image ¼h¡A¦Ó¤W¼h¥s°µ Paint Show ¼h¡A©Ò¦³Ã¸¹Ï¤èªkLine,Circle,PaintPicture,Cls µ¥¡Aµe¥X¨Óªº¼v¹³³£¬O¦b Paint Show ¼h¤W¡A¦Ü©ó¥ÎLoadPicture or Set Object.Picture=PictureObject ªº¹Ï§Î¡A«h¬O©ñ¦b Picture ¼h¤W¡C
°ò¥»¤W Paint Show ¼hªº¼v¹³¬OµLªk³Q«ü©w©ÎÂ^¨úªº¡A¤]´N¬O»¡Ã¸¹Ï¤èªkLine,Circle,PaintPicture,Cls µ¥Ã¸¥Xªº¹Ï§Î¡A¥u¨ÑÅã¥Ü¥Î¡A·í§Aªº Form ³Q¨ä¥LForm ¾B½ª«á¡A´N®ø¥¢¤£¨£¤F¡C¦Ó¥H¬°¥Îø¹Ï¤èªkLine,Circle,PaintPicture,Cls ¬Oµe¦b Picture ¼h¤W¡A¤]¬O¹ï VB ø¹Ï¤¸¥ó°Ê§@¤£¤F¸Ñ©Ò¦Ü¡C
¨º³o»ò»¡Ã¸¹Ï¤¸¥óªºÃ¸¹Ï¤èªkø¥Xªº¹Ï«ç¼Ë¤~¯à³Q«ü©w©ÎÂ^¨ú©O¡A¨º´N¬O Image ¼hªº°µ¥Î¤F¡CImage ¼hªººc¦¨¬O¥¦º¥ý·|§â Picture ¼h¼v¹³½Æ»s¤@¥÷·í©³(¡°ª`·N¡I´Nºâ Object.Picture ¥¼¸ü¤J©Î«ü©w¹Ï§Î¡AImage ¤@¼Ë¦³·N¸q¡A¦]¬°³o®É¥¦·|¥Hø¹Ïª«¥óªº BackColor ¬° Image¡C)µM«á·|¨Ìø¹Ïª«¥óªº AutoRedraw ª¬ªp¨M©wø¹Ï¤èªk¬O§_·|§â¹Ï§Îµe¨ì Image ¤W¡CAutoRedraw=False ®É¡A¤£ºÞø¹Ï¤¸¥ó«ç»òµe¡AImage ³£¤£·|§ïÅÜ¡Aºû«ùì¨Óªº Picture ¼hªº Image ¡A¦ý¦pªG§â AutoRedraw=True ®É¡A«h©Ò¦³ªºÃ¸¹Ï¤èªk³£·|µe¨ì Image ¼h¤W¡A¦Ó»Pì¦s¦bªº Picture Image µ²¦X¦b¤@°_¡C
©Ò¥H¦pªGø¹Ï¥Øªº¥u¬O Show µ¹¨Ï¥ÎªÌ¬Ý¡A¨º»ò AutoRedraw ÄÝ©Ê¥i¥Hºû«ù Default ªº False È¡A¦ý¦pªGµe§¹«án«ü©wµ¹¨ä¥Lªºª«¥ó or SavePicture ¡A«h¤@©wn AutoRedraw= True¡C
OK ¡A³Ì«áÁ`¾ã²z¡G
- §An¦bø¹Ï¤¸¥ó¤Wµe¹Ï§Î«á«ü©wµ¹¨ä¥Lª«¥ó©ÎÀx¦s¹ÏÀÉ¡C
- Åý¸Óø¹Ï¤¸¥óªº AutoRedraw=True¡C
- ¥Îø¹Ï¤èªk¦bø¹Ï¤¸¥ó¤Wø¹Ï¡C
- §â ø¹Ï¤¸¥ó.Image «ü©wµ¹²Ä¤GÓª«¥ó©ÎÀx¦s¡A¦pªG¥H§b¥Êªº°ÝÃD´N¬O¡G
Picture2.PaintPicture Picture1.Image
'¥»½d¨Ò¬O¥Î VB PictureBox ª«¥ó¼ÒÀÀ±`¦b Java Applet ¥X²{ªº¤ô¤¤Ë¼vª«¥ó®ÄªG¡A
'ì²z¬O§â PictureBox ¤¤ªº¹Ï¤ù¬Ý°µ¬O±½ºË½uªº¶°¦X¡AµM«á§Q¥Î Timer ª«¥ó°t¦X
'For ... Next °j°é¡A¤@±ø¤@±ø·h¨ì¥t¤@Ó PictureBox ùØ¡A¤£¹L·hªº¹Lµ{¤¤n§â¥¦
'¦V¥ª¦V¥k²¾¤@¤U¡A´N¦³ªi¼vÀúºyªº·Pı¡C
'´ú¸Õ¥»½d¨Ò½Ð©óªí³æ¤W¥¬¸m Picture1,2¡BCommand1¡BTimer1¡C
Option Explicit
'¨M©w¥ª¥kªi¤j¤p
Private Const ¤ô¥°¾²¾È As Integer = 5
'¨M©w¹Ï½u¥ª²¾©Î¥k²¾ªº«ü¼Ð
Dim TurnBackA As Long, TurnBackB As Long
Private Sub Command1_Click()
If Command1.Caption = "¶}©l˼v" Then
With Picture2
.PaintPicture Picture1.Picture, .ScaleLeft, .ScaleTop
End With
Timer1.Enabled = True
Command1.Caption = "µ²§ô˼v"
Else
Timer1.Enabled = False
Picture2.Cls
Command1.Caption = "¶}©l˼v"
End If
End Sub
Private Sub Form_Load()
'¥¬¸m¦U±±¨î¶µ¦ì¸m¤Î¤j¤p
With Picture1
Picture2.ScaleMode = 3
.ScaleMode = 3
.AutoSize = True
.Picture = LoadPicture("c:\temp\sisbkgnd.bmp")
.Move Me.ScaleLeft, .ScaleTop
Picture2.Move Me.ScaleLeft, Me.ScaleTop + .Height, .Width, .Height
Me.Width = .Width + Me.Width - Me.ScaleWidth
Me.Height = .Height * 2 + Command1.Height + 240 + _
Me.Height - Me.ScaleHeight
Me.Caption = "VB ¤ô¤¤Ë¼v½d¨Ò"
Command1.Move (Me.ScaleWidth - Command1.Width) / 2, .Height * 2 +
120
Command1.Caption = "¶}©l˼v"
End With
With Timer1
.Enabled = False
.Interval = 66
End With
'¥ý³]©wªi¯¾¥k²¾
TurnBackA = 1
TurnBackB = 1
End Sub
Private Sub Timer1_Timer()
'²Ä¤@±ø½uªº¥ª¥k²¾°Ê¶q
Static OffStart As Long
'¨C±ø¹Ï½u¥ª¥k²¾°Ê¶q
Static Offset As Long
Dim I As Long
With Picture2
TurnBackA = 1 * TurnBackB
'³vÂI¶K¤W¹Ï½uªº°j°é
For I = 0 To .ScaleHeight - 1
.PaintPicture Picture1.Picture, Offset, I, .Width, 1, _
0, I, .Width, 1
If Abs(Offset) = ¤ô¥°¾²¾È Then
Offset = 0
TurnBackA = TurnBackA * -1
Else
Offset = Offset + (1 * TurnBackA)
End If
DoEvents
Next
End With
If Abs(OffStart) = ¤ô¥°¾²¾È Then
OffStart = 0
TurnBackB = TurnBackB * -1
Else
OffStart = OffStart + (1 * TurnBackB)
End If
Offset = OffStart
End Sub
hear ¼¶¼g©ó¤å³¹
·PÁ¤j®a¼ö¤ßªº¦^µª. °O¾ÐÅ骺±±¨î¹ê¦b¬Oµ{¦¡¼g§@«Ü«nªº³¡¤À, ±±¨î±o¦n, ¸ê·½¤~¯à¦³®Ä§Q¥Î, µ{¦¡®Ä¯à¤]¤~¯àµo´§..§Ú¹ïCOM¨Ã¤£¼ô±x, ®Ú¾Ú¦U¦ìªº¦^µª, ¾ã²z¦p¤U, ¤£ª¾¹D¦³¨S¦³¿ù»~:Form Unload¤§«á, ·|ÄÀ©ñForm¤º³¡Public»PPrivateªºÅܼưO¾ÐÅéªÅ¶¡,
¤£¬O³o¼Ëªº¡A
b8740038¼¶¼g©ó¤å³¹
§Ún¨C3¤p®É°õ¦æ¤@Óµ{§Ç¡A°£¤F¨Ï¥ÎTIMER¥~,ÁÙ¦³Ô£¤èªk??¦pªG¥ÎTIMER±±¨î¶µ¤£´Nn¨Ï¥Î3Ó??¦]¬°,¤@ÓTIMERªºINTERVAL³Ì¦h¥u¦³1MINS¦h???
¦Ñ©Çµª¡G
«ô°U¡A¨º¦pªG§An¬Y¦~¬Y¤ëªº¬Y¤@¤Ñ«ç»ò¿ì¡H¨C¬íÀˬd¤@¦¸¹L¤F¤TÓ¤p®É¨S¡A´N³o¼Ë¡C
Dim Startime As Date
Sub Form_Load()
Startime=Now()
Timer1.Interval=1000
End Sub
Sub Timer1_Timer()
If Hour(Now-Startime)>=3 Then
MsgBox "¹L¤F¤T¤p®É"
Startime=Now()
End If
End Sub
%«·s·Pı©¼¦¹% ¼¶¼g©ó¤å³¹
¦bvbªºªí³æ¤¤·|¥X²{¥k¤W¨¤¤TÓ«ö¶sªºÄݩʦn¹³¥u¦³ BorderStyle=2®É,¨ä¥Lªº(=0,1,3,4,5)³£¥u¦³x or nothing, µM¦ÓBorderStyle=2®É,ªí³æ¤j¤p¤S¥i¥Î·Æ¹«©ì©ÔÃä¬É©ñ¤jÁY¤p¡C½Ð°Ý§Ún«ç»ò³]©w¤~¯à°µ¨ì ¤S¥i¨Ï¥Î³Ì¤p¤Æ«ö¶s¤S¥i©T©wÃä¬É ·Æ¹«¤£¯à©ì©ÔÃä¬É§ïÅܪí³æ¤j¤p???
¦Ñ©Çµª¡G
·Q°µ´N¥h°µ§a ¼¶¼g©ó¤å³¹
½Ð°Ý¦b¦p¦ó¦bVB¤¤¨Ï¥Î·Æ¹«¥kÁä¥s¥X¿ï³æ(menu)¡H§Ú§Æ±æ¤£n¦b MenuLine ¤WÅã¥Ü¡A¥uÅý¨Ï¥ÎªÌ³z¹L·Æ¹«¥kÁä¨Ó°µ¿ï³æªº¿ï¾Ü¡C
¦Ñ©Çµª¡G
Option Explicit
Private Sub Form_Load()
MenuName.Visible = False
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single,
Y As Single)
If Button = 2 Then
Me.PopupMenu MenuName
End If
End Sub
µæ³¾¤@ÂS¤â ¼¶¼g©ó¤å³¹
¦p¦ó¼g¤@Óµ{¦¡Åý¬Û¦Pªºitem¥u¥X²{¤@¦¸,¦badditemªº¦P®É´N¶¶«KÀˬd¦³¨S¦³«½Æªº,¨S¦³«½Æªº¤~additem.¦³«½Æªº´N¸õ¹L¡H
¦Ñ©Çµª¡G
Option Explicit
Private Sub Combo1_KeyPress(KeyAscii As Integer)
Dim I As Long
Dim Duplicate As Boolean
'À£¤U Enter ªí¥Ü¿é¤J§¹²¦
If KeyAscii = 13 Then
'³]©w¿é¤J¥¼«Âйw³]È
Duplicate = False
If Combo1.ListCount = 0 Then
Combo1.AddItem Combo1.Text
Else
'Àˬd©Ò¦³¿é¤J°O¿ý¬O§_«ÂÐ
For I = 0 To Combo1.ListCount - 1
If Combo1.List(I) = Combo1.Text Then
Duplicate = True
MsgBox "¿é¤J¶µ«½Æ"
Exit For
End If
Next
'¦pªG¤£«ÂФ~¥[¤J¸Ó¶µ
If Not Duplicate Then
Combo1.AddItem Combo1.Text
End If
End If
End If
End Sub