Click here to Skip to main content
15,898,134 members
Home / Discussions / C#
   

C#

 
GeneralRe: Inserting multiple IDs in Items table but the same ID should go into MasterRequest table just once. Pin
Omar Akhtar 200922-May-10 1:57
Omar Akhtar 200922-May-10 1:57 
GeneralIt Works! PinPopular
Roger Wright21-May-10 18:33
professionalRoger Wright21-May-10 18:33 
GeneralRe: It Works! Pin
Luc Pattyn21-May-10 22:36
sitebuilderLuc Pattyn21-May-10 22:36 
GeneralRe: It Works! Pin
Roger Wright22-May-10 4:20
professionalRoger Wright22-May-10 4:20 
GeneralRe: It Works! Pin
Luc Pattyn22-May-10 4:30
sitebuilderLuc Pattyn22-May-10 4:30 
GeneralRe: It Works! Pin
DaveyM6921-May-10 22:46
professionalDaveyM6921-May-10 22:46 
GeneralRe: It Works! Pin
Roger Wright22-May-10 4:23
professionalRoger Wright22-May-10 4:23 
GeneralRe: It Works! Pin
Roger Wright27-May-10 16:55
professionalRoger Wright27-May-10 16:55 
I tried the past few nights to apply what I think you were trying to show me, but I'm lost. I hope maybe you can steer me in the right direction.

I made a user control, derived from UserControl, added a few buttons and textboxes, and reserved space for a graphic. To wit:

namespace MyPanel
{
    public partial class FlowPanel : UserControl
    {
        public FlowPanel()
        {
            InitializeComponent();
            Graphics dc = this.CreateGraphics();
            this.Show();
            Pen bluePen = new Pen(Color.Blue, 3);
            dc.DrawRectangle(bluePen, 170, 10, 100, 100);

        }
    }
}


The Designer added the appropriate controls:

private System.Windows.Forms.GroupBox gbSelect;
        private System.Windows.Forms.RadioButton rbTrap;
        private System.Windows.Forms.RadioButton rbRect;
        private System.Windows.Forms.RadioButton rbCircular;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.TextBox textBox1;
        private System.Windows.Forms.TextBox textBox2;
        private System.Windows.Forms.TextBox textBox3;


In the constructor above I added a device context and method calls to draw a rectangle 100 x 100 to the right of the other controls. There are no error messages or warnings, but when I add the skeleton control to a test form, nothing draws. The other elements look great - positioned right where I want them. I don't understand why the drawing part doesn't work, since I copied it almost word for word from a text that has been otherwise reliable.

Is a UserControl unable to support graphic operations like a Panel? I did try to put a Panel in the UserControl, but I couldn't find anyplace to add the drawing code - there's no constructor I can add to.

Any suggestions will be greatly appreciated...
"A Journey of a Thousand Rest Stops Begins with a Single Movement"

GeneralRe: It Works! Pin
DaveyM6928-May-10 8:47
professionalDaveyM6928-May-10 8:47 
GeneralRe: It Works! Pin
Roger Wright28-May-10 15:45
professionalRoger Wright28-May-10 15:45 
GeneralRe: It Works! Pin
Mohsiul Haque21-May-10 22:52
Mohsiul Haque21-May-10 22:52 
GeneralRe: It Works! Pin
Ravi Bhavnani22-May-10 6:05
professionalRavi Bhavnani22-May-10 6:05 
GeneralRe: It Works! Pin
PIEBALDconsult22-May-10 8:18
mvePIEBALDconsult22-May-10 8:18 
QuestionC # Pin
Make Up Forever21-May-10 14:27
Make Up Forever21-May-10 14:27 
AnswerRe: C # Pin
Dr.Walt Fair, PE21-May-10 14:55
professionalDr.Walt Fair, PE21-May-10 14:55 
GeneralRe: C # Pin
Make Up Forever21-May-10 15:11
Make Up Forever21-May-10 15:11 
GeneralRe: C # Pin
AspDotNetDev21-May-10 15:31
protectorAspDotNetDev21-May-10 15:31 
GeneralRe: C # Pin
Dr.Walt Fair, PE21-May-10 15:34
professionalDr.Walt Fair, PE21-May-10 15:34 
AnswerRe: C # Pin
Wes Aday21-May-10 17:05
professionalWes Aday21-May-10 17:05 
QuestionError Icomparer interface - To sort FileInfo Pin
quanvt21-May-10 13:55
quanvt21-May-10 13:55 
AnswerRe: Error Icomparer interface - To sort FileInfo Pin
Luc Pattyn21-May-10 14:20
sitebuilderLuc Pattyn21-May-10 14:20 
AnswerRe: Error Icomparer interface - To sort FileInfo Pin
AspDotNetDev21-May-10 15:39
protectorAspDotNetDev21-May-10 15:39 
GeneralRe: Error Icomparer interface - To sort FileInfo Pin
quanvt21-May-10 17:43
quanvt21-May-10 17:43 
Question.TableName, why use that? Pin
mprice21421-May-10 11:10
mprice21421-May-10 11:10 
AnswerRe: .TableName, why use that? Pin
Pete O'Hanlon21-May-10 12:29
mvePete O'Hanlon21-May-10 12:29 

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.