LCD simulation i Visual Basic VERY slow

Status
Not open for further replies.

MrEd

Advanced Member level 4
Joined
Apr 26, 2001
Messages
108
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
the Singularity
Activity points
1,029
Hi, I wanted to write a routine in Visual Basic to simulate a graphic LCD display by having a lot of squares as pixels that I either set to the background color or a darker color to be on. Now the problem is that it is shockingly slow to for example switch all pixels on. I want it to be fast as on a real graphic LCD display. My PC is fast so that can't be the problem, must be how it is done within VB that is the problem. Anyone who done something like this? Theoretically I want to make the LCD on the PC screen to be able to show animated graphics without the "slow motion fill the screen effect" I have now. Takes about a second to switch on or off 100 x 32 pixels.

Eddie
 

VB is slow and using the windows GDI for drawing is slow too!
Perhaps you can do it like this:
* Create an off-screen Device Context
* Draw in that DC
* BitBlt it to the screen when the complete drawing is finished
**broken link removed**
http://www.officecomputertraining.com/vbtutorial/tutpages/page44.asp

or use DirectX
**broken link removed**
(or any of the other tutorials on this site)

Antharax
 

YEEEESSSS!!!! I got it to work. Thanks a million, the project continues...

eddie
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…