|
-
Sep 1st, 2002, 12:53 PM
#1
Thread Starter
Lively Member
simple pic stuff
I need a picture to cover the entire form. It has to resize with the form and I need to be able to put other controls on top of it. I also need to be able to draw circles and lines and things over the picture.
BTW I dont have the vb.net IDE just wordpad so...
-
Sep 1st, 2002, 01:12 PM
#2
PowerPoster
You probably going to have to use the forms' OnPaint method to draw the image to the form, only because you want to be able to resize it. What you will do is create an image object the same size as the form and paint it to the form with the graphics object of the form. You can also use the graphics object to draw the other stuff you want.
-
Sep 1st, 2002, 01:17 PM
#3
Thread Starter
Lively Member
Could you give me some code
Thanks
-
Sep 1st, 2002, 05:52 PM
#4
Thread Starter
Lively Member
Actually forget that.
I think there is something wrong with putting "/Graphics/screen.jpg" in the following code as it doesnt work like that but does if I just put "screen.jpg" even if the file is in both locations
Dim bgImage As Image = Image.FromFile("/Graphics/screen.jpg")
Me.BackgroundImage = bgImage
So how do I get it to use the pic from the Graphics directory
Thanks
-
Sep 1st, 2002, 07:34 PM
#5
PowerPoster
Try something like:
Dim bgImage As Image = Image.FromFile(Application.StartupPath & "Graphics/pic.jpg")
Me.BackgroundImage = bgImage
-
Sep 2nd, 2002, 04:24 AM
#6
Thread Starter
Lively Member
Thanks thats what I needed. Just needs an extra \ I think as below
Dim bgImage As Image = Image.FromFile(Application.StartupPath & "\Graphics\screen.jpg")
Me.BackgroundImage = bgImage
Thanks
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
|