主窗体累积从窗体的点击次数
来源:互联网 发布:网络维护工具 编辑:程序博客网 时间:2024/05/18 18:22
//主窗体代码
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 showMutiForm_net2_1
{
public partial class AddCounts : Form
{
private otherForms ofrs;
public AddCounts()
{
InitializeComponent();
}
private void btnOpenForms_Click(object sender, EventArgs e)
{
ofrs = new otherForms( this );
ofrs.Show();
}
public void click_count( int count )
{
lblCounts.Text = ""+ count;
}
}
}
//从窗体代码
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 showMutiForm_net2_1
{
public partial class otherForms : Form
{
static int count =0;
private AddCounts acs1;
public otherForms( AddCounts acs )
{
InitializeComponent();
acs1 = acs;
}
private void btnAddCount_Click(object sender, EventArgs e)
{
count += 1;
acs1.click_count(count);
}
}
}
- 主窗体累积从窗体的点击次数
- 委托(一个主窗体统计多个从窗体的按钮单击的次数)
- 表单的通信--主窗体消息传送到从窗体
- Delphi 主窗体最小化, 从窗体保持大小的方法
- 点击子窗体给父窗体上的对象赋值
- 点击子窗体给父窗体上的对象赋值
- 从弹出窗体的操作引发父窗体的刷新
- 控制其它窗体的按钮点击事件
- 点击其他窗体上的一个按钮?
- Delphi 从任务栏中点击图标恢复窗体
- 点击弹出窗体.net
- WinForm点击窗体任意位置拖动窗体
- 窗体
- 窗体
- 窗体
- 窗体
- 窗体
- 窗体
- 识破HD90的100元假钞
- 猖狂的假币贩子
- axis服务发布或接口调用(IncompatibleClassChangeError)
- 由引起的空白行问题的解决方法
- RMS使用时要注要的地方
- 主窗体累积从窗体的点击次数
- Java的部分异常和错误解释
- windows Service开发日志三(制作安装包)
- VC++下后置++运算符
- VS2005中BackgroundWorker组件的使用经验
- 走在深圳
- J2ME图片压缩,解压和加密技术
- SMAB(Simple Money Account Book)纸黄金记账软件
- 关于华为敏捷项目管理