|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Direction and suggestions neededBeing rather new to Developememnt in general, I am struggling to understand the deployment process of a .NET Windows application. I have created a Window's application, which returns info based on what the user selects. For each item in the app there is an associated picture in .jpg format. Code Example: If cboItems.Text = "Veldspar crystal" Then PictureBox7.Visible = True PictureBox7.Image = System.Drawing.Image.FromFile _ ("C:\Documents and Settings\stephen\Desktop\WindowsApplication5\images\icon48_01.jpg") Path to .jpg is for testing only All .jps are held in the images folder. How would i control the deployment of that image folder to a set destination on the clients Computer ie C:\Program Files\EVECalc\images Or is there a way to determine that path based on where the client installs the app? How would I go about including that whole image folder in my Deployment? Many thanks in advance the easiest way is to include them in your project. When you create a setup
for your project, the JPG files will be included, as a subdirectory, under where the project is installed. You want to fix up this line: > PictureBox7.Image = System.Drawing.Image.FromFile _ Settings\stephen\Desktop\WindowsApplication5\images\icon48_01.jpg")> ("C:\Documents and so that you are reading the images from the subdirectory of the application directory, and not from your Desktop folder on your dev machine :-) I'm wondering, why do this at all? Why not just load the JPGs into picture boxes in the dev environment and then just hide the boxes? Does the user need to change these JPG images? -- --- Nick Malik [MSFT] MCSD, CFPS, Certified Scrummaster http://blogs.msdn.com/nickmalik Disclaimer: Opinions expressed in this forum are my own, and not representative of my employer. I do not answer questions on behalf of my employer. I'm just a programmer helping programmers. -- "Stephen Dougherty via DotNetMonster.com" <fo***@DotNetMonster.com> wrote in understand the deployment process of a .NET Windows application.message news:e093ea492eb44bff92b031896d8c2c07@DotNetMonster.com... > Firstly apologies if this has been covered elsewhere. > > Being rather new to Developememnt in general, I am struggling to > the user selects. For each item in the app there is an associated picture in> I have created a Window's application, which returns info based on what ..jpg format. > Settings\stephen\Desktop\WindowsApplication5\images\icon48_01.jpg")> Code Example: > If cboItems.Text = "Veldspar crystal" Then > PictureBox7.Visible = True > PictureBox7.Image = System.Drawing.Image.FromFile _ > ("C:\Documents and > destination on the clients Computer ie C:\Program Files\EVECalc\images> Path to .jpg is for testing only > All .jps are held in the images folder. > > How would i control the deployment of that image folder to a set > installs the app?> Or is there a way to determine that path based on where the client Show quoteHide quote > > How would I go about including that whole image folder in my Deployment? > > Many thanks in advance > > -- > Message posted via http://www.dotnetmonster.com Thanks for the reply Nick
I guess my Question was more about how to include these Pic's in the Project? Can I somehow "reference" the Image Folder? In the Setup, I am able to select a default installation folder, but what if the user wants to install it elsewhere. How would I go about Loading the Jpg's into PictureBox's How would this affect performance? Regards and Thanks Steve You can embed the pictures in your project and then reference them as a
resource. Note you would not be accessing the image folder. Now, if you want to have the image folder get installed when you install your project you just need to make the path to folder relative to your exe. PictureBox7.Image = System.Drawing.Image.FromFile _ (Application.StartupPath & "\images\icon48_01.jpg") Note that in your dev enviroment you'll probably have to put there image folder under the bin directory. Then all you will have to do is to add the image folder to you install project. Hope it helps Chris Show quoteHide quote "Stephen Dougherty via DotNetMonster.com" <fo***@DotNetMonster.com> wrote in message news:0b4716cbd4124629ba7f2308548f50d2@DotNetMonster.com... > Thanks for the reply Nick > > I guess my Question was more about how to include these Pic's in the > Project? > > Can I somehow "reference" the Image Folder? > > In the Setup, I am able to select a default installation folder, but what > if the user wants to install it elsewhere. > > How would I go about Loading the Jpg's into PictureBox's > How would this affect performance? > > Regards and Thanks > Steve > > -- > Message posted via http://www.dotnetmonster.com
Other interesting topics
How to screen scrap a non-browser based object?
How to create a new app instance with Process Extracting runat server objects from aspx multiline toolbarbuttons using VS.Net 2003 with Framework 2 beta MSIL FileSystemWatcher event fired only once System.Net.Socket and Linux Server Child control in non client area ? Form Event - Minimizing/Restoring |
|||||||||||||||||||||||