Solved

Visual Studio 2005 (Tools for Office) Embed jpeg in Windows form

Posted on 2007-11-13
1
347 Views
Last Modified: 2013-11-26
Hi

Is there a way to embed a jpeg in a VS 2005 Windows form so that it is part of the project?

Thanks

Murray
0
Comment
Question by:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 20277987
You can certainly embed an image into a Project...and then access that image from a Form...not sure if that is what you are asking for?...

Click on Project --> Add Existing Item and add your image.
Now select your image in the "Solution Explorer" window.
Down below in the "Properties" window, change the "Build Action" property from "Content" to "Embedded Resource".

Then even use code like this to load the image at run-time:

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        PictureBox1.Image = New Bitmap(Me.GetType, "yourImageName.jpg")
    End Sub

End Class

Of course, you replace "yourImageName.jpg" with whatever the name of your embedded image is.

*** Note that this is one of the rare occasions where VB.Net IS actually case-sensitive. ***
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question