|
-
Jul 27th, 2001, 12:13 PM
#1
Thread Starter
Addicted Member
-
Jul 31st, 2001, 03:56 PM
#2
PowerPoster
You can us C++ if you want to try these kinds of a GDI stuff
-
Jul 31st, 2001, 04:09 PM
#3
Set AutoRedraw to True.
Z.
-
Jul 31st, 2001, 04:13 PM
#4
Member
Hypnos ...
You basically need to do a "backbuffer" technique to make things more visually smooth using VB ...
So, if you are drawing your ball using VB's built-in .PaintPicture or .Circle methods, then you should have a hidden PictureBox the size of your displayed surface (on-screen Form or PictureBox) ... then you do something like:
1> Clear your picBackBuffer (hidden picture box) with something like picBackBuffer.Cls or picBackBuffer.Picture = LoadPicture()
2> Draw everything onto your picBackBuffer
3> Transfer everything to the displayed surface with something like picViewPort.Picture = picBackBuffer.Image
You'll want to make sure your picture boxes have .AutoRedraw = True, and .ScaleMode = 3-pixel to make things work better.
Then ... if you want to improve things, you can learn to use Memory-based DC's and the GDI's bitblt. Here's a good starter tutorial: www.vbexplorer.com/show.asp?id=188
Hope that helps ...
-Bryk
Edit: Bryk ... Hypnos -- I just went out to your website ... and, sorry for my over-simplified response. From the question, seemed the usual never-did-graphics-before type question ... but you obviously have ... so, do with it what you will.
Last edited by Brykovian; Jul 31st, 2001 at 04:30 PM.
-
Aug 1st, 2001, 09:23 AM
#5
Thread Starter
Addicted Member
Thanks guys. I just don't like the idea of using an off screen picture box, it seems like a lame and unprofessional way of doing it. Surely there's another way?
-
Aug 1st, 2001, 09:43 AM
#6
Good Ol' Platypus
You can load files directly into memory using offscreen DCs. They are like the .hDC property of pictureboxes and forms.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Aug 1st, 2001, 09:45 AM
#7
Member
Originally posted by hypnos
Thanks guys. I just don't like the idea of using an off screen picture box, it seems like a lame and unprofessional way of doing it. Surely there's another way?
Hypnos ... Check out my original post ...
Except that I should have given you the link to this tutorial instead: www.vbexplorer.com/show.asp?id=189 ... it's the "Part 2" of the series, and Memory-based DC's are discussed toward the bottom of the page.
-Bryk
-
Aug 1st, 2001, 12:49 PM
#8
Good Ol' Platypus
I believe Fox has a tutorial on them, it didn't work for me though.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Aug 1st, 2001, 01:58 PM
#9
And again, as my post said, you can set AutoRedraw to True.
Does anyone even read what i write?
Z.
-
Aug 1st, 2001, 02:25 PM
#10
-
Aug 1st, 2001, 03:46 PM
#11
Member
Originally posted by Zaei
And again, as my post said, you can set AutoRedraw to True.
Does anyone even read what i write?
Z.
I read it, Z ... but sometimes things still flicker, if you're doing the screen-clearing/drawing combo directly to the displayed object, even with .AutoRedraw=True ...
-Bryk
-
Aug 1st, 2001, 03:59 PM
#12
transcendental analytic
if you're doing the screen-clearing/drawing combo directly to the displayed object, even with .AutoRedraw=True ...
depends where you're blitting at, if that's even what the case is
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|