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;
namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent();
Nilanka DharmadasaPosted Dec 17, 2009, 7:13 AM
A small request.
When you post questions, please mention it clearly. Otherwise, you will not get the correct answer or we will waste our time.
In your question you have said that you want to draw an AND gate. But what you actually wanted is to program(implement) an AND gate.
Nilanka DharmadasaPosted Dec 17, 2009, 2:28 AM
I wrote a simple example to show you, how to draw a AND gate.
Run this and see the result.
Please check 'Do you like this answer' check box, if this helps you.
rafalPosted Dec 16, 2009, 3:53 PM
Poorly know English: /
LINK
http://moja-z-dziecmi.ovh.org/gateAND.rar
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;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Close();
}
private void tableLayoutPanel1_Paint(object sender, PaintEventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
if ((radioButton2.Checked == true) && (radioButton4.Checked == true))
label2.Text = "1";
else
label2.Text = "0";
}
}
}