Click here to Skip to main content
15,921,646 members
Home / Discussions / C#
   

C#

 
GeneralRe: Listviewcontrol and background color Pin
Wendelius30-Aug-08 8:57
mentorWendelius30-Aug-08 8:57 
GeneralRe: Listviewcontrol and background color Pin
Yustme30-Aug-08 10:50
Yustme30-Aug-08 10:50 
GeneralRe: Listviewcontrol and background color Pin
Wendelius30-Aug-08 11:05
mentorWendelius30-Aug-08 11:05 
GeneralRe: Listviewcontrol and background color Pin
Yustme30-Aug-08 22:08
Yustme30-Aug-08 22:08 
GeneralRe: Listviewcontrol and background color Pin
Wendelius30-Aug-08 22:27
mentorWendelius30-Aug-08 22:27 
GeneralRe: Listviewcontrol and background color [modified] Pin
Yustme31-Aug-08 0:14
Yustme31-Aug-08 0:14 
GeneralRe: Listviewcontrol and background color Pin
Wendelius31-Aug-08 1:29
mentorWendelius31-Aug-08 1:29 
Questionnon-rectangular window Pin
TerRO_GirL29-Aug-08 23:54
TerRO_GirL29-Aug-08 23:54 
i have this non rectangular window (spline-shaped) :



using System;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Drawing2D;

namespace Guitar
{
    class GuitarForm : Form
    {
        Bitmap bmp;
        GuitarForm()
        {
            
          //  this.FormBorderStyle = FormBorderStyle.None; 
            bmp = new Bitmap("C:\\ok.jpg");
            GraphicsPath gp = new GraphicsPath();

           
            Point[] curves = new Point[]{
new Point(93,99), new Point(200, 55),
new Point(328, 128),new Point(450,100),new Point(560,200),
};
            gp.AddCurve(curves);
            gp.AddLine(560,200, 560, 500);
            gp.AddLine(560, 500, 93, 500);
            gp.AddLine(93, 500, 93, 99);
            gp.CloseFigure();




            this.Region = new Region(gp);
        }

        protected override void OnPaint(PaintEventArgs ea)
        {
            base.OnPaint(ea);
            Graphics g = ea.Graphics;
            g.DrawImage(bmp, new Point(0, 0));
            Rectangle scaled = new Rectangle(20, 20, 60, 60);
            g.DrawImage(bmp,scaled);
            g.DrawRectangle(Pens.Red, scaled);
            Point[] pGram = new Point[]{
new Point(50, 10),
new Point(100, 30),
new Point(20, 100),
};
            g.DrawImage(bmp, pGram);
        }


        public static void Main()
        {
            Application.Run(new GuitarForm());
        }

    
        private void InitializeComponent()
        {
            this.SuspendLayout();
            // 
            // GuitarForm
            // 
            this.ClientSize = new System.Drawing.Size(560, 560);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.Name = "GuitarForm";
            this.ResumeLayout(false);

        }
      
    }///:~
}





the problem is that when i run it, only one part of the window appears and i have to drag to brders in order to see the whole shape . Is there any way it can run all-ready sized the way i want it ?
AnswerRe: non-rectangular window Pin
MarkB77730-Aug-08 0:50
MarkB77730-Aug-08 0:50 
GeneralRe: non-rectangular window Pin
TerRO_GirL30-Aug-08 5:42
TerRO_GirL30-Aug-08 5:42 
QuestionCombobox event Pin
vasusoftsol29-Aug-08 23:15
vasusoftsol29-Aug-08 23:15 
AnswerRe: Combobox event Pin
Anthony Mushrow29-Aug-08 23:38
professionalAnthony Mushrow29-Aug-08 23:38 
AnswerRe: Combobox event Pin
Mbah Dhaim30-Aug-08 10:50
Mbah Dhaim30-Aug-08 10:50 
Questionstencil bar in ms visio Pin
tahir_makhdoom29-Aug-08 23:14
tahir_makhdoom29-Aug-08 23:14 
AnswerRe: stencil bar in ms visio Pin
Abisodun30-Aug-08 9:01
Abisodun30-Aug-08 9:01 
Questioninvoices .. print to specefic Point or RDLC? Pin
Jassim Rahma29-Aug-08 22:18
Jassim Rahma29-Aug-08 22:18 
AnswerRe: invoices .. print to specefic Point or RDLC? Pin
Naji El Kotob26-Oct-09 4:03
Naji El Kotob26-Oct-09 4:03 
Questionproblem in binded columns to DataGridView Pin
Jassim Rahma29-Aug-08 22:16
Jassim Rahma29-Aug-08 22:16 
AnswerRe: problem in binded columns to DataGridView Pin
leppie29-Aug-08 22:51
leppie29-Aug-08 22:51 
GeneralRe: problem in binded columns to DataGridView Pin
Jassim Rahma29-Aug-08 22:53
Jassim Rahma29-Aug-08 22:53 
AnswerRe: problem in binded columns to DataGridView Pin
Wendelius30-Aug-08 4:57
mentorWendelius30-Aug-08 4:57 
GeneralRe: problem in binded columns to DataGridView Pin
Jassim Rahma30-Aug-08 8:22
Jassim Rahma30-Aug-08 8:22 
GeneralRe: problem in binded columns to DataGridView Pin
Wendelius30-Aug-08 8:31
mentorWendelius30-Aug-08 8:31 
GeneralRe: problem in binded columns to DataGridView Pin
Jassim Rahma30-Aug-08 8:36
Jassim Rahma30-Aug-08 8:36 
GeneralRe: problem in binded columns to DataGridView Pin
Wendelius30-Aug-08 8:48
mentorWendelius30-Aug-08 8:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.