473,372 Members | 1,039 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,372 software developers and data experts.

Problem with reference to System.Drawing

Although I have added a reference to System.Drawing, the following
declaration produces a compile error:

System::Drawing::Bitmap* b; // error C2039: 'Drawing' is not a member of
'System'

This way I can get things working:

#using <System.Drawing.dll>

System::Drawing::Bitmap* b; // OK

Is it a misconcept that setting up a reference versus #using the appropriate
dll are equivalent?

Thanks for any help,

Károly

Nov 16 '05 #1
3 10287
They should be equivalent.

Can you look at the generated command line for the compile in the build log?
Adding the reference should have added the assembly by the way of the /FU
(which stands for Force Using) switch.

Ronald Laeremans
Visual C++ team

"Ladvánszky Károly" <lk@digicart.hu> wrote in message
news:O8**************@TK2MSFTNGP12.phx.gbl...
Although I have added a reference to System.Drawing, the following
declaration produces a compile error:

System::Drawing::Bitmap* b; // error C2039: 'Drawing' is not a member of 'System'

This way I can get things working:

#using <System.Drawing.dll>

System::Drawing::Bitmap* b; // OK

Is it a misconcept that setting up a reference versus #using the appropriate dll are equivalent?

Thanks for any help,

Károly

Nov 16 '05 #2
Here is the command line:

/Od /AI "C:\Documents and Settings\lk\Dokumentumok\Visual Studio
Projects\TiffTest\Debug" /D "WIN32" /D "_DEBUG" /D "_WINDLL" /D "_MBCS" /FD
/EHsc /MTd /GS /Yu"stdafx.h" /Fp"Debug/TiffTest.pch" /Fo"Debug/"
/Fd"Debug/vc70.pdb" /W3 /nologo /c /Zi /clr /TP /FU
"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System .dll" /FU
"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System .Drawing.dll"
"Ronald Laeremans [MSFT]" <ro*****@online.microsoft.com> az alábbiakat írta
a következő hírüzenetben: O1**************@TK2MSFTNGP09.phx.gbl...
They should be equivalent.

Can you look at the generated command line for the compile in the build log? Adding the reference should have added the assembly by the way of the /FU
(which stands for Force Using) switch.

Ronald Laeremans
Visual C++ team

"Ladvánszky Károly" <lk@digicart.hu> wrote in message
news:O8**************@TK2MSFTNGP12.phx.gbl...
Although I have added a reference to System.Drawing, the following
declaration produces a compile error:

System::Drawing::Bitmap* b; // error C2039: 'Drawing' is not a
member of
'System'

This way I can get things working:

#using <System.Drawing.dll>

System::Drawing::Bitmap* b; // OK

Is it a misconcept that setting up a reference versus #using the

appropriate
dll are equivalent?

Thanks for any help,

Károly


Nov 16 '05 #3
I've just tried it within a new project and it works fine. My guess is it's
the attached legacy library (libtiff) that disturbs the compilation.Thanks
for your response.

Károly

"Ronald Laeremans [MSFT]" <ro*****@online.microsoft.com> az alábbiakat írta
a következő hírüzenetben: O1**************@TK2MSFTNGP09.phx.gbl...
They should be equivalent.

Can you look at the generated command line for the compile in the build log? Adding the reference should have added the assembly by the way of the /FU
(which stands for Force Using) switch.

Ronald Laeremans
Visual C++ team

"Ladvánszky Károly" <lk@digicart.hu> wrote in message
news:O8**************@TK2MSFTNGP12.phx.gbl...
Although I have added a reference to System.Drawing, the following
declaration produces a compile error:

System::Drawing::Bitmap* b; // error C2039: 'Drawing' is not a
member of
'System'

This way I can get things working:

#using <System.Drawing.dll>

System::Drawing::Bitmap* b; // OK

Is it a misconcept that setting up a reference versus #using the

appropriate
dll are equivalent?

Thanks for any help,

Károly


Nov 16 '05 #4

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

Similar topics

7
by: Toby Mathews | last post by:
Hi, In an ASP.Net application I want to convert open create a FileStream object from a System.Drawing.Image - is this possible? I create an instance of an Image object using the FromFile method,...
2
by: James Coburn's Grey Helmet Hair | last post by:
When I try to compile my GTK# app, the compiler says: jbailo@linux:~/mono> mcs buttons.cs -r gtk-sharp.dll -r glib-sharp.dll -r -o buttons.exe error CS2001: Source file 'buttons.exe' could not...
3
by: anastasia | last post by:
I get an out of memory exception when attempting to excecute the following code: original = System.Drawing.Image.FromFile(file.FileName,true); I ONLY get this exception when the file is in the...
1
by: Hadar | last post by:
Hi, I'm getting "object is currently in use elsewhere" when I use System.Drawing.Graphics.MesureString. This is what I do: My controls use a utility class the helps it to mesure strings. To...
2
by: Rlrcstr | last post by:
If I create a new class library project, why is System.Drawing not available to me for Import? I wanted to create a library of color manipulation functions, but I can't declare a color object! ...
4
by: Steve | last post by:
I'm a bit baffled. I'm fairly new to VB.NET so maybe I'm missing something. I'm creating a class that has some application-specific methods and properties and one thing I'd like to do is define...
5
by: hzgt9b | last post by:
I'm building a dataset that writes out a Point type value. Here's the code that I've got: 1 Dim dsContent As DataSet = New DataSet("content") 2 Dim dtAsset As DataTable = New...
5
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,...
1
by: tshad | last post by:
I am running C# in VS 2.0 and when I do: using System.Drawing; I get an error saying that namespace doesn't exist. When I do System. I get a dropdown with a bunch of namespaces but Drawing is...
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...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.