ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[¤À¨É] ¨Ï¥ÎAPI¨ú±o°}¦Cºû«×

[¤À¨É] ¨Ï¥ÎAPI¨ú±o°}¦Cºû«×

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Private Declare Function ArrayPtr Lib "msvbvm60.dll" Alias "VarPtr" (TargetArray() As Any) As Long
Private Sub Form_Load()
    Dim XXX(1, 2, 3, 4) As Byte
    Dim lpArray As Long
    Dim lDim As Long
      
    Call CopyMemory(lpArray, ByVal ArrayPtr(MD_HTML_Value()), 4)
    Call CopyMemory(lDim, ByVal lpArray, 2)
    Debug.Print "ºû¼Æ   =   " & lDim
End Sub

[ª©¥DºÞ²z¯d¨¥]
  • Min(2010/6/29 06:54 AM): «D±`·PÁ±zªº¤À¨É! ³o¬O.NETªº¤è¦¡§a~

MsgBox(System.Windows.Forms.SystemInformation.BootMode.ToString)
        MsgBox(System.Windows.Forms.SystemInformation.WorkingArea.Height)
学习

TOP

¶{¤jª©¥D§A¦n¡G

   ¤p§Ì«e¤é¦bEXCEL VBAµo°Ý¤@«h
¦³Ãö¦p¦ó±oª¾°}¦Cºû¼Æ¡C¤w©Ó»XHSIEHª©¥D
¤j¤j¸Ñ´b¡C¦P®É¤]§iª¾¤p§Ì¥t¦³¶{¤jª©¥DªºAPI¨ç¼Æ
¥\¯à¤]¯à±o¨ì¬Û¦Pµ²ªG¡C
    ¤p§Ì¤]µo¶O¦h¤é¦ý¤´µLªk¤Þ¥Îª©¥D¤j¤j¦¹¨Ò¦p¦ó
§ï¦¨EXCEL VBAªº¤è¦¡¦Ó¯à±o¨ìª©¥D¤j¤j©Ò³]©wªº¥\¯à¡C
¬O§_¯à½Ðª©¥D¤j¤j¸Ñ´b©O¡H
¤U¦CVBA»yªk¬°HSIEHª©¥D¤j¤j´£¨Ñ¦p¤U
Function checkarray(mArray As Variant)
Dim i%, n%
i = 1
On Error Resume Next
Do Until Err.Number = 9   
    n = LBound(mArray, i)   
    If Err.Number = 0 Then i = i + 1   
Loop
    checkarray = i - 1   
End Function

·P®¦ª©¥D¤j¤j¡I

TOP

¦^´_ 3# dechiuan999

±z¦n ¸Õ¸Õ¬Ý³o¼Ë~

Book1.rar (6.19 KB)

­Y¬O§Ú¦^µª¡A¨Ï±zº¡·N¡A½Ð±zÅý§Úª¾¹D¡I                  
­Y¬O§Úªº¦^ÂСA±z¤´¦³¨ä¥L¨£¸Ñ¡A¤]½Ð±z¤£¶Þ«ü±Ð¡I

TOP

¥»©«³Ì«á¥Ñ dechiuan999 ©ó 2011-2-1 11:01 ½s¿è

ÁÂÁª©¥D¤j¤j¡C
¤p§Ì´¢¼¯ª©¥D¤j¤jªº½d¨Ò¡A
¨Ã­×§ï¹ê»Ú¨Ò¤l¤§«á¡F
«o¥X²{°}¦C§ÎºA¤£²Å¡C
¬ßª©¥D¤j¤j¯à¦A«üÂI°g¬z¡C
¥t¤p§Ì¦³¤@ºÃ´b¡A¦pªG¤p§Ì·Q¦h¤F¸Ñ
API¨ç¼ÆªºÀ³¥Î»â°ì¡A¤£ª¾¦p¦óµÛ¤â©O¡H
Sub aa()   
    Dim ar1, ar2, ar3
    Dim mData()
    Dim s%, s1%, n1%, n2%, m%
    Dim mSht1 As Worksheet
    Dim mSht2 As Worksheet
    Dim ar As Variant
    Dim lpArray As Long
    Dim lDim As Long
   
    Set mSht1 = Worksheets(1)      
    With mSht1
        ar1 = .Range("a1:c5")  '¤Gºû°}¦C
        ar2 = .Range("e8:g8")
       ar2 = Application.Transpose(Application.Transpose(ar2))  '¤Gºû°}¦CÂন¤@ºû°}¦C
        ar3 = .Range("h10:j14")  '¤Gºû°}¦C        
      
        ReDim Preserve mData(0)
        mData(0) = ar1
        ReDim Preserve mData(1)
        mData(1) = ar2
        ReDim Preserve mData(2)
        mData(2) = ar3
        
        s = UBound(mData)
        For s1 = 0 To UBound(mData)
        ar = mData(s1)          '¦p¦ó§PÂ_ar ¬O¤@ºû°}¦C©Î¬O¤Gºû°}¦C©O¡H
         
         Call CopyMemory(lpArray, ByVal ArrayPtr(ar), 4)   '°õ¦æ¦Ü¦¹¥X²{AR§ÎºA¤£²Å
       Call CopyMemory(lDim, ByVal lpArray, 2)
        Debug.Print "ºû¼Æ   =   "; lDim
        Next
        
    End With
            
End Sub

·P®¦ª©¥D¤j¤j¡C

arrTest2.rar (9.33 KB)

TOP

¦^´_ 5# dechiuan999


    «¬ºA«Å§iªº°ÝÃD
    Dim ar() As Variant
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

ÁÂÁ¤G¦ìª©¥D¤j¤j¡C

¤p§Ì¤w´ú¸Õ¦¨¥\¡C
·P®¦¤j¤j¡I

TOP

        ÀR«ä¦Û¦b : ¯à·F¤£·F¡A¤£¦p­W·F¹ê·F¡C
ªð¦^¦Cªí ¤W¤@¥DÃD