Your Ad Here

Hosting Gratis
Free SQL Query Builder
Free Adware Removal
Free Antivirus Downloads
Free Software
Protect your PHP Scripts
Crack Password
Adsense Money
Lowongan kerja
Yahoo Hosting

Free vbnet matrik
Mahasiswa
VB control
Visual basic
Visual basci tutorial
VB6 library
VB6 protection
Mp3 indonesia
VB source code
Lock folder
MSQ SQL Forum
Table SQL
Java SQL
Connect SQL
SQL database
dotnetnuke SQL
Convert VB6
Visual Basic6
secure VB
Excel to MySQL
wallpapers
visual studio
Client Server
File Server
SQL server pop
Restore SQL
SQL Databases
Free text chat
Flash text
C# control
Visual studio
Web developers
SQL Basics
SQL tutorial
Java Code
ASP Function
SQL Tracking
SQL Comparison
Postgres SQL
VB6 Projects
PHP Store
PHP Ecommerce
E-Commerce CMS
SQL Driver

Load image file vb 2005

Your Ad Here  

Loading image files vb 2005
First, let me say that i haven't written codes since the early days of VB.NET 2003. However, I'm back and I'm catching on. So I'm working on a project and I would like to load an image into a picture box.

This code works:

pictureBox.Image = Image.FromFile("C:\Empty Device.jpg")

Then i thought, when i take the program to another computer, the image 'Empty device' won't be in the C: of that computer. I remember a way to solve this problem in the past VB versions was to put the image file in the bin folder and write the code as above without the drive letter. That doesn't seem to work in VB2005. So is there a new solution to this?

Also if you can be kind enough to include a similar solution to opening other files (like word files, etc) without having to put drive letters since I would be taking the program to another computer.

Check whether the image exists using...

Code:
if new io.FileInfo("C:\Empty Device.jpg").exists then
pictureBox.Image = Image.FromFile("C:\Empty Device.jpg")
end if

Alternatively, distribute the image with your application and place it into the BIN directory. You can then refer to the image and the BIN directory location using...

Code:
pictureBox.Image = Application.StartupPath & "\Empty Device.jpg"

seo
Search Engine Optimization and SEO Tools

stop watch vb2005 send email vb2005 windowsAPI Timer calculator vb2005 audio video vb2005 clock crystal vb ne image slide show vb2005 media player vb2005 cetak vb2005 mainkan Video di vb2008 Check if contents of DataGridView edited by user CheckBox in DataGridView How Can I make Edit for data create an insert SQL table column on datagridview Importing a Text file Loading image files Resizing Form using Timer Update data vb2005 deleting data Splash Screen VB2005 crystal report vb2005 koding-koding contoh project vb2005 implementasikan bahasa pemrograman vb.net mengembangkan vb.net mendownload download secara gratis jual beli uang asing vb

anes 2008