Monitor calibration on PC runtime

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
Chris D
Posts: 6
Joined: Tue Aug 05, 2014 10:53 am

Monitor calibration on PC runtime

Post by Chris D »

How can I get the information, if a mousebutton is pressed, while the runtime is starting?
I would like to implement a service menu for pc runtime similiar to the panels.
I need to calibrate a new monitor. In the OnLoad Event of the startup page I would like to do
if ( MouseButtons == MouseButtons.Left)
{
}

Greetings Chris

User avatar
Russ C.
Posts: 213
Joined: Thu Nov 16, 2017 3:32 pm
Contact:

Re: Monitor calibration on PC runtime

Post by Russ C. »

You can capture a mouse click by hooking up the MouseDown event and the MousePosition.X and MousePostion.Y properties.

Code: Select all

void Screen2_Opened(System.Object sender, System.EventArgs e)
		{
			MouseDown+= myMouseClick;
		}

		void myMouseClick(System.Object sender, System.Windows.Forms.MouseEventArgs e)
		{
			MessageBox.Show(MousePosition.X+","+ MousePosition.Y);
		}
		
		void Screen2_Closed(System.Object sender, System.EventArgs e)
		{
            MouseDown-= myMouseClick;
		}
Best regards,

Russ
(801) 708-6690
Technical Support
Contact Us

Beijer Electronics AB
http://www.beijerelectronics.us

Post Reply