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


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

First Steps with VS2010 RC - System.Drawing; missing?

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :WPF
 
I'm a little confused! I was curious about the new VS2010 RC and as I wanted to start with a new Software Project I  wanted to give it a try. 1. Installation troubble with Silverlight but VS2010 loads without errors. 2. Now I wanted to try out this things with a full aero window and found a nice and simple code snipplet on the MSDN .NET FW4 Extend Glass Frame Into a WPF Application So I made this short changes in my first source code and I'm getting the strange message: Error    1    The type or namespace name 'Drawing' does not exist in the namespace 'System' (are you missing an assembly reference?)    D:\Projekte\Selfmade\Software\CAS_Information\CAS_Information\MainWindow.xaml.cs    19    14    CAS_Information I found a lot of c# code with a using System.Drawing; but on my installation I dont have such a namespace. What the heck is wrong there?   Windows 7 x64 - VS2010 RC


View Complete Post


More Related Resource Links

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


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

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

system.runtime.serialization 3.0 missing

  
Trying to install an app that apparently needs system.runtime.serialization 3.0 installed. I tried downloading the 3.0 framework and installing that - but it wont let me install it. Says i need to install that through the role management tool. This is on a win2k8 r2 web server. Also need system.IdentityModel 3.0  - might need others as well, not sure. So whats the correct way to get this on there? thanks

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?

XmlSerializer: Serialize an array of System.Drawing.Color

  
Ok,  here is my problem... I am building a UI configuration tool that utiliizes a PropertyGrid.  One of the properties is a indexed list of Colors contained in an array: CategoryAttribute("Style"), DisplayName("Data Set Colors"), DescriptionAttribute(""), XmlArray("SetColors"), XmlArrayItem(ElementName="Color",Type=typeof(SColor))] public Color[] SetColors { get; set; } The beauty of the PropertyGrid is it knows how to handle this Poperty and properly handles array and list of Colors. BUT...   As we already know in order to serialize a Color,  we have to use a surrigate property,  which is very unfortunate, and I fear is one of those little thing MS just overlooked.  (I understand it is actually a structure and not a class and has not default properties from which to get type info from.) I am really amazed that when I do serialize the class,  the XML is soooo  close to what I need,  its just missing the actual color value data: <AppGridColumnConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Name>Label</Name> <SetColors> <Color /> <Color /> <Color /> </SetColors> <IsDefaultEditable>false</IsDefaultEditable> <IsDirtyCheck&

The configuration section 'system.web.extensions' cannot be read because it is missing a section d

  
My system: I have installed Windows 7, VS2010 and .NET40 and ASPAJAXExtSetup.msiI'm getting the error below. Error Summary HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error Information Module IIS Web Core Notification Unknown Handler Not yet determined Error Code 0x80070032 Config Error The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration Config File \\?\C:\inetpub\tickets\web.config Requested URL http://www.tickets.com:80/ Physical Path Logon Method Not yet determined Logon User Not yet determined Config Source 45: </connectionStrings> 46: <system.web.extensions> 47: <scripting> My web.config:<?xml version="1.0"?><configuration>    <connectionStrings>            </connectionStrings>    <system.web.extensions>        <scripting>            <webServices>                <!--http://weblogs.asp.net/andrewfrederick/archive/2008/02/18/a-client-sid

System.Data.SqlServerCe Missing in \.NETFramework\v4.0

  

Hi,

I am trying to install SQL Compact Edition on Windows 7 desktop Home Edition.  I am using visual studio C# 2010 Express Edition and have SQL Express 2008

When I add "using System.Data.SqlServerCe", SqlCeConnection, isn't referenced.  I cannot find/add System.Data.SqlServerCe as a .NET reference.  When I navigate to C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0.  SqlServerCe isn't present.  However, I can find the necessary file within

C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v4.0\Private
System.Data.SqlServerCe.dll
System.Data.SqlServerCeEntity.dll

C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v4.0\Private\x86
sqlceca40.dll
sqlcecompact40.dll
sqlceer40EN.dll
sqlceme40.dll
sqlceqp40.dll
sqlcese40.dll

When I add a reference to C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v4.0\Private\System.Data.SqlServerCe.dll, SqlCeConnection, turns blue and is refereced.  But wh

Database Explorer missing in VS2010

  

I uninstalled VS2008 and set up VS2010. Since I already have SQL Server 08 Dev Edition in my computer, I didn't select the SQL Express option during the setup. When I try to add a new SQL Server Database item to an ASPX file of a website, it fails and the following message shows.

Connections to SQL Server database files (.mdf) require SQL Server 2005 Express or SQL Server 2008 Express to be installed and running on the local computer. 

However I can drag a SqlDataSource control to the page and successfully connected to a table of an existing .mdf. The only problem is I can't access the Database Explorer.

How can I solve this problem?


vs2010 and System.Web.Mobile

  

I have a strange problem with a mobile web project in Vs2010.

It's a project i upgraded from a vs2005 project.

I didn't do anything with it, just compiled it and made sure it compile.

But now I tried to run it and it will not run.

I get error:

Parser Error
An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load file or assembly 'System.Web.Mobile' or one of its dependencies. The system cannot find the file specified.
File: D:\bacsoft-branches\Dev2010\Client\WapClient2\Default.aspx
Line: 3

The project reference is indeed to System.Web.Mobile v4.0.30319.

Does any body have any idea on how to work around this problem?

Also, I see that vs2010 won't allow editing of mobile controls in the designer.

Is microsoft removing support for System.Web.Mobile?

And if so, what are we supposed to use instead?

Thanks,

Nadav

 


Event handler lightning bolt missing in VS2010

  

I have recently upgraded from VS2008 to VS2010 after a few months away from ASP.NET coding and I am hitting a problem I never had before. I seem to remember having a lightning bolt icon in the properties window for a web form that would automatically create the skeleton event handler code for any one of a range of page events. However, I cannot see this lightning bolt anywhere in VS2010.

Some guidance would be much appreciated. It would be a chore to have to create this code every time from scratch.

David  


System.Drawing.Image.FromFile crashes for tiff files on 64bit system

  

The following pice of code runs fine on my development machine (win7, 32bit) but ends with Exception on the server (Win2008R2, 64bit).

 

        static void Main(string[] args)

        {

            Image image = Image.FromFile(args[0]);

            Console.WriteLine(image.Size.ToString());

        }

 

 

The exception will be thrown for TIFF files (from other sources) but ie not for PNG files.

I was wondering why the test program above works fine on my Win 32bit machine with .NET 4 but not on my 64bit machine with .NET 4.

Any help appreciated.

Thanks.

RSB


Use System.Drawing class

  

Hi,

How can I to use System.Drawing.Bitmap class into athoer class?


using System.Data;
using System.Collections;
using System.Globalization;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Globalization;
using System.Text;



namespace University
{
    public class Class1
    {

      System.Drawing.Bitmap BMP=new System.Drawing .Bitmap();

    }

}

when I use System.Drawing.Bitmap gives error this class does not exists !!!!!!!!


How to Convert System.Drawing.Image Variable to Byte variable

  

Hi

I got a variable of type System.Drawing.Image and need to convert it to a variable of type byte so I can store the image in the database. Can someone show me how to do that in VB.NET code.

Thanks alot


oledbdm.h is missing (Win7, MSSQL 2008 & VS2010 beta)

  
Hello All,

I decided to write my first plug-in algorithm. I downloaded the DMMgdPlugInAPI.msi package, but the wrapper will not compile due to oledbdm.h missing on my system. I've searched my filesystem and double-checked to ensure I had the MMSQL SDK installed. Do I need to install SQL 2005(The word doc says it is installed with 2005) or is there some other way to get the header & library files under 2008? I can successfully compile SQL Server assemblies that have custom aggregates and functions in them. So, I know the compiler install works. 

Any help or suggestions would be greatly appearciated.

Thanks!

Unable to cast COM oject of type 'System.__ComObject' to class type of 'System.Drawing.Bitmap' .

  
 private void DirectXViewer_DragDrop(object sender, DragEventArgs e)

  {

   mousePressedFlag = false;

   if(e.Data.GetDataPresent(typeof(Bitmap)))

   {

    Object obj = e.Data.GetData(typeof(Bitmap));

    

    {

     try

     {

      Bitmap image = (Bitmap)((Bitmap)obj).Clone();

      RenderImage = image;

      image.Dispose();

     }

     catch(Exception ex)

     {

      MessageBox.Show(ex.Message.ToString());

     }

    

    }

   }

  }

private void DirectXViewer_MouseMove(object sender, MouseEventArgs e)

  {



   if (mousePressedFlag)

   {

    if(cacheBitmap != null)

     this.DoDragDrop(new Bitmap(cacheBitmap), DragDropEffects.Copy);

    

   }

  }

Hi All,

I try to d

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