|
-
Aug 27th, 2003, 11:28 AM
#1
Thread Starter
Lively Member
Images to show when running app
OK - I give up. How do I get the images that I have placed in pictureboxes to show up at runtime? All I'm trying to do here is load a splash screen with 2 images on it. I have placed pictureboxes on other forms in other apps and they work just fine. It seems like I have something set incorrectly somewhere but I'm unsure of where to look. I've already gone over all of the properties between the pictureboxes (between the app that shows the images and the app that doesn't) and they are set the same. Is my next move to just delete the form and start over?
Thanks,
Corinne
-
Aug 27th, 2003, 01:44 PM
#2
I wonder how many charact
don't know without seeing your code and besides, I don't use pictureboxes often
... for a splash screen, I would just get the graphics object of the form... and use graphics.DrawImage() ....
-
Aug 27th, 2003, 01:51 PM
#3
Thread Starter
Lively Member
I haven't done any of this in code. I set the picturebox by the properties.
Could you elaborate on using graphics.DrawImage()?
Thanks,
Corinne
-
Aug 27th, 2003, 02:10 PM
#4
-
Aug 27th, 2003, 02:14 PM
#5
I wonder how many charact
Really though, in the spirit of efficiency, don't use a picturebox control.... if it is just for a splash form... which won't be resized, or the image won't be changed... just draw the image on the form.
As MrPolite pointed out, you will need to embed the image as resource in your project. That's very simple:
1) Right-click your project in the Solution explorer
2) Add Existing item...
3) Change the file types to 'all files' in the dialog box that appears.
4) Select your image
5) Find your newly added image in the solution explorer, right-click.. properties..
6) Change build action from Content to embedded resource.
Last edited by nemaroller; Aug 27th, 2003 at 02:20 PM.
-
Aug 27th, 2003, 02:17 PM
#6
Originally posted by nemaroller
Really though, in the spirit of efficiency, don't use a picturebox control.... if it is just for a splash form... which won't be resized, or the image won't be changed... just draw the image on the form.
what is oyur problem! just kidding
umm efficiency? why would it matter? I mean does it make a big difference?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Aug 27th, 2003, 02:20 PM
#7
I'd say split the difference and just set the form's background image to the image then you don't need a picturebox or Drawimage.
-
Aug 27th, 2003, 02:21 PM
#8
I wonder how many charact
All I'm trying to do here is load a splash screen with 2 images on it
-
Aug 27th, 2003, 03:37 PM
#9
Thread Starter
Lively Member
Thanks to all of you. I did add the image in the solution explorer and set the build to embedded resource. Everything works fine now.
Thanks again,
Corinne
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
|