** END HEADER -- do not remove this line // // Generated on 12/06/2022 // parameter bModal local f f = new accellerator_keyForm() if (bModal) f.mdi = false // ensure not MDI f.readModal() else f.open() endif class accellerator_keyForm of FORM with (this) onOpen = class::FORM_ONOPEN metric = 6 // Pixels height = 352.0 left = 116.0 top = 18.0 width = 280.0 text = "" endwith this.PUSHBUTTON1 = new PUSHBUTTON(this) with (this.PUSHBUTTON1) onClick = class::PUSHBUTTON1_ONCLICK height = 24.0 left = 79.0 top = 90.0 width = 107.0 text = "Pri&nt" endwith this.PUSHBUTTON2 = new PUSHBUTTON(this) with (this.PUSHBUTTON2) onClick = class::PUSHBUTTON2_ONCLICK height = 24.0 left = -200.0 top = 232.0 width = 107.0 text = "&n" endwith function PUSHBUTTON1_onClick() msgbox('Print button clicked') return function PUSHBUTTON2_onClick() //Place form coordinates that will show the cursor over the button into form.point //This conversion to screen coordinates needs to be done each time the function is executed //in case the user has moved the form on the screen form.point.setx(form.pushbutton1.left+50) //make sure cursor is in button form.point.sety(form.pushbutton1.top+10) //Convert point values to position on screen. clienttoscreen(form.hwnd,form.point) //Get x and y coordinates for pushbutton form.x_pb = form.point.getx(form.point,0) form.y_pb = form.point.gety(form.point,4) form.rmMouse.screenLeftClick(form.x_pb,form.y_pb ) return function form_onOpen() if type("ClientToScreen") # "FP" extern clogical ClientToScreen(chandle,cptr) user32 endif set procedure to :duflp:rmMouseEvents.cc form.rmMouse = new rmMouseevents(form) form.point = new point() // point is a structure to hold the cursor's x and y coordinates return endclass