Power Builder - unidades de posicion de pantalla en p.b

 
Vista:

unidades de posicion de pantalla en p.b

Publicado por reyq (20 intervenciones) el 30/03/2007 17:21:12
hola a todos---...
actualmente estoy haceindo una aplicacion y quiero saber como desplegar una menu en el evento
rbuttondown este salga donde esta el puntero del mouse,,,,... ya utilice una funcion que eesta por alli pero no se posiciona en el lugar que debe ser... quisiera que me puedan ayudar en lo posible..

gracias!!!!
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:unidades de posicion de pantalla en p.b

Publicado por Leopoldo Taylhardat (2 intervenciones) el 30/03/2007 17:47:55
Saludos desde Maracay, Venezuela...

trata con esto...es un API de windows

GetCursorPos( ) & SetCursorPos( )
This function returns the x and y position of the cursor into a structure. SetCursorPos moves the cursor to the coordinates it receives. There is no PowerBuilder equivalent.

Global External Function:
FUNCTION boolean GetCursorPos(ref mousepos mousepos2) LIBRARY "User32.dll"
FUNCTION boolean SetCursorPos(int cx, int cy) LIBRARY "User32.dll"

Structure: (Mousepos)
long xpos, long ypos

Script:
mousepos mouseloc
GetCursorPos(mouseloc)
Messagebox("Cursor Position", "X = " + string(mouseloc.xpos) + " Y = " + string(mouseloc.ypos))
SetCursorPos(300,350)
Messagebox("Cursor Position", "X = " + string(mouseloc.xpos) + " Y = " + string(mouseloc.ypos))

Espero que te sirva.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Mira esto también...

Publicado por Leopoldo Taylhardat (710 intervenciones) el 30/03/2007 18:00:58
These statements in the RButtonDown script for the window display a popup menu at the cursor position. Menu4 was created in the Menu painter and includes a menu called m_language. Menu4 is not the menu for the active window and therefore needs to be created. NewMenu is an instance of Menu4 (data type Menu4):

Menu4 NewMenu

NewMenu = CREATE Menu4

NewMenu.m_language.PopMenu(xpos, ypos)

In an MDI application, the arguments for PopMenu need to specify coordinates relative to the MDI frame:

NewMenu.m_language.PopMenu( &

w_frame.PointerX(), w_frame.PointerY())

Modifícalo para que pruebes...
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar