.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

why doesnt System.Drawing work on Console Application?

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :.NET Framework
 

hi all

i wanna do a project with openGL in console application.but System.Drawing doesnt work.what must i do?i'm waiting for ur replies.




View Complete Post


More Related Resource Links

Calling a Web Service Method Asynchronously does not work in Console Application

  
I have a web service that has a CreateReport method that generates a report based on the specified criteria. When I call this method Synchronously using a Windows Application or Console Application, the call works fine and the report is created. When I call this method ASynchronously (CreateReportASync) using Windows Application the report is created. When I call this method ASynchronously (CreateReportASync) using Console Application the web service does not even get the call.  I am using VS2005 and .Net Framework 2.0.  So the proxy is automatically created with the Async methods.  I am not really interested the result of the method call, so I do not add a Callback Delegate.  

System.Drawing.Color

  

Hi there,

 

 I am doing one task on asp.net graphics. i would like to a form that let the user choose the color code from the color picker.

inside my backend code, i can get the color code and convert to the system.drawing.color.

 

[Code]

Dim col As System.Drawing.Color = System.Drawing.ColorTranslator.FromHtml("#9932CC")

 Dim Brush As New SolidBrush(col)

[/Code]

but i have some problem in make this col object to alpha color. as i know the .net code that make the system color to become alpha is wrote as like tat :

gr.DrawString(strWatermarkText, wmFont, New SolidBrush(Color.FromArgb(8, 0, 0, 0)), x, y)

 

May someone share me how to make the color input from form to become alpha color? thanx in advanced. hope to hear from you all soon 

 

System.Drawing.Image.Fromfile is not working

  

I am trying to get the height and width of the image dynamically.  The reason is I am loading multiple images using code, where the image name is from the database. 

Here is my code:

in the ascx page, I have an asp image

<asp:image id="imgInfo" runat="server" /> 

 

In the code behind

string ImagePath = "~/products/img/" + dataviewImgInfo[0]["imgName"].ToString();

System.Drawing Image imgProd = System.Drawing.Image.FromFile(ImagePath);

if(imgProd.Height > 200)

imgInfo.Height = 100;

}

else

{

imgInfo.Height = 200

}

 

WHen I run this page I am getting the folloiwng error


Team System: Customizing Work Items

  

Team Foundation Server's work iIem tracking system provides a number of advanced customization options.This article explores custom control support that lets you link to date, enhance the user experience, present data, and more.

Brian A. Randell

MSDN Magazine October 2009


Team System: Work Items and Undo Support

  

Add support for work items to the Team Foundation Server version control add-in.

Brian A. Randell

MSDN Magazine September 2007


Team System: Work Item Tracking

  

In this column, Brian Randell explains how to build a simple Work Item explorer and demonstrates the core operations needed to add work item support when building your own add-in.

Brian A. Randell

MSDN Magazine April 2007


EventType clr20r3, P1 devenv.exe, P2 9.0.30729.1, P3 488f2b50, P4 system.drawing, P5 2.0.0.0, P6 488

  
Hi,I am facing a strange issue in Visual Studio 2008 Standard SP1, when using WPF Designer (even without using the Designer tab, only XAML tab). Visual Studio crashes very often, without any apparent reason, and in various ways, for example: exits instantly, the IDE displays corrupted UI, when begining compiling it stops responding.There are two new Event Log entries after this: EventType clr20r3, P1 devenv.exe, P2 9.0.30729.1, P3 488f2b50, P4 system.drawing, P5 2.0.0.0, P6 4889dec2, P7 33d, P8 18, P9 system.outofmemoryexception, P10 NIL. .NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (7A2E0F92) (0)Worth mentioning:- computer has Windows XP SP3 with the latest updates installed- it crashes on other computer types too- the project has quite a large number of UserControls - it appears that if opening a XAML file with the XML editor instead, it works ok- on other WPF projects it also works okDoes anyone have an ideea why is this happening and solutions? Thanks

How to get the 32 Bit Application to work on 64 bit OS

  
  Hi,         I had wrote a program in 32 bit OS using VS2010 and had to install it on a 64 bit OS. The program crashes when it is opened.   Developer PC: Microsoft Windows Vista SP2 32 bit Tool & Compiler: Microsoft Visual Studio 2010, Configuration : Any CPU Target PC: Microsoft Windows 7 Home Premium 64 Bit The Log is like this below:   Description:   Stopped working Problem signature:   Problem Event Name: CLR20r3   Problem Signature 01: aiassociates.exe   Problem Signature 02: 1.0.0.0   Problem Signature 03: 4c5bdd9e   Problem Signature 04: System.Data   Problem Signature 05: 2.0.0.0   Problem Signature 06: 4a274a01   Problem Signature 07: 205a   Problem Signature 08: 5f   Problem Signature 09: System.InvalidOperationException   OS Version: 6.1.7600.2.0.0.768.3   Locale ID: 18441 Read our privacy statement online:   http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409 If the online privacy statement is not available, please read our privacy statement offline:   C:\Windows\system32\en-US\erofflps.txt     renjith

'System OutOfMemory Exception' while using rdlc in Windows application

  
hi Everyone , I am Using Reporting Service (.rdlc) in my Windows application , i am getting Error System OutOfMemory Exception Like "an error occured during local report processing An Unexpected error occured in Report Processing Exception of type 'System OutOfMemory Exception'Was Thrown " what to do Please anyone help me ... Advance Thanks Anilmarnal

how run my C# console application when i start the computer ?

  
hi i have build a console application (any listener) and i need that when i open the computer - this application will run. i don't have installation for hem (it a simple little .exe file) is there any way to do it through my C# code ? thank's in advance

Displaying a System.Drawing.Bitmap in a WPF Image control

  
How would I convert a System.Drawing.Btimap into a comparable WPF image control so I can display in on my WPF window? Thanks

Imports System.Data.SqlServerCE on Web application

  
Hi everybody, Can we import System.Data.SqlServerCe namesapce to web application? I tried to add The SqlServerCe namespace from AddReference dialog but it didnt show. And I have tried to install compact framework 3.5 but it still the same not show. My requirements are Login to the website and then create a database[.sdf] on the mobile device. Then connect to the .sdf file to retrieve info and display on my webpage. The window mobile device is running on Window CE 5.0 OS. And I'm using MS Visual Studio 2005.   HELP!!!!!!HELP!!!!!!     LEENO

"System.ArgumentException: Font '?' cannot be found" during application start up. Any ideas?

  
We have couple of users that get this error when they run our application.  I have never seen this problem before. Client says fonts are installed and Microsoft Sans Serif font is there as well. Also he states that user has Read permissions to %SytemRoot%Fonts folder. Any suggestions or ideas how to fix this problem will be appreciated. Thank you.  Here is the stack:   Exception: System.ArgumentException: Font '?' cannot be found.   at System.Drawing.FontFamily.GetGdipGenericSansSerif()    at System.Drawing.FontFamily.get_GenericSansSerif()    at System.Drawing.SystemFonts.get_DefaultFont()    at System.Windows.Forms.Control.get_DefaultFont()    at System.Windows.Forms.Control.get_Font()    at System.Windows.Forms.Control.AssignParent(Control value)    at System.Windows.Forms.Control.ControlCollection.Add(Control value)    at Bloomberg.SmartClient.Hosting.ErrorControl.InitializeComponent() in C:\Projects\Source\Client\ApplicationHosting\ErrorControl.cs:line 218    at Bloomberg.SmartClient.Hosting.ErrorControl..ctor(String appTitle, Boolean inPanel, Exception exception) in C:\Projects\Source\Client\ApplicationHosting\ErrorControl.cs:line 119    at Bloomberg.SmartClient.Hosting.ApplicationHost.OnDisplayError(ApplicationDescription appDescription, Excepti

"System.ArgumentException: Font '?' cannot be found" during application start up. Any ideas?

  
We have couple of users that get this error when they run our application.  I have never seen this problem before. Client says fonts are installed and Microsoft Sans Serif font is there as well. Also he states that user has Read permissions to %SytemRoot%Fonts folder. Any suggestions or ideas how to fix this problem will be appreciated. Thank you.  Here is the stack: Exception: System.ArgumentException: Font '?' cannot be found.   at System.Drawing.FontFamily.GetGdipGenericSansSerif()    at System.Drawing.FontFamily.get_GenericSansSerif()    at System.Drawing.SystemFonts.get_DefaultFont()    at System.Windows.Forms.Control.get_DefaultFont()    at System.Windows.Forms.Control.get_Font()    at System.Windows.Forms.Control.AssignParent(Control value)    at System.Windows.Forms.Control.ControlCollection.Add(Control value)    at Bloomberg.SmartClient.Hosting.ErrorControl.InitializeComponent() in C:\Projects\Source\Client\ApplicationHosting\ErrorControl.cs:line 218    at Bloomberg.SmartClient.Hosting.ErrorControl..ctor(String appTitle, Boolean inPanel, Exception exception) in C:\Projects\Source\Client\ApplicationHosting\ErrorControl.cs:line 119    at Bloomberg.SmartClient.Hosting.ApplicationHost.OnDisplayError(ApplicationDescription appDescription, Exception err

Converting System.Windows.Media to System.Drawing objects

  
Hello, I want to know if it's possible to convert the System.Windows.Media objects Color and Imaging.BitmapSource to the System.Drawing objects Color and Bitmap and the other way around. If yes, how can I do this?

System.Diagnostics.Process.Start not work with IIS, but on ASP.NET Development Server

  
System.Diagnostics.Process.Start not work with IIS, but on ASP.NET Development Server 
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend