Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ej09_Mouse
- Este ejemplo muestra algunas operaciones con el mouse
- y como controlarlo */
- #include <radc++.h>
- Form form1("Operaciones con Raton - RAD C++ Ejemplo");
- TextBox t1("X",AUTO_ID,100,100,50,30,form1);
- TextBox t2("Y",AUTO_ID,160,100,50,30,form1);
- Button b1("&Esconder Mouse",AUTO_ID,100,150,150,30,form1);
- Button b2("&Mostrar Mouse",AUTO_ID,100,210,150,30,form1);
- FormProcedure proc(FormProcArgs) {
- ON_CLOSE() Application.close();
- ON_TEXT_CHANGED(t1)
- Mouse.x = val(t1.text); //set mouse x coordinates
- ON_TEXT_CHANGED(t2)
- Mouse.y = val(t2.text); //set mouse y coordinates
- ON_COMMAND_BY(b1)
- Mouse.visible=false; //hide mouse cursor
- ON_COMMAND_BY(b2)
- Mouse.visible=true; //show mouse cursor if not visible
- return 0;
- }
- //Where Mouse is a global object of class _RAD_MOUSE
- rad_main()
- form1.procedure = proc;
- rad_end()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement