34 Topics
|
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 { … |
|
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 |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
|
What is the use of GDI+? Can I use it for creating custom controls to use in Vector Graphics program? |
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; … |
|
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. … |
|
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 … |
|
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 … |
|
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 |
|
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 = ( … |
|
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 … |
|
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 … |
|
hi, i have a graph and i wanna zoom somw particular area in it. Is there any zoom function available... thanx |
|
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 … |
|
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 … |
The End.