By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,192 Members | 1,253 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,192 IT Pros & Developers. It's quick & easy.

Picture as Background

P: 56
How to put a Picture as background for a form in vb6???
Jan 25 '08 #1
Share this Question
Share on Google+
11 Replies


QVeen72
Expert 100+
P: 1,445
Hi,

Try this in FormLoad:

Me.Picture = LoadPicture("C:\Pict1.bmp")

Regards
Veena
Jan 25 '08 #2

P: 56
Hi,

Try this in FormLoad:

Me.Picture = LoadPicture("C:\Pict1.bmp")

Regards
Veena


this is not working...
Jan 25 '08 #3

QVeen72
Expert 100+
P: 1,445
Hi,

Did you change the Picture Name..?
Where have you written the code..?

Regards
Veena
Jan 25 '08 #4

lotus18
100+
P: 866
There are some image formats that cannot be read by VB6.0 (e.g. .png). Try also the color mode of the image if it is in rgb or cmyk mode. : )

Rey Sean
Jan 25 '08 #5

werks
100+
P: 220
How to put a Picture as background for a form in vb6???
in the properties of the Form you can insert a picture there..


Better Than Yesterday
Jan 25 '08 #6

P: 56
Hi,

Did you change the Picture Name..?
Where have you written the code..?

Regards
Veena

ofcourse i changed the picture name.
i have written the code in form load event

private sub form_load()

me.picture=loadpicture("C:\Documents and Settings\Administrator\Desktop\From Zero\image.jpeg")

end sub
Jan 25 '08 #7

lotus18
100+
P: 866
ofcourse i changed the picture name.
i have written the code in form load event

private sub form_load()

me.picture=loadpicture("C:\Documents and Settings\Administrator\Desktop\From Zero\image.jpeg")

end sub
Hi

Did you try it on form properties as suggested by werks?

Rey Sean
Jan 25 '08 #8

P: 3
well there are two main alternatives you will use first

you can just go to your toolbox get the image control or picture box control
put it to the form and go to the propertise of that image control and click where there is pictureand locate the picture.

secondly you can load it on run time.
me.picture = loadpicture("location of the picture")
try it out.
Jan 25 '08 #9

QVeen72
Expert 100+
P: 1,445
Hi,

I guess, LoadPicture dosent support ".jpeg" extensions, change it to ".jpg" and check

me.picture=loadpicture("C:\Documents and Settings\Administrator\Desktop\From Zero\image.jpg")


Regards
Veena
Jan 26 '08 #10

Expert 5K+
P: 8,434
I think before we make any more guesses, it would be very helpful if mclueless tells us what "not working" actually means. We're working in the dark here - it could be anything from "that's not the right image" to "the computer blew up and destroyed the house". Chances are it's somewhere between these extremes, of course.
Jan 27 '08 #11

Ali Rizwan
100+
P: 927
How to put a Picture as background for a form in vb6???
Here comes an other problem to you that if the picture resolution is larger than form it will not appears full or if it is smaller then other portion of form will remain uncolored.
Like if your form is on 1024x768 resolution and picture you are using as background is of 640xsomething then it will not cover the whole form.
You can check this by applying...
Regards
>> ALI<<
Jan 27 '08 #12

Post your reply

Sign in to post your reply or Sign up for a free account.