void DrawPanel() { try { Graphics canvas = panel1.CreateGraphics(); AxZKFPEngX1.PrintImageAt(canvas.GetHdc().ToInt32(), 0, 0, panel1.Width, panel1.Height); canvas.Dispose(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
void AxZKFPEngX1_OnImageReceived(object sender, AxZKFPEngXControl.IZKFPEngXEvents_OnImageReceivedEvent e) { try { Graphics canvas = panel1.CreateGraphics(); AxZKFPEngX1.PrintImageAt(canvas.GetHdc().ToInt32(), 0, 0, panel1.Width, panel1.Height); canvas.Dispose(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }