473,324 Members | 2,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

insert image

82
Hi, I have a picture called pic.jpg in the resources folder.

How do i use script to show it
I have tried PictueBox1.Image = "pic"
but just gave an error so i tried
PictueBox1.Image = image.fromFile("pic")
but i got the error |File Not Found

What am I doing wrong?
mrcw
Dec 11 '08 #1
5 5132
Frinavale
9,735 Expert Mod 8TB
Hi!

I've moved your question into the VB Question and Answers forum.
You will never receive help if you post your questions in the VB Insights forum because it is reserved for articles, tips-and-tricks, and how-tos.

You'll get more help here :)

Good luck!

-Moderator Frinny
Dec 11 '08 #2
lotus18
866 512MB
@mrcw
Hi

Try this:

Expand|Select|Wrap|Line Numbers
  1. PictureBox1.Image = Global.<Root Namespace>.My.Resources.Resources.pic

The default root namespace is WindowsApplication1

You can see your root namespace under My Project located in the Solution explorer.


Rey Sean
Dec 12 '08 #3
QVeen72
1,445 Expert 1GB
Hi,

Try to write Full Path :

PictueBox1.Image = image.fromFile("C:\Mypic.bmp")

Regards
Veena
Dec 15 '08 #4
hi there, i wonder if youre using vb.,net,
if that's so, try doing this


picturebox1.image= " "

heres the twist, where is the picture you want located?
if it's in the mydocuments/mypictures, open its containg folder
then open RUN or ctrl +R
then simply drag and drop the picture to it, and voila! you got the whole location of your picture,

hope this will help,
Dec 16 '08 #5
Hey, I ran into the same problem with my program that I'm working on. Try doing this....

PictureBox1.Image = <Root_NameSpace>.My.Resources.(Image Name)

You can find the root namespace under MyProject. The image name should be in your resources folder. Take this for example from my program. I have a program where it automatically puts a picture up when a value is picked in a Listbox....

picCardView.Image = Pokemon_TCG.My.Resourcs.Chimchar

^
|
This code works, so try and follow something like this.

Good luck ^^

Nemeth09
Jan 30 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Display Name | last post by:
I can't insert an image using the "add a new stylesheet" function- the function, on dreamweaver MX (i'm on Windows 2k Pro) seems to work as it generates the code... but the image never shows up in...
7
by: John A. | last post by:
Hello all! I've got a big bunch of pages using tables for layout. Eventually I'll get them set up with more modernized code, but in the meantime I'd like to slip in a little quick holiday...
0
by: PF Melamed | last post by:
Hi.. We are writing a prog in C# (.net) we want to use the aximgadmin object to insert a tiff file to another one. in WB we have : dest.image = "Dest.tif" source.image = "Source.tif" 'the...
6
by: SandySears | last post by:
I am trying to use a stored procedure to insert a record using VS 2005, VB and SQL Server Express. The code runs without errors or exceptions, and returns the new identifer in the output...
3
by: JpMaxMan | last post by:
Greetings - I have found very little definitive information on this. From what I can surmize at some point the ability to update an image in the gridview using the imagefield was removed from the...
0
by: None | last post by:
Hi, I'm using DataGridView in my Windows Forms project. I need to know how we can insert an image into the specified cell . I tried with the following code.
2
by: Marc Solé | last post by:
Hello, I want to insert an image to a specific column of a dataGridWiew. I explain what I'm doing: - I define the ColumnType as a DataGridViewImageColumn. - I select the image (an icon of...
0
by: gazanfar | last post by:
Yes thanks Question is that ---I want to insert image/or image path in my SQlServer 2000 through Visual basic application.like after scan of any photo i want insert in database on whoever's no...
8
by: andrewtayloruk | last post by:
Hi i was wondering if anyone could help.... I have made a little script that puts whatever a user enters into a mysql database. As well as the forms my script has an image input that uploads an image...
0
by: getpunith | last post by:
Hi all, How can export or insert an Image to MS WORD 2007. Doc.InlineShapes.AddPicture() needs an Image file stored on disk space, But I dont have Image file.What I have is an Image object. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.