Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

Alan Zhao

@Alan Zhao
About
Posts
17
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • MCAD certification
    A Alan Zhao

    I need some comments and suggestions on getting MCAD certification(Microsoft Certified Application Developer). Or do you suggestion getting others? Here is the information I found: http://www.microsoft.com/learning/mcp/mcad/requirements.asp Tell me your personal experiences and your steps getting it, and learning resources. Thanks!!!

    IT & Infrastructure com mcp business question learning

  • "On screen keyboard" user control
    A Alan Zhao

    Hi, thanks for the help, but I didn't expect it to be this complicated.;) This on-screen keyboard is written in Visual C#, so each Button represents a key. Therefore, when the user touch the button on the screen, it's like you click the button using mouse. So the SomeKey_Click() event fired. My problem is how do I tell system that SomeKey is pressed without physically type the key. Thanks again!

    C# tutorial question

  • "On screen keyboard" user control
    A Alan Zhao

    So how do I sent the keyboard message as if user has press the key on keyboard when he/she really touchs the mointor. Thank!

    C# tutorial question

  • "On screen keyboard" user control
    A Alan Zhao

    How do you send the messages to Windows message queue and what's Windows message queue? I am emulating a keyboard with all letters, digits, and a enter key. Correction: What should I have in MouseDown or Click event b/c the keys are clicked by touch on the screen.

    C# tutorial question

  • "On screen keyboard" user control
    A Alan Zhao

    Hi, I am trying to write a custom user control which is a "On screen keyboard" used for touch screen monitor. So when user press a key on the "On screen keyboard", the program knows as if the key on the keyboard is pressed. What should I have in KeyPress event for each keyboard character? or there are some other ways to do it? Also, how to loop through all key chars on keyboard? Thank!!!!

    C# tutorial question

  • Check if Windows Form is already loaded
    A Alan Zhao

    Can I do this: private someForm form; if (form == null) form = new someForm(); Also, is form = null when disposed? How do I know if a form is disposed? Thank!

    C# question csharp

  • Check if Windows Form is already loaded
    A Alan Zhao

    Yes, I mean the MDI child form, because it can be loaded multiple times. We just want to have one form at a time.

    C# question csharp

  • Check if Windows Form is already loaded
    A Alan Zhao

    Hi guys, I guess it's a pretty easy question for you. How do you check if a Windows Form (object) is already loaded in C#? Thanks!

    C# question csharp

  • Upgrade VS.NET to .NET 1.1
    A Alan Zhao

    Ok, I am using Visual Studio .NET & .NET Framework 1.0, and I want to upgrade it to .NET 1.1. I've already downloaded and installed the .NET Framework 1.1 redistribute package, but VS .NET doesn't seem to recognized the new verison and I am not able to use System.Windows.Forms.FolderBrowserDialog which is only supported in 1.1 version. Help please! Thanks!

    .NET (Core and Framework) csharp visual-studio dotnet help announcement

  • Drawing 3D piechart(the 3D depth part)
    A Alan Zhao

    Hi, Does anybody know the method of drawing 3D piechart? I mean only the 3D depth part. Example[^] I already have a piechart drawn, and tried to draw the 3D depth by drawing the dumplicated piechart along the Y axis with darker color serval times underneath the top piechart. but the result is not right. see my piechart here[^] I also took a look at the code from http://www.codeproject.com/aspnet/webchart.asp[^] without success. I hope I can solve this problem soon, and post this project to CP. Thank!!!:)

    C# asp-net com graphics help tutorial

  • Graphic problem?
    A Alan Zhao

    Hello everyone, how do I save and print a graphic created by GDI+, using C#? I just want to save and print the graphic not including the form where graphic was drawn. Thank!!!:)

    C# question csharp winforms graphics help

  • How to get a point within a circle
    A Alan Zhao

    Hi Bill, thanks for the message! Finally I sloved my problem:)

    C# tutorial question

  • How to get a point within a circle
    A Alan Zhao

    can you explain this "rad = 6.28 / 360;" Thank you!

    C# tutorial question

  • How to get a point within a circle
    A Alan Zhao

    Ok, I should explain my problem, I have a piechart(circle or ellipse), and I want to find the middle point of each pie where the percentage text goes. and given the middle point degree of each pie and diameter. Example piechart[^] Can you guys come up with a solution for me please. Thanks!!

    C# tutorial question

  • How to get a point within a circle
    A Alan Zhao

    Hi, does anybody know the equation fo finding a point with in a cirlce(ellipse) given the degree of the point and the diameter? Thanks!:)

    C# tutorial question

  • Help with this PieChart control
    A Alan Zhao

    Can you explain please, I really want this control to work. Thank!

    C# graphics help com design tutorial

  • Help with this PieChart control
    A Alan Zhao

    hi, I've been coding this PieChart control all day now, just couldn't get it to work, if you know how to write a custom control, plese help me. The main problem I have here is at the OnPaint() the PieChart doesn't draw all the pies except the first pie. What am I missing on writing a custom control here? Complete codes are below or you can download the project here PieChart.cs

    using System;
    using System.Collections;
    using System.ComponentModel;
    using System.ComponentModel.Design;
    using System.Drawing;
    using System.Drawing.Drawing2D;
    using System.Drawing.Design;
    using System.Data;
    using System.Windows.Forms;

    namespace ColorControl.Controls
    {
    public class PieChart : System.Windows.Forms.Control
    {
    // collection
    private PieChartItemCollection _Items = new PieChartItemCollection();

        public PieChart() 
        { 
            base.Size = new Size(200, 200); 
            SetStyle( 
                ControlStyles.AllPaintingInWmPaint | 
                ControlStyles.ResizeRedraw | 
                ControlStyles.DoubleBuffer | 
                ControlStyles.UserPaint, 
                true 
                ); 
        } 
         
        public PieChartItemCollection Items 
        { 
            get 
            { 
                return \_Items; 
            } 
            set 
            { 
                \_Items = value; 
                this.Invalidate(); 
            } 
        } 
    
        protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) 
        { 
            int valueSum = 0; 
            int startDegree = 0; 
            int sweepDegree; 
    
            // sum of values 
            foreach (PieChartItem item in \_Items) 
            { 
                valueSum += (int)item.Value; 
            } 
    
            e.Graphics.SmoothingMode = SmoothingMode.AntiAlias; 
            Rectangle rect = new Rectangle(ClientRectangle.X, ClientRectangle.Y, 
                ClientRectangle.Width - 1, ClientRectangle.Height - 1); 
    
            if (valueSum != 0) 
            { 
                // draw each pie 
                foreach (PieChartItem item in \_Items) 
                { 
                    // degree of each pie 
                    sweepDegree = (int)(item.Value / valueSum \* 360); 
    
                    SolidBrush brush = new SolidBrush(item.Color);
    
    C# graphics help com design tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups