Solucion al problema, modulo funcionando.
*****************************************************************************************************************
#include "P:\c3\include\Gui.ch"
#include "P:\c3\include\DBinfo.ch"
#include "P:\c3\include\FileIO.ch"
//***************************************************************************************//
/*
* Clase TMgetBrw
*/
CLASS TMgetBrw FROM TForm
PUBLIC:
DATA DbGrid, FBitmap,label1,label2,saywin,posicion,x,y
METHOD Create CONSTRUCTOR
METHOD ModuloOnCreate
METHOD ModuloOnShow
METHOD ModuloOnmousemove
METHOD ModuloOnclickmouse
METHOD ModuloOndestroy
PUBLIC Modulo
ENDCLASS
/*
* Constructor de la clase.
*/
METHOD Create( oOwner ) CLASS TMgetBrw
Super:Create( oOwner )
::Caption := "MGETBRWP"
::BorderStyle := bsDialog
::ClientWidth := anchowin
::ClientHeight:= altowin-100
::Icon:Name := "DBGRIDNTX"
::Position := poScreenCenter
::OnCreate := { | oSender | ::ModuloOnCreate( oSender ) }
::OnDestroy := { | oSender | ::ModuloOnDestroy( oSender ) }
::OnShow := { | oSender | ::ModuloOnShow( oSender ) }
Request DbfCdx
Imagen="FMTORDEN.BMP"
::Saywin:= TPanel():Create(self)
::Saywin:SetPos(1,1)
::Saywin:width := ::ClientWidth
::Saywin:height := ::ClientHeight
::Saywin:Visible := .T.
::Saywin:OnMouseMove := { | oSender, nX, nY | ::ModuloOnMouseMove( oSender,nX,nY ) }
::Saywin:OnClick := { | oSender | ::ModuloOnclickMouse( oSender) }
Image1 := TImage():Create(::saywin)
Image1:SetPos(1,1)
Image1:SetSize( ::ClientWidth-2, ::ClientHeight-2)
Image1:Themed := .F.
Image1:AutoSize := .F.
Image1:Center := .F.
Image1:Picture:Bitmap:FileName := imagen
Image1:Stretch := .T.
::ModuloOnCreate( )
return
************************************************
METHOD ModuloOnCreate( ) CLASS TMgetBrw
************************************************
::Label1 := TLabel():Create( ::Saywin )
::Label1:SetPos( 16, 8 )
::Label1:Caption := "Eje x"
::Label2 := TLabel():Create( ::Saywin )
::Label2:SetPos( 64, 8 )
::Label2:Caption := "Eje y"
::x=0
::y=0
::posicion := TRadioButton():Create( ::Saywin )
::posicion:AutoSize := .F.
::posicion:SetPos( ::x,::y)
::posicion:width :=13
::posicion:height :=14
::posicion:Font:Size := 6
::posicion:caption:="."
::posicion:checked:=.T.
::posicion:Brush:Color := clWhite
::posicion:WordWrap := .T.
/*
::RadioButton1 := TRadioButton():Create( Self )
::RadioButton1:AutoSize := .F.
::RadioButton1:SetBounds( 80, 24, 13, 14 )
::RadioButton1:Caption := "."
::RadioButton1:Brush:Color := cl3DDkShadow
::RadioButton1:WordWrap := .T.
*/
return
Method ModuloOnclickMouse( oSender, nX, nY ) Class TMgetBrw
Method ModuloOnMouseMove( oSender, nX, nY ) Class TMgetBrw
***********************************************************
if nx<>0
::Label1:Caption := str(nx)
::x=nx
endif
if ny<>0
::Label2:Caption := str(ny)
::y=ny
endif
::posicion:SetPos( ::x,::y)
*******************************************************************************************
METHOD ModuloOnDestroy( oSender ) CLASS TMgetBrw
*******************************************************************************************
return
/*
* Evento OnShow.
*/
*******************************************************************************************
METHOD ModuloOnShow( oSender ) CLASS TMgetBrw
*******************************************************************************************
return
_________________ Saludos.
German
|