1
2
public class myButton : Button
3
{
4
5
public myButton()
6
{
7
8
}
9
protected override void OnCreateControl()
10
{
11
base.OnCreateControl ();
12
base.Text = "按钮";
13
}
14
}
15
public class myText:TextBox
16
{
17
private int intCount;
18
19
public myText()
20
{
21
22
}
23
24
protected override void OnClick(System.EventArgs e)
25
{
26
base.OnClick(e);
27
intCount +=1;
28
base.Text =intCount.ToString();
29
}
30
}

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30
