Click here to Skip to main content
15,902,447 members
Everything / System.Drawing

System.Drawing

System.Drawing

Great Reads

by The Zakies
we would create Hand_tool to pan through the drawing form, and we would use a custom cursor of open and closed hands
by The Zakies
we will continue the functionality of the hand tool with having a navigator panel which works as a map, we will also have a red rectangle which tells the user where he is actually viewing inside the whole form, also it can be moved to pan the form
by The Zakies
[tut4] how to draw lines & to draw different types on end shapes like rectangle and circle using C#
by The Zakies
we will build an outline line around the drawn lines so we would test the mouse click on this outline to know which line is selected. and we would in the coming update build a select function inside the move tool

Latest Articles

by The Zakies
we will continue the functionality of the hand tool with having a navigator panel which works as a map, we will also have a red rectangle which tells the user where he is actually viewing inside the whole form, also it can be moved to pan the form
by The Zakies
we would create Hand_tool to pan through the drawing form, and we would use a custom cursor of open and closed hands
by The Zakies
in this tut we will create a technique to enable the user to control points within a drawn line, by drawing circles around points of the line , when the user clicks a circle he would control the corresponding point.
by The Zakies
we will build an outline line around the drawn lines so we would test the mouse click on this outline to know which line is selected. and we would in the coming update build a select function inside the move tool

All Articles

Sort by Score

System.Drawing 

29 Jun 2016 by The Zakies
we would create Hand_tool to pan through the drawing form, and we would use a custom cursor of open and closed hands
18 Jan 2012 by Sergey Alexandrovich Kryukov
If you are using System.Drawing, StringFormat might be not universal enough for you.This is one much more universal tool which will allow you to change orientation and do other linear transformations with ease. What you need is the property System.Drawing.Graphics.Transform, please see...
25 Mar 2013 by Sergey Alexandrovich Kryukov
It looks like you are using System.Drawing and System.Windows.Forms. You should always tag the libraries you use for UI and graphics.Look at the Bitmap class. It implements System.IDisposable. It means that, whatever you do, you should eventually call System.IDisposable.Dispose for each...
13 Jun 2013 by Sergey Alexandrovich Kryukov
It's wonderful how many different people come to the same idea again and again. I'm pretty much sure: this is possible, but this is a really a dead-end approach, making no practical sense. Picture boxes won't help you at all.Please see my past answer: Drawing Lines between mdi child...
27 May 2014 by Sergey Alexandrovich Kryukov
It looks like you already know how to invalidate the rendered image; I would only add that you can improve performance by invalidating only part of the scheme using System.Windows.Controls.Invalidate with parameters (Rectangle or...
28 May 2014 by Mitchell J.
Congratulations for asking a decent question! :thumbsup:This is one of the clearest questions I have ever seen.Anyway, in your current code, you use this sort of structure twice:if (e.Y == yf1){ if (e.X == x2) { //etc..There's the problem!e.Y and e.X are exact...
3 Jun 2014 by Sergey Alexandrovich Kryukov
Please see my comment to the question. It's really not good to answer again to the question answered so many times. Please see:http://www.codeproject.com/search.aspx?q=Web+camera+capture+Forms&doctypeid=1%3b5[^].—SA
3 Jul 2016 by The Zakies
we will continue the functionality of the hand tool with having a navigator panel which works as a map, we will also have a red rectangle which tells the user where he is actually viewing inside the whole form, also it can be moved to pan the form
9 Nov 2013 by Murugan Kolanji
Hi techie,I am developing a .NET windows application, for managing scanning documents.In my project I am converting the scanned images into tiff file by using System.Drawing.Imaging.Save (or) SaveAdd methods.It is working fine, when I am converting 10-15 images into single tiff file. If...
11 Nov 2013 by Marc Gabrie
Try http://bitmiracle.com/libtiff/[^] which is an open-source project that deals with TIFF format
3 Jul 2015 by Sergey Alexandrovich Kryukov
Sorry, but all this is totally off-topic. This is low-tech user-level stuff. You referenced something which was automatically deleted due to abuse report; same should go with your post. Please don't post off-topic matter, find some different site.—SA
3 Jun 2016 by OriginalGriff
The only change I needed to make to your code was to add an atsign:xPanel.Save(@"c:\path\graphicline.png");Without it your code would not compile. Changing that to a valid folder on my PC, I can then look at the file it generated: Dropbox - graphicline.png[^] As you can see, it's yellow, has...
6 Jun 2016 by Member 11242200
using System.Drawing to graph 9 ellipses. First problem how do you initialize "PaintEventArgs" in Default.aspx. Second problem is if first problem does not solve it then what is wrong with my code? protected void Page_Load(object sender, PaintEventArgs e) { ...
6 Jun 2016 by Richard Deeming
The Load event[^] doesn't take a PaintEventArgs; it takes an EventArgs.Since you're not using the argument anywhere, just change the method signature to:protected void Page_Load(object sender, EventArgs e){ ...}
5 Nov 2018 by lathan89
I'm using System.Drawing.Font to apply css to some html elements. I see that the resultant css has font-size always in px for eg font-size: 16px; . I want the font-size in em for eg font-size: 1em; . The reason why I want the css in em is because only in this case , change in font-size in...
5 Nov 2018 by #realJSOP
Set your body font size in px, and that's 1em throughout the document. You can then make your font sizes in the rest of your css in em.
13 Jun 2013 by User 6679439
Your code seems to be working fine except for one small detail: the coordinates of the picturebox are wrongly calculated. There is a simple solution for that:x1 or x2 = pic.Left;y1 or y2 = pic.Top;
7 Jun 2016 by The Zakies
[tut4] how to draw lines & to draw different types on end shapes like rectangle and circle using C#
20 Jun 2016 by The Zakies
we will build an outline line around the drawn lines so we would test the mouse click on this outline to know which line is selected. and we would in the coming update build a select function inside the move tool
24 Jun 2016 by The Zakies
in this tut we will create a technique to enable the user to control points within a drawn line, by drawing circles around points of the line , when the user clicks a circle he would control the corresponding point.
7 Apr 2016 by The Zakies
Part 3 of a tutorial to show a graphics program using C# using GDI and SVG drag and drop and delete objects
27 May 2014 by Bacchus Beale
It depends how you set up your buttons.If they are just Buttons with Text the Click event just needs to set the BackColor:button1.BackColor=Color.Black;If they are Buttons with Images, it would be best to create the images for the different colours you need and swap the Image on a Click...
25 Mar 2013 by sigsand
Hi.I have an application that captures the video from my webcam and bufferes it using a queue. I am using aforge.net to capture the video. I have a problem with the program taking up a lot of memory. Even when the buffer is full it still continues to eat on the memory. I would think that it...
13 Jun 2013 by bahman01
In my program I have a List of picturebox and during the program when I push a button a new picturebox will be created. But I want to draw 2 lines between two selected pictureboxes by MouseDown and MouseUp but no line will be drawn.Here is my code:public partial class Form1 : Form {...
28 May 2014 by TAOG ASOGA
I'm have to basically remake a game for my final school project. The project is progressing well, but I'm only stuck on a part where I need the black tiles in the game to change color when clicked. The game I'm trying to remake is called "Piano Tiles". To shorten the story, watch this:...
18 Jan 2012 by venkatrao palepu
Hi,I am trying to draw text on image using drawstring method of graphics object.I am using below code to draw the string in verticalIn my code i am using the namespace: using System.Drawing; StringFormat formatver = new StringFormat(StringFormatFlags.DirectionVertical);But...
7 Jun 2014 by njsa
For C++ version, I wrote the following code according to an open source project to capture camera with pressing on a button:For executing code bellow, test your written project using opencv 2.4.6 in VS2012 and add header file and libraries to avoid linker errors. then, make up a win form and...
2 Jun 2016 by Member 11242200
In System.Drawing what do I need to put in Default.aspx to make the following work?Default.aspx.csusing System.Drawing;using System.Drawing.Drawing2D;namespace GraphOrbits{ public partial class _Default : Page { protected void Page_Load(object sender, EventArgs...
2 Jun 2016 by Sergey Alexandrovich Kryukov
The code you've shown simply does nothing, only wastes CPU time and creates unmanaged resource leak for the IDisposable objects, which you fail to Dispose. Essentially, you create the object Bitmap xPanel, draw on the bitmap, and return from the method. The reference to this object goes nowhere...
3 Jun 2016 by Member 11242200
I have written this program with "using System.Drawing;":I do not know if it worked because there is no yellow just a blank webpage. Is there something I need to put in Default.aspx so this will work? Bitmap xPanel = new Bitmap(200, 200); Graphics...
13 Jun 2018 by Jordan Nash
Hello, I want to display certain metadata in my listbox for the selected image in my picture viewer that isn't in this library by Asim Goheer which I'm using. https://www.codeproject.com/Articles/11305/EXIFextractor-library-to-extract-EXIF-information?msg=5528243#xx5528243xx PROBLEM: ...