• 0

[VB6] printing image from imagebox


Question

hey guys,

i?m working with VB6 atm trying to get a image printed when clicking on a button but just cant get it working, heres what i got:

imgVM is my imagebox

If imgVM.Picture = Empty Then
    Exit Sub
Else
    Printer.Print imgVM.Picture
    Printer.EndDoc
End If
End Sub

but that doesnt work, someone told me to try with Print.PaintPicture instead of Printer.Print but that doesnt work either, someone know the proper way?...dont tell me to google as i?ve done that before pffff

thanks in the meanwhile

Link to comment
https://www.neowin.net/forum/topic/285068-vb6-printing-image-from-imagebox/
Share on other sites

3 answers to this question

Recommended Posts

  • 0

yes, i got

Printer.PaintPicture imgVM.Picture

now, it still doesnt work , says: Compile Error Argument not optional

i?ve looked up in the object browser, and the default syntax for PaintPicture is :

Sub PaintPicture(Picture As StdPicture, X1 As Single, Y1 As Single, [Width1], [Height1], [X2], [Y2], [Width2], [Height2], [Opcode])

but i still dont got a clue how i?d should write t pffff , any help appreciatedi

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I am saying if they put MC outside compute tile, it is DOA for gaming, in other words will be a failure like 285k unless they do some magic with MC, but I doubt it. It is that simple.
    • One of the reasons Windows is in use is because of compatibility with hardware and software, but it isn't perfect and there are gaps. This software can help maintain compatibility with older hardware and software the way DOSBox helps us now.
    • This can help with compatibility the way DOSBox helps us now. There are a lot of old drivers, software, and hardware that don't work in current Windows. This could also help older hardware still be relevant because you can install it directly on devices where current Windows versions are no longer supported.
    • Nexus Mods owner steps down citing toll on personal wellbeing by Usama Jawad If you've ever been involved in the gaming landscape, there is a good chance that you have heard of Nexus Mods. It's one of the largest websites offering game modifications online with millions of registered members. The site hosts mods for numerous popular titles including The Witcher 3, The Elder Scrolls, Elden Ring, Dark Souls, and Fallout, among others. Now, the creator of the site has announced that ownership of Nexus Mods is changing hands, 24 years after its inception. In a blog post, the site's creator, Robin Scott - also known as "Dark0ne" in the community -, has announced that he is stepping down from managing the site on a daily basis and is actually handing over Nexus Mods to a new owner. Interestingly, this owner has not been named yet, but it seems like the community will be seeing a lot more of Foledinho (Victor) and Rapsak (Marinus) in daily operations. Scott says that ever since starting the site back in 2001, his adult life has been pretty much consumed by running Nexus Mods and managing its "major social network". This has almost been an on-call position, which has taken a toll on his personal wellbeing and health due to the accompanying stress and anxiety. As such, Scott has decided to step down from his executive role to avoid further burnout. Although Scott has not revealed the identity of the new owners, he says that his exit is purely for personal reasons and not some corporate backdoor deal. The site's creator will still be around in the forums and Mod Author Discord, providing direction when needed without taking responsibility. Scott's announcement has been mostly met with praise and thanks from the community. Though, as may be expected from a rather diverse and often polarized audience, the discussion did recently veer off-course and has now been locked from further engagement by community mods.
  • Recent Achievements

    • Enthusiast
      Motoman26 went up a rank
      Enthusiast
    • Mentor
      M. Murcek went up a rank
      Mentor
    • Explorer
      treker_ed went up a rank
      Explorer
    • Apprentice
      CHUNWEI went up a rank
      Apprentice
    • Veteran
      1337ish went up a rank
      Veteran
  • Popular Contributors

    1. 1
      +primortal
      672
    2. 2
      ATLien_0
      269
    3. 3
      +FloatingFatMan
      176
    4. 4
      Michael Scrip
      173
    5. 5
      Steven P.
      139
  • Tell a friend

    Love Neowin? Tell a friend!