![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C#
文章平均质量分 84
xiefuzhen
这个作者很懒,什么都没留下…
展开
-
一个分类生成树的例子
using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;namespace AB{ /// /// Form1 的摘要说明。 /// public class Form1 : Syst原创 2008-09-05 11:03:00 · 488 阅读 · 0 评论 -
WinForm程序只运行一个实例
只启动一个窗体,如果再次启动则激活该窗体 using System;using System.Collections.Generic;using System.Windows.Forms;using System.Diagnostics;using System.Runtime.InteropServices;namespace TEST{ static class Program原创 2009-04-20 21:02:00 · 1776 阅读 · 0 评论 -
Asp.Net Master模板页的控件和属性
内容页访问MasterPage中的控件,有两种解决方案:一、是用弱类型访问 使用 FindControl 方法获取模板页的控件 ((Label)Master.FindControl("Label1")).Text = "xxx"; 二、给模板页添加属性来使用强类型访问(推荐) 模板页定义; //属性 private string x; public str原创 2009-09-15 11:48:00 · 822 阅读 · 0 评论 -
MDI中子窗体只打开一次实例
<br />public partial class MainForm<br /> {<br /> private Dictionary<Type, Form> SingleInstanceForms = new Dictionary<Type, Form>();<br /> protected Form ActivateForm<T>() where T : Form, new()<br /> {<br /> if (!this.SingleInstanceForms.ContainsKey(t原创 2010-12-18 09:22:00 · 538 阅读 · 0 评论