34 Topics

Member Avatar for
Member Avatar for ddanbe

Wanted to let two forms work together. One form would be the input form and the main form would consume this data. I managed to succeed with the help of a few of my friends here at daniweb., who helped me setup a static form. Just posted a bit of …

Member Avatar for JamesCherrill
1
2K
Member Avatar for ddanbe

I wanted to draw a 5 pointed star in C# and here is how I finally did it. I leave it as an exercise (some hints are given in the code) to work out how I did this. It was fun to do (but a bit hard, my trig is …

Member Avatar for ddanbe
1
4K
Member Avatar for PixelExchange

Hello everyone. I would like to know if it is possible to double buffer a .png image using GDI+ Can anyone help me? Below is the code I used to display a png image with alpha transparency, however, I do not know how to double buffer it! Please help. DrawPng …

Member Avatar for owenransen
0
685
Member Avatar for ddanbe

When you want to draw something on a form you need a Graphics object. But a Graphics constructor isn’t public and if that is not enough the Graphics class is also sealed! This means you can’t create a Graphics object via the new keyword nor can you derive from the …

Member Avatar for skatamatic
0
4K
Member Avatar for walid86

i have a png file, or gif if that makes any difference which i am redrawing using GDI+. [ICODE] Bitmap b6 = new Bitmap(525, 525, System.Drawing.Imaging.PixelFormat.Format32bppArgb); b6.SetResolution(300, 300); using (Graphics grPhoto = Graphics.FromImage(b6)) { grPhoto.CompositingMode = CompositingMode.SourceCopy; grPhoto.SmoothingMode = SmoothingMode.HighQuality; grPhoto.InterpolationMode = InterpolationMode.HighQualityBicubic; grPhoto.PixelOffsetMode = PixelOffsetMode.HighQuality; grPhoto.CompositingQuality = CompositingQuality.HighQuality; //now …

0
122
Member Avatar for ddanbe

This is not about a DataGridView or something else, it is just about drawing a simple grid in a form window. Googled a bit but found not much of my liking. A Grid as a BitMap in a PictureBox? Come on! Must have been some of those GUI guys I …

Member Avatar for Wazaah
0
1K
Member Avatar for astha_malik

hi, actually i wanted to draw two cubes programmatically in C# with only top,front and right portions visible.the top and right portion will have the same dimensions but depending on the parameter width provided by the user,the front portion will increase along the horizontal axis.One cube will increase along the …

Member Avatar for Shwetha Dali
-1
6K
Member Avatar for walid86

So i'm creating a form, on the form is a panel (panel1) which holds all data, pictures etc... This is then to be made into a bmp for professional printing (ie 300dpi). A4 @ 300dpi = 2480 x 3508; i am able to create the image at the panel's height …

Member Avatar for walid86
0
1K
Member Avatar for walid86

hi there, i'm creating an app in C# which allows users to select an image by double clicking the "pictureBox1", from there it selects the image, creates a new Graphics object and passes the Bitmap to it. Once the picture has been loaded the user should be able to move …

Member Avatar for walid86
0
969
Member Avatar for rainbow9

I want to draw a editable TextBox on top of picture box and the user is allowed to enter text into this box.After entering text the text box should disappear and the text entered should be painted to the picture in the picture box.Please help me on this,I'am doing this …

Member Avatar for rainbow9
0
2K
Member Avatar for barriegrant1

when uploading an image to the website i get the following error message: [CODE] Server Error in '/' Application. A generic error occurred in GDI+. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and …

Member Avatar for barriegrant1
0
2K
Member Avatar for jayantpaliwal

Hello All, I am working on GDI+ programming and created a windows form to draw lines by mouse. Here is my sample code. [CODE] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Drawing.Drawing2D; namespace SampleApplication { public partial class frmTest : Form { …

Member Avatar for lxXTaCoXxl
0
537
Member Avatar for jayantpaliwal

Hello, I want to create a set of Brush tools as we found in Ms Paint like Crayon, Marker, natural pencil, oil brush and water color brush. How I can achieve this using GDI+? Please help me out on this. Regards, Jayant Paliwal

0
113
Member Avatar for unclepauly

hello, i am using the Graphics.DrawLine method in C# and this is fine for thin lines but for thick lines it draws really badly. i have sample code to reproduce the problem below. just create a new c# forms application and add a picture box to the form. make the …

Member Avatar for jayantpaliwal
0
688
Member Avatar for ddanbe

I mostly use Console or Forms applications in VS for my projects. Did anyone among you ever use an Empty Project when starting a new one? Well, it is as clean as you can get with Visual Studio! The world is at your feet! I use it mainly to test …

Member Avatar for ddanbe
2
956
Member Avatar for ddanbe

Ever wanted to know how to implement running lights? well here is your chance to find out. Open a new Forms application enlarge the Form a bit and drop a Panel and a Timer on it. Add the class ChasingLights to the solution, see code. Implement a form Load, panel …

Member Avatar for Saikalyankumar
5
985
Member Avatar for Diamonddrake

I needed a very simple multi-line label control for a project I was working on, It had very simple requirements. It needed to draw text in any font, in any color, on multiple lines with vertical and horizontal alignment control. So I hacked up this little class. Just as easy …

2
445
Member Avatar for Nirvin M

What is the use of GDI+? Can I use it for creating custom controls to use in Vector Graphics program?

Member Avatar for lolafuertes
0
156
Member Avatar for severman

hi all i'm trying to draw an oval/ellipse over an existing square the problem is that the oval is drawn behind the rectangle how do i fix this? here is my form's code [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; …

Member Avatar for severman
0
165
Member Avatar for Acute

How can i move the Rectangle on the form and animate it as it moves? If i want to move it for example to the right, i must increase it's X cordinate, right? I did it (++x) and drawed a new rectangle and overdrawed the old one with background color. …

Member Avatar for ddanbe
0
714
Member Avatar for moroshko

Hi, I would like to write a program that enable user to draw geometric shapes like circles, triangles, rectangles and so on. I would like also to be able to drag and drop or resize a shape that was previously drawn. 1) I thought to draw the shapes inside a …

Member Avatar for pauldani
0
257
Member Avatar for tuba-zeynep

Hi, I don't know C# very well, so I did^n't understand where the problem is. Program works without errors. But it doesn't do what I want, when I click on panel1 , not draws rectangle. Maybe, you can realise something wrong in the code. [CODE] using System; using System.Collections.Generic; using …

Member Avatar for ddanbe
0
188
Member Avatar for sathya8819

Hi, I have a code where I have to use the region class in drawing. When I type using System.Drawing., the region class doesnt appear in the drop down list. I know this is a kinda silly doubt, but I need to include it in my project. Thanks prashanth

Member Avatar for sathya8819
0
164
Member Avatar for sathya8819

Hi, I have this following code for RGB to HSL conversion, but I do not know how to use it to display my image. Can someone help out [CODE]var_R = ( R / 255 ) //RGB from 0 to 255 var_G = ( G / 255 ) var_B = ( …

Member Avatar for sathya8819
0
228
Member Avatar for Byrne86

Iv made conways game of life, but I want the user to be able to select a pre defined pattern or for them to be able to choose different shaped brushes then draw with that brush. Aswell, when I use the radio buttons to change the size, the program goes …

Member Avatar for Geekitygeek
0
224
Member Avatar for student88

hi all .. just want to ask if anyone have an idea how can i move image down throug keyboard cursors up an down .. i know that there is the keydown event and the keyup event but really i don't know how to write the code .. other qusetion …

Member Avatar for student88
0
172
Member Avatar for student88

hi all iam new in this forum and i need some help in my assignment .. it's a c# game using graphics .. this game when start it should show a sheep then a chicken randomly then all graphics will move to the left .. there will be a dora …

Member Avatar for Geekitygeek
0
153
Member Avatar for sidd.

hi, i have a graph and i wanna zoom somw particular area in it. Is there any zoom function available... thanx

Member Avatar for Geekitygeek
0
348
Member Avatar for ronson

Ok I'm converting a program from Java to C# and currently stuck on a certain aspect of it. Ok I have; [code=Java]private Graphics g1; private Bitmap picture; picture = new Bitmap(x1, y1); g1 = Graphics.FromImage(picture); pbMand.Image = picture;[/code] pbMand is the name of my picture box, which I will use …

Member Avatar for ronson
0
227
Member Avatar for Diamonddrake

I have been working on a custom Hue Slider, when you drag the knob the color of it changes to its hue value. (ex 0 is red). I added a little gloss to the knob, I feel its not done, I Just don't have any Ideas as to how to …

Member Avatar for Diamonddrake
1
170

The End.