Article View: comp.os.ms-windows.programmer.misc
Article #1629Re: VB Refresh Useless?!
From: Gary Fowler
Date: Thu, 15 Oct 1992 20:45
Date: Thu, 15 Oct 1992 20:45
45 lines
2486 bytes
2486 bytes
collins@socrates.umd.edu (Jim C) writes:
>I'm BitBlting a bitmap to a Form. To << see >> the image after the BitBlt,
>I have to minimise my form and restore it. This is obviously unacceptable for
>the final release version. I've tried Refresh, toggling AutoRedraw,
>InvalidateRect,and everthing else, nothing works.
> Anyone know what I'm doing wrong?
>Can I force a Paint event? Should I?
>Jim C.
>--
> "By practice, even without understanding, it will be made plain; your
>body will understand it long before your mind puts words to it. No amount of
>understanding without practice will work. It is not necessary that knowledge
>precede experience. Performance will produce knowledge."
I guess I don't understand why you are using BitBlt to display a bitmap in VB.
You can load it from a .bmp at design time or run time. At design time by
assigning the Picture property of a form or picture control. At run time you
can load it using the LoadPicture function.
example:
Form1.Picture = LoadPicture("chess.bmp")
or
Picture1.Picture = LoadPicture("chess.bmp")
If you already have a bitmap loaded, you can assign it to a picture control, or
form's picture property.
example:
Picture1.Picture = Form1.Picture
If you want to, you can store a bitmap in a picture control that is no visible
and then display on another picture control or form when needed. You can also
do the same thing with icons. This allows a simple method to cartoon icons and
pictures.
********************************************************************************
* Gary Fowler * The storm starts when the drops *
* gfowler@esunix.sim.es.com * start dropping. When the drops *
* Evans & Sutherland * stop dropping then the storm *
* 600 Komas Drive * starts stopping. *
* Salt Lake City, UT * -Dr. Seuss *
********************************************************************************
Technical Details
Message-ID:
<1992Oct15.204506.13507@javelin.sim.es.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!orca!javelin.sim.es.com!gfowlerReferences:
<1992Oct14.232910.4072@socrates.umd.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc Path: arc1-ca.pugleaf.net!sparky!uunet!orca!javelin.sim.es.com!gfowler From: gfowler@javelin.sim.es.com (Gary Fowler) Subject: Re: VB Refresh Useless?! Message-ID: <1992Oct15.204506.13507@javelin.sim.es.com> Organization: Evans & Sutherland Computer Corporation References: <1992Oct14.232910.4072@socrates.umd.edu> Date: Thu, 15 Oct 1992 20:45:06 GMT Lines: 45