Hi all,
I've declared a static int variable call Click=0; in the Pay.Designer.cs.
then i just want to get the value of it in a button click of another form.
But it says :
The event 'System.Windows.Forms.Control.Click' can only appear on the left hand side of += or -=
It gives aline under Click
public partial class LostBookEntry : Form
{
private void button1_Click(object sender, EventArgs e)
{
Pay ppay = new Pay(int.Parse(dataGridView1.Rows[ee.RowIndex].Cells["Fine"].Value.ToString()), "Fine", textBox1.Text);
ppay.Show();
int i = ppay.[B]Click;[/B]
if (i==1)
{
Pay pppay = new Pay(int.Parse(dt.Rows[0][0].ToString()), "Lost",
textBox1.Text);
pppay.Show();
}
}
this is my Pay.Designer.cs
namespace HD
{
partial class Pay
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
///
//internal static int click = 0;
internal System.Int32 Bid = 0;
internal System.Int32 code = 0;
internal string mid = null;
[B]internal static int click = 0;[/B]
public Pay(int i,string cat,string mid)
public Pay(int i,string s,System.Int32 bid,System.Int32 ccode)
public Pay(string s)
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
internal System.Windows.Forms.Label Label5;
internal System.Windows.Forms.Label Label4;
internal System.Windows.Forms.TextBox TextBox2;
internal System.Windows.Forms.Label Label3;
internal System.Windows.Forms.Button Button2;
internal System.Windows.Forms.Button Button1;
internal System.Windows.Forms.Label Label2;
internal System.Windows.Forms.ComboBox ComboBox1;
internal System.Windows.Forms.TextBox TextBox1;
internal System.Windows.Forms.Label Label1;
}
}
Pls help me.