|
-
Dec 22nd, 2000, 12:24 PM
#1
Thread Starter
Lively Member
Every time I call LoadPicture or the property PaintPicture in the sub Form_Load the picture doesn't appear at all. I make trace to find what happen the program go right and read without error and the picture doesn't appear.
-
Dec 22nd, 2000, 12:33 PM
#2
Try
Move it to the Form_Paint procedure
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Dec 22nd, 2000, 12:39 PM
#3
_______
<?>
use Form Activate
In form load things are not loaded, they are loading ....
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Dec 22nd, 2000, 01:07 PM
#4
PowerPoster
I think put into the Form_Paint procedure is better. Since the Form_Activate will only fire when the Form is loaded. But the Form_Paint is a bit different from the
Form_Activate. Whereby, when there is a change in the form windows, the Form_Paint event will be fire.
regards,
Chris
-
Dec 22nd, 2000, 01:29 PM
#5
Fanatic Member
Bobbo,
I wouldn't suggest using LoadPicture in the Form_Paint event, else you will tie up alot of memory. I would do something like this...
Code:
Dim iPic As IPictureDisp
Private Sub Form_Load()
Set iPic = LoadPicture("C:\Windows\Bubbles.bmp") ' Load the picture
End Sub
Private Sub Form_Paint()
Me.PaintPicture iPic, 0, 0 ' Show the picture
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set iPic = Nothing 'free memory
End Sub
Also just to clarify the Form_Activate is fired every time the form regains the focus, not just when the form is loaded.
{Insert random techno-babble here}
{Insert quote from some long gone mofo here}
-
Dec 22nd, 2000, 02:53 PM
#6
Not sure if it'll help, but you may want to set the Form's AutoRedraw property to True.
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
|