1 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 31 32
| using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace TestTooltipsMemoryLeak {
public partial class Form1 : Form {
private long i = 0;
public Form1() {
InitializeComponent();
}
private void timer1_Tick(object sender, EventArgs e) {
toolTip1.SetToolTip(vumeter1PictureBox, "no imagination " + i++);
toolTip1.SetToolTip(vumeter2PictureBox, "no imagination " + i++);
toolTip1.SetToolTip(vumeter3PictureBox, "no imagination " + i++);
}
private void button1_Click(object sender, EventArgs e) {
timer1.Enabled = !timer1.Enabled;
if (timer1.Enabled) {
timerManagerButton.Text = "disable timer";
} else {
timerManagerButton.Text = "enable timer";
}
}
}
} |
Partager