473,387 Members | 1,530 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,387 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 10289
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...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.