473,546 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

image.fromfile( ...)

imports system.drawing
imports system.drawing. image

dim img as image = image.fromfile( "a.bmp")
picturebox1.ima ge = img

i'm using vs 2003 and the error i have is that fromfile is not a member of
system.drawind. image...what gives?!?

tia,

steve
Nov 19 '05 #1
2 11964

"steve" <as*@abc.com> wrote in message
news:vg******** ****@corp.super news.com...
imports system.drawing
imports system.drawing. image

dim img as image = image.fromfile( "a.bmp")
picturebox1.ima ge = img

i'm using vs 2003 and the error i have is that fromfile is not a member of
system.drawind. image...what gives?!?


Have you tried writing it out explicitly?

Dim Img as System.Drawing. Image = System.Drawing. Image.FromFile( "a.bmp")

?

It may be a namespace conflict, or perhaps you don't have a reference to
System.Drawing in your project...

Jeremy
Nov 19 '05 #2
yeah...it's wierd...i type system.drawing. image but after i type the final
period, intellisense does nothing...shows no members/methods/properties.

any ideas?

i do have a reference to system.drawing and am importing it in the
module/class where it's being called.
"Jeremy Cowles" <je************ *************@a sifl.com> wrote in message
news:Gc******** ***********@twi ster.tampabay.r r.com...

"steve" <as*@abc.com> wrote in message
news:vg******** ****@corp.super news.com...
imports system.drawing
imports system.drawing. image

dim img as image = image.fromfile( "a.bmp")
picturebox1.ima ge = img

i'm using vs 2003 and the error i have is that fromfile is not a member of system.drawind. image...what gives?!?


Have you tried writing it out explicitly?

Dim Img as System.Drawing. Image = System.Drawing. Image.FromFile( "a.bmp")

?

It may be a namespace conflict, or perhaps you don't have a reference to
System.Drawing in your project...

Jeremy

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3828
by: D. Yates | last post by:
Hi, I am looking for an example of how to extract bitmap images from an embedded resource file (a file with *.res extension, which can be viewed inside of the ide and can hold bitmaps, icons, string tables, etc.) and place them into a imagelist. I have found examples using the resource manager to create a "resource file" like so:...
5
20028
by: Fabio | last post by:
private void Apri_Click(object sender, System.EventArgs e) { OpenFileDialog fileChooser=new OpenFileDialog(); //fileChooser.Filter="tiff images (*.tiff)|*.tiff"; DialogResult result = fileChooser.ShowDialog(); Image immagine = New Image(fileChooser.FileName);
2
2351
by: Robson Carvalho Machado | last post by:
Dear Friends, Does anybody knows how to use the below code with an image stored at SQL Image field? Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ScaleStatic("/website/images/default_03.jpg", 50) End Sub
18
1833
by: John | last post by:
Hi I am trying to display an image in a dialog using the following code; Dim frm As New frmImage Dim z As System.Drawing.Bitmap z.FromFile("c:\temp\image.gif") frm.picImage.Image = z frm.ShowDialog()
15
5311
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the path of the uploaded image, and resize it with the provided dimensions. My function is below. The current function is returning an error when run...
4
3042
by: escristian | last post by:
Hello. I'm trying to create an Image so I use something like this: Image newImage = Image.FromFile(filename); Now when it's a bmp file and certain .gif files it gives me an exception that says: "Invalid parameter used". The gif an bmp files are valid image files, I can open them in any graphics software and windows can do the preview.
5
3351
by: Jerry J | last post by:
I want to use the System.Drawing.Image class. According to the help file, this is an abstract base class. Because it is supposedly abstract, I created another class that inherits from it. However, when I did this I got the following error: 'System.Drawing.Image.Image()' is inaccessible due to its protection level Looking at other online...
14
16310
by: Steve K. | last post by:
I have a method that I use to get a System.Drawing.Image from a file without keeping a handle on the file open (so I can delete the file). Here is the code: <code> public static Image ImageFromFileReleaseHandle(string filename) { FileStream fs = null; try {
4
5009
by: Marcolino | last post by:
Hi, I have simple needs but I don't know how to implement it. I have application that create Dynamic Button. I need to set the image on this button, getting the icon from a form. So pratically I need to convert dinamically a Form.Icon to Button.Image runtime, but i don't know how. Any help would be appreciated. Many Thanks
0
7435
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7792
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6026
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5080
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3491
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1921
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.