Results 1 to 3 of 3

Thread: Drawing straight onto screen

  1. #1

    Thread Starter
    Addicted Member Monkey Man's Avatar
    Join Date
    Sep 2001
    Location
    Somewhere deep in the Caribbean.....
    Posts
    202

    Drawing straight onto screen

    Is there a way of drawing an image (or text) directly onto the screen (without using a transparent form).

    I know you used to be able to do it with the old Amiga, but so far have had no luck on VB, I've searched the API Guide (which is sooo cool) and found Setpixel - but will this only draw on a form???

    Thanks in Advance


  2. #2
    Registered User
    Join Date
    May 2001
    Location
    taizhou zheziang china
    Posts
    17

    Here

    Use API function GetDC() ,set parameter to 0 to get SCREEN's DC,and then use TextOut ,Bitblt,StretchBlt .... such API functions to complete your drawing.
    You can read Dan Appleman's book of Windows API to know more about GUI API functions.(sorry i forget the book's name,maybe is "Visual Basic 5.0 Win32 API Developer(or maybe programer) guide".)

  3. #3

    Thread Starter
    Addicted Member Monkey Man's Avatar
    Join Date
    Sep 2001
    Location
    Somewhere deep in the Caribbean.....
    Posts
    202

    Thumbs up

    Thanks sproll, that works....

    Just one problem....

    I've put the code into MS Access (I'm at work and don't have VB) and run it, it drew the circle. It didn't put the elipse straight on the active screen (but I assume that is because it is in Access and not on a formless VB project) - but it didn't go away until about 2 mins after I closed down the Access DB and kept popping up everytime I switched between windows...... It also affected the speed of my computer quite badly when it was still activated....

    What is the procedure you call to "undraw" the object???


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