这个程序怎么一打开就死机了?
我的一个实时监控程序一打开就死机。内存不够用。Timer里不能加循环吗??
程序代码:
private void timer1_Tick(object sender, EventArgs e) { for (int i = 210; i <= 850; i += 1) { for (int j = 320; j <= 500; j += 1) { Point ap = new Point(i, j); IntPtr ahdc = GetDC(new IntPtr(0)); int ac = GetPixel(ahdc, ap); if (ac == 255) { label1.text = "Error" break; } } } }