Windows 7 Forums


Windows 7: VB Picturebox control

20 Jul 2012   #1

Windows 7 Enterprise 64 Bit
 
 
VB Picturebox control

Hi, is there way to change the picture box image when pressed a button?

Something like this:



PictureBox1.Image = (Pic.png)

This crashed the application:

PictureBox1.Image = System.Drawing.Bitmap.FromFile(Pic.png)

Thanks.
My System SpecsSystem Spec

20 Jul 2012   #2

Win 7 Ultimate (64-bit), Win 7 Pro (32-bit)
N. Calif
 
 

My System SpecsSystem Spec
20 Jul 2012   #3

Windows 7 Enterprise 64 Bit
 
 

Thanks

but
PictureBox1.Image = Image.FromFile _ (System.Environment.GetFolderPath _ (System.Environment.SpecialFolder.Personal) _ & "\Image.gif")

I dont know what to type into this...

Edit: It works! i used: picturebox1.image = Projectname.My.Resources.Resources.Imagename
My System SpecsSystem Spec
.


Reply

 VB Picturebox control problems?



Thread Tools



Similar help and support threads for: VB Picturebox control
Thread Forum
AMD VISION Control Center / Catalyst Control Center = Same Thing? Drivers
Lost control of zoom - web pages and desktop icons shrink w/no control General Discussion
GPU Control Center issue (ATI Catalyst Control Center ) NEED HELP!!!! Graphic Cards
Nvidia color control vs Windows color control settings? General Discussion
How to control WMD with an IR remote control Media Center


All times are GMT -5. The time now is 10:12 AM.



Windows 7 Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd