Click here to Skip to main content
15,908,020 members
Home / Discussions / C#
   

C#

 
Questionupdating a database from a form Pin
luvs2code28-Oct-05 20:33
luvs2code28-Oct-05 20:33 
Questioninput MASK for datagrid Pin
deep728-Oct-05 19:24
deep728-Oct-05 19:24 
QuestionWrite ArrayList Pin
ivelander28-Oct-05 17:25
ivelander28-Oct-05 17:25 
AnswerRe: Write ArrayList Pin
Hesham Amin28-Oct-05 22:53
Hesham Amin28-Oct-05 22:53 
QuestionCheckBox weird Pin
picasso228-Oct-05 14:26
picasso228-Oct-05 14:26 
AnswerRe: CheckBox weird Pin
jmac714228-Oct-05 15:31
jmac714228-Oct-05 15:31 
GeneralRe: CheckBox weird Pin
picasso228-Oct-05 17:27
picasso228-Oct-05 17:27 
GeneralRe: CheckBox weird Pin
jmac714228-Oct-05 18:14
jmac714228-Oct-05 18:14 
Try this then:
<br />
private void btnCreate_Click(object sender, EventArgs e)<br />
{<br />
    Panel panel1 = new Panel();<br />
    CheckBox cB1 = new CheckBox();<br />
    Button btnPF = new Button();<br />
<br />
    /* Control Properties. you'll have to fill in the locations and sizes by replacing the x and y values I substituted instead of integers, as well as any different text */<br />
    panel1.Location = new Point(x,y);<br />
    panel1.Size = new Size(x,y);<br />
    <br />
    cB1.Location = new Point(x,y);<br />
    cB1.Size = new Size(x,y);<br />
    cB1.Text = "checkBox";<br />
   <br />
    btnPF.Location = new Point(x,y);<br />
    btnPF.Size = new Size(x,y);<br />
    btnPF.Text = "button";<br />
<br />
    // Add them:<br />
    Controls.Add(panel1);<br />
    Controls.Add(cB1);<br />
    Controls.Add(btnPF);<br />
<br />
    // Add btnPF's event:<br />
    this.btnPF.Click += new System.EventHandler(this.btnPF_Click);<br />
}<br />
private btnPF_Click(object sender, EventArgs e)<br />
{<br />
    if (cB1.Checked)<br />
    {<br />
        MessageBox.Show("Checked", "Info");<br />
    }<br />
    else<br />
        MessageBox.Show("Unchecked", "Info");<br />
}<br />

Smile | :)

-- modified at 0:16 Saturday 29th October, 2005
GeneralRe: CheckBox weird Pin
picasso228-Oct-05 21:23
picasso228-Oct-05 21:23 
GeneralRe: CheckBox weird Pin
jmac714228-Oct-05 21:37
jmac714228-Oct-05 21:37 
GeneralRe: CheckBox weird Pin
picasso229-Oct-05 11:59
picasso229-Oct-05 11:59 
GeneralRe: CheckBox weird Pin
jmac714229-Oct-05 15:27
jmac714229-Oct-05 15:27 
GeneralRe: CheckBox weird Pin
mav.northwind29-Oct-05 20:25
mav.northwind29-Oct-05 20:25 
QuestionViewing large images with zoom Pin
Libor Tinka28-Oct-05 12:50
Libor Tinka28-Oct-05 12:50 
QuestionReading a binary file with multiple headers Pin
jmac714228-Oct-05 12:15
jmac714228-Oct-05 12:15 
AnswerRe: Reading a binary file with multiple headers Pin
Guffa29-Oct-05 3:07
Guffa29-Oct-05 3:07 
QuestionRe: Reading a binary file with multiple headers Pin
jmac714229-Oct-05 11:16
jmac714229-Oct-05 11:16 
GeneralRe: Reading a binary file with multiple headers Pin
Guffa29-Oct-05 12:13
Guffa29-Oct-05 12:13 
QuestionRe: Reading a binary file with multiple headers Pin
jmac714229-Oct-05 15:26
jmac714229-Oct-05 15:26 
QuestionXml Help Please!!!! Pin
snouto28-Oct-05 11:04
snouto28-Oct-05 11:04 
AnswerRe: Xml Help Please!!!! Pin
enjoycrack28-Oct-05 13:01
enjoycrack28-Oct-05 13:01 
QuestionHow do I disable short cuts on a rich text box. Pin
Agyeman28-Oct-05 10:59
Agyeman28-Oct-05 10:59 
QuestionPassing Around a Textbox Reference Pin
redfish3428-Oct-05 9:45
redfish3428-Oct-05 9:45 
AnswerRe: Passing Around a Textbox Reference Pin
Wjousts28-Oct-05 10:37
Wjousts28-Oct-05 10:37 
GeneralRe: Passing Around a Textbox Reference Pin
redfish341-Nov-05 10:40
redfish341-Nov-05 10:40 

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.