Exemplo n.º 1
0
 private void ImageShow(Image img, int x, int y, AlignX alignx, AlignY aligny)
 {
     if (!locked)
     {
         mutex.WaitOne();
         locked = true;
     }
     new Thread(new ThreadStart(() =>
     {
         var imgform      = new ImageForm(img, x, y, alignx, aligny);
         var image_handle = imgform.Handle;
         new Thread(new ThreadStart(() =>
         {
             mutex.WaitOne();
             mutex.ReleaseMutex();
             PostMessage(image_handle, 0x10, IntPtr.Zero, IntPtr.Zero);
         }
                                    )).Start();
         Application.Run(imgform);
     }
                                )).Start();
 }