Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÔÚVBµÄÀàÄ£¿éÖÐʹÓö¨Ê±Æ÷

    ³¤¾ÃÒÔÀ´£¬ÓÉÓÚ²»ÄÜÖ±½Ó»ñµÃVBÀà³ÉÔ±º¯ÊýÖ¸Õ룬ÒòΪÎÞ·¨ÔÚVBµÄÀàÄ£¿éÖÐÖ±½ÓʹÓö¨Ê±Æ÷¿Ø¼þ»ò¶¨Ê±Æ÷API£¬»ùÓÚ°³±àдµÄ»ñµÃÀà³ÉÔ±º¯ÊýÖ¸ÕëµÄº¯Êý£¬°³±àдÁËÕâ¸ö´ø¶¨Ê±Æ÷¹¦ÄܵÄÀ࣬ϣÍû¸øÅóÓÑÃÇһЩÆô·¢¡£
    Ò»¡¢Ð½¨Ò»¸öÀ࣬ÀàÃû³ÆΪclsTimer£¬Àà´úÂëÈçÏ£º
Option Explicit
'* ******************************************** *
'* Ä£¿éÃû³Æ£ºclsTimer.cls
'* ¹¦ÄÜ£ºÔÚVBÀàÄ£¿éÖÐʹÓüÆʱÆ÷
'* ×÷Õߣºlyserver
'* ******************************************** *

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, _
Source As Any, ByVal Length As Long)
Private Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, _
ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
Private Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long

Dim m_idTimer As Long
Dim m_Enabled As Boolean
Dim m_Interval As Long
Dim m_lTimerProc As Long

Private Sub Class_Initialize()
m_Interval = 0
m_lTimerProc = GetClassProcAddr(8)
End Sub

Private Sub Class_Terminate()
If m_idTimer <> 0 Then KillTimer 0, m_idTimer
End Sub

Public Property Get Interval() As Long
Interval = m_Interval
End Property
Public Property Let Interval(ByVal New_Value As Long)
If New_Value >= 0 Then m_Interval = New_Value
End Property

Public Property Get Enabled() As Boolean
Enabled = m_Enabled
End Property
Public Property Let Enabled(ByVal New_Value As Boolean)
m_Enabled = New_Value
If m_idTimer <> 0 Then KillTimer 0, m_idTimer
If New_Value And m_Interval > 0 Then
m_idTimer = SetTimer(0, 0, m_Interval, m_lTimerProc)
End If
End Property

Private Function GetClassProcAddr(ByVal Index As Long, Optional ParamCount As Long = 4, Optional HasReturnValue As Boolean) As Long
Static lR


Ïà¹ØÎĵµ£º

»ñµÃVB listbox Ñ¡ÖÐÏîÄ¿(¶àÏî)µÄÒ»¸öºÃ·½·¨

´«Í³·½·¨ÊDZéÀúÒ»±é
Èç¹ûlistbox ÏîÄ¿¹ý¶à
Ã÷ÏÔËٶȲ»ÐÐ
ºÃ·½·¨ÊÇͨ¹ýsendmessge·¢ÏûÏ¢¸ølistboxÈÃËû°ÑÑ¡ÖÐÏîÄ¿Ö±½Ó´«µ½²ÎÊýÊý×éÖÐ
You can use the SendMessage() API function instead.
As
you probably know, this function lets you send a message to one or more
windows. The declaration statement conforms ......

VBÖÐɾ³ýÊý×éÖظ´ÔªËØ

Option Explicit
Function Delete3(Arr As Variant) As Variant
Dim i As Integer
For i = LBound(Arr) To UBound(Arr)
If i > UBound(Arr) Then Exit For
If Arr(i) = 3 Then
Do
Dim j As Integer
For j = i To UBound(Arr) - 1
......

vb class Property Get¡¢Property Let ʹÓÃ

vb class Property Get¡¢Property Let ʹÓÃ
<%
'ÔÚ Class ¿éÖУ¬³ÉԱͨ¹ýÏàÓ¦µÄÉùÃ÷Óï¾ä±»ÉùÃ÷Ϊ Private(˽ÓгÉÔ±£¬Ö»ÄÜÔÚÀàÄÚ²¿µ÷ÓÃ) »ò Public(¹«ÓгÉÔ±£¬¿ÉÒÔÔÚÀàÄÚÍⲿµ÷ÓÃ) ¡£
'±»ÉùÃ÷Ϊ Private µÄ½«Ö»ÔÚ Class ¿éÄÚÊǿɼûµÄ¡£±»ÉùÃ÷Ϊ Public ²»½öÔÚ Class ¿éµÄÄÚ²¿ÊǿɼûµÄ£¬¶Ô Class ¿éÖ®ÍâµÄ´úÂëÒ²Êǿɼûµ ......

VB.NETÖÐÄܲ»ÄܶÔDATASETÔÙÓÃSQLÓïÑÔ

¿ÉÒÔɸѡÊý¾Ý£¬µ«²»ÄÜÊDZê×¼µÄSQLÓï¾ä£º
Me.DsUserManager1.Tables(0).Select("id > 5 and id <20")
---------------------------------------------------------------
1.ɸѡ£º
dataset.tables("tabname").select("id=1")'Ï൱ÓÚSQLÖÐWHEREºóµÄÌõ¼þÄÚÈÝ
2.±£´æµ½ÄÄ£¿Õâµ¹ÊDz»Öª ......

ÔÙ̸ÓÃVBÎÞ´°¿Ú͸Ã÷Usercontrol±àд͸Ã÷¸¡¶¯°´Å¥

'* ************************************************************** *
'* ³ÌÐòÃû³Æ£ºButton.ctl
'* ³ÌÐò¹¦ÄÜ£ºÍ¸Ã÷¸¡¶¯°´Å¤
'* ×÷Õߣºlyserver£¬×îºóÐÞ¸ÄÈÕÆÚ£º2009Äê11ÔÂ
'* ÁªÏµ·½Ê½£ºhttp://blog.csdn.net/lyserver
'* ************************************************************ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ