Results 1 to 3 of 3

Thread: This should work .. right?

  1. #1

    Thread Starter
    Fanatic Member SeaHag's Avatar
    Join Date
    Jul 2001
    Location
    Lake Huron
    Posts
    901

    This should work .. right?

    VB Code:
    1. Option Explicit
    2.  
    3. Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
    4.  
    5.  
    6. Private Sub Timer1_Timer()
    7. Me.Cls
    8.  
    9. Dim x
    10. Dim y
    11. x = Rnd * Me.ScaleWidth
    12. y = Rnd * Me.ScaleHeight
    13. Debug.Print x, y
    14.  
    15. BitBlt Me.hDC, x, y, 64, 61, Picture1.hDC, 0, 0, vbSrcCopy
    16.  
    17. Me.Refresh
    18. End Sub


    I am trying this simple example.. but it wont work..
    I have another example to go by... but still nothing..

    That is all

    Seahag

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    Did you set the Autoredraw property to True ???

  3. #3

    Thread Starter
    Fanatic Member SeaHag's Avatar
    Join Date
    Jul 2001
    Location
    Lake Huron
    Posts
    901
    Your the best Serge!
    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width