Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Visual Basic picture box question
#1
I am using a picture box to simulate some kind of virtual screen where I can print things and draw stuff.

I have two questions:

1. How can I load a picture (BMP or whatever) from disk and draw it anywhere on the picture box? Can't it be done without GDI stuff?

2. Is there any way to have the whole thing scroll up a line just like in DOS where you print until you run out of screen?

Thanks
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#2
picture box graphics are virtual crap. the only real way to get decent graphical control in vb is to use the directx sdk.

i've never known a way to change the area of a picturebox. however, this guy seems to have found a way by directly using the gdi:
http://www.rookscape.com/vbgaming/tutW.php
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#3
Thanks, I'll check it out.

Yeh, I know DX is better, but I am coding for a Win3.1 computer GEEz Big Grin
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#4
Quote:Yeh, I know DX is better, but I am coding for a Win3.1 computer GEEz Big Grin

Only one question comes to mind as I read this: WHY? Wink
Reply
#5
Quote:
na_th_an Wrote:Yeh, I know DX is better, but I am coding for a Win3.1 computer GEEz Big Grin

Only one question comes to mind as I read this: WHY? Wink

Exactly for the same reason why 600 people in this forum are coding for DOS Wink

LATER:

I've typed in this code. I have two picture boxes. I just want to bitblt one into another. I have used this code before, but this time all I get is a white square or garbage copied instead of the actual image. Can anybody help? What have I done wrong?

Code:
auxPicBox.Picture = LoadPicture(app.Path + "\Pic1.bmp")
    auxPicBox.Refresh
    
    iSrcDC = auxPicBox.hDC
    iDstDC = MyScreen.hDC
    
    'Copy part of source into destination a few times
    result% = BitBlt(iDstDC, 0, 0, auxPicBox.Height, auxPicBox.Width, iSrcDC, 0, 0, SRCCOPY)
    
    'Invoke refresh method so we can see changes
    MyScreen.Refresh
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#6
Hmmmm - A simple question... Am I the strangest man on earth? Why I have *never* got a proper answer to *any* question I've done in this forum? :rotfl:
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#7
I doubt you don't get answer because you're strange ;-) More likely its that they actually good questions and there aren't many people experience with it to answer you..
Reply
#8
You pose elite questions Wink

1337


lol
Reply
#9
hahahaha - Nope, the reason is that my questions are strange... I see nobody else coding a VB3 app for Windows 3.1 using GDI in the world Smile
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#10
I used to back in the win 3.1 days
oship me and i will give you lots of guurrls and beeea
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)