Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Windows.Forms;
- using System.Drawing;
- static class Program
- {
- static Form frm = new Form();
- [STAThread]
- static void Main()
- {
- Timer tmr = new Timer() { Enabled = true };
- tmr.Tick += new EventHandler(tmr_Tick);
- Application.Run(frm);
- }
- static void tmr_Tick(object sender, EventArgs e)
- {
- frm.Controls.Clear(); // <- These controls don't seem to get collected.
- frm.Controls.Add(new Control() { BackgroundImage = new Bitmap(1024, 768) });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement