Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÔÚÊý¾Ý¿âÖд¢´æͼƬ²¢ÏÔʾ³öÀ´

 '**************************¶ÁͼƬÎļþ**************************************  
  Sub   GetPicfromDB(cn   As   ADODB.Connection)  
          On   Error   Resume   Next  
          Dim   ......

VB³õ¼¶ÄæÏòÓëÀûÓÃ

½ñÌì×öÒ»¸öVB³ÌÐòµÄ×ÔÏÔ×¢²áÂë¡£ÎÒÒ²²»ÖªµÀ¸ÃÔõô½Ð£¬¾ÍÊÇÕÒµ½³öÏÖ×¢²áÂëµÄµØ·½£¬È»ºóÓöԻ°¿òµ¯³öÀ´¡£Ëµ°×Á˾ÍÊÇÓÃMessageBox°ÑÒ»¸ö×Ö·û´®¸øµ¯³öÀ´£¨Ã»×·Ç󰢡£¡£¡££©
    ÎªÁËÓеã×·Ç󣬽ñÌì²»µ¼Èëuser32ÀïÃæµÄAPI£¬¶øÊÇ°ÑVBÀïÃæ×Ô´øµÄMsgboxº¯Êý¸øÍÚ³öÀ´µ÷Ó㬾ÍÊÇÒýÓÃMSVBVM60.rtcMsgBoxº¯Êý¡£ÎÒÊ ......

ʹÓÃVC±àдVBʹÓÃDLL

ʹÓÃVC±àдVBʹÓÃDLL
Ò»¡¢ÔÚº¯Êý¶¨ÒåÇ°±ØÐë¼ÓÉÏextern "c"£¬_stdcall¹Ø¼ü×Ö¡£
 extern "C" int _stdcall Sum(int x,int y)
 {
  return x+y;
 }
 
¶þ¡¢DLLµÄ.defÎļþÖбØÐë¼ÓÉÏÈë¿Úº¯Êý
    EXPORTS
     sample @1
     ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ