OUTLOOK 2003 Y XBROWSE
Posted: Mon May 07, 2012 2:57 pm
hola a todos del foro
Tengo una ventana mdi, y quiero que dentro de una mdichild tenga el outlook2003 y a la derecha un xbrowse se puede?
Aqui extracto del codigo
No se como ponerle el xbrowse a la derecha de la ventana hija ...
Salu2
Francis
Tengo una ventana mdi, y quiero que dentro de una mdichild tenga el outlook2003 y a la derecha un xbrowse se puede?
Aqui extracto del codigo
Code: Select all
FUNCTION MantCentCosto( oVentana, oMenuItem, cCod )
LOCAL oWChild, oBar, oBrw, oFont, oCursor, oIcon
LOCAL lSalir := .F., oBrush
local oOutLook2003, oStatusBar, oSplit, cCombo, oRad, nValue := 1
cAliUsu := AbreDbf( "CKUSUARI" )
( cAliUsu )->( DBSetOrder( "CODIGO" ) )
IF ( cAliUsu )->( DBSeek( cCod ) )
IF !( cAliUsu )->USEM16
__StopMsg("Usuario no tiene permiso para ingresar a este M¢dulo ...")
CierraDbf( "CKUSUARI", cAliUsu )
RETURN( .T. )
ENDIF
ELSE
CierraDbf( "CKUSUARI", cAliUsu )
RETURN( .T. )
ENDIF
CierraDbf( "CKUSUARI", cAliUsu )
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 0, -05
DEFINE ICON oIcon RESOURCE "FWCIBCONT"
DEFINE CURSOR oCursor RESOURCE "Mano"
DEFINE BRUSH oBrush NAME "GRADIEN"
CursorWait()
cAliCos := AbreDbf( "T10REF09" )
( cAliCos )->( DBSetOrder( "CODIGO" ) )
( cAliCoS )->( DBGoTop() )
oMenuItem:Disable()
DEFINE WINDOW oWChild;
TITLE OToA( "Gesti¢n de Centros de Costo" );
MDICHILD;
ICON oIcon;
OF oVentana
SET FONT OF oWChild TO oFont
/* DEFINE SBUTTONBAR oBar;
OF oWChild;
SIZE 80,60;
3D;
CURSOR oCursor CRYSTAL
DEFINE SBUTTON NAME "NEWDOC";
GROUP;
PROMPT "NUEVO";
TEXT ON_BOTTOM;
OF oBar;
TOOLTIP "Nuevo Costo";
ACTION( MCLICK(), AMCosto( oBrw, .T., cAliCos ),;
oBrw:Refresh() )
DEFINE SBUTTON NAME "WRITE";
OF oBar;
PROMPT "MODIFICA";
TEXT ON_BOTTOM;
TOOLTIP "Modifica Costo";
ACTION( MCLICK(), AMCosto( oBrw, .F., cAliCos ),;
oBrw:Refresh() )
DEFINE SBUTTON NAME "STOP";
OF oBar;
PROMPT "ELIMINA";
TEXT ON_BOTTOM;
TOOLTIP "Borra Costo";
ACTION( MCLICK(), BorrCosto( "este Centro de Costo" ),;
oBrw:Refresh() )
DEFINE SBUTTON NAME "PRINT";
GROUP;
PROMPT "IMPRIME";
TEXT ON_BOTTOM;
OF oBar;
TOOLTIP "Imprimir";
ACTION( MCLICK(), PrintCCos(), oBrw:Refresh() )
DEFINE SBUTTON NAME "DOOR";
GROUP;
OF oBar;
PROMPT "SALIR";
TEXT ON_BOTTOM;
TOOLTIP "Salir de esta ventana";
ACTION( MCLICK(), oMenuItem:Enable(),;
lSalir := .T., oWChild:End() )
oBar:brClicked:= { || NIL } */
DEFINE OUTLOOK2003 oOutLook2003 OF oWChild;
PROMPTS "Centros de Costo", "Calendario", "Otros";
BITMAPS "..\bitmaps\mail.bmp", "..\bitmaps\calendar.bmp", "..\bitmaps\notes.bmp"
oWChild:oLeft = NIL
@ 1, 2 BUTTON "Nuevo Costo" OF oOutLook2003:aDialogs[ 1 ] SIZE 80, 22 ACTION ( MCLICK(), AMCosto( oBrw, .T., cAliCos ), oBrw:Refresh() )
@ 3, 2 BUTTON "Edita Costo" OF oOutLook2003:aDialogs[ 1 ] SIZE 80, 22 ACTION ( MCLICK(), AMCosto( oBrw, .F., cAliCos ), oBrw:Refresh() )
@ 5, 2 BUTTON "Borra Costo" OF oOutLook2003:aDialogs[ 1 ] SIZE 80, 22 ACTION ( MCLICK(), BorrCosto( "este Centro de Costo" ), oBrw:Refresh() )
@ 7, 2 BUTTON "Salir" OF oOutLook2003:aDialogs[ 1 ] SIZE 80, 22 ACTION ( MCLICK(), oMenuItem:Enable(), lSalir := .T., oWChild:End() )
*@ 00, 00 XBROWSE oBrw;
* FIELDS ( cAliCos )->COSTCOD, ( cAliCos )->COSTNOB;
* HEADERS OToA(" C¢digo "), OToA(" Descripci¢n ");
* SIZE 00, 00 COLOR CLR_BLACK, RGB( 200,200,200 ) ;
* UPDATE OF ( oWChild:oWndClient );
* ON LEFT DBLCLICK( MCLICK(), AMCosto( oBrw, .F., cAliCos ),;
* oBrw:Refresh() )
oBrw := TXBrowse():New( oWChild:oWndClient )
WITH OBJECT oBrw
:bKeyDown := { | nKey, nFlags | ;
IIF( nKey == 13,; // [Enter]
( MCLICK(), AMCosto( oBrw, .F., cAliCos ) ),;
IIF( nKey == 46,; // [DEL]
( MCLICK(), BorrCosto( "este Centro de Costo " ) ),;
IIF( nKey == ASC("N") .AND. GetKeyState( VK_CONTROL ),; // [CTRL+N]
( MCLICK(), AMCosto( oBrw, .T., cAliCos ) ),;
IIF( nKey == ASC("M") .AND. GetKeyState( VK_CONTROL ),; // [CTRL+M]
( MCLICK(), AMCosto( oBrw, .F., cAliCos ) ),;
IIF( nKey == ASC("P") .AND. GetKeyState( VK_CONTROL ),; // [CTRL+P]
( MCLICK(), PrintCCos() ),;
IIF( nKey == ASC("S") .AND. GetKeyState( VK_CONTROL ),; // [CTRL+S]
( MCLICK(), oMenuItem:Enable(), lSalir := .T., oWChild:End() ), ) ) ) ) ) ) }
END
WITH OBJECT oBrw
:cAlias := cAliCos
:bClrHeader := { || { 65535, 0 } }
:nHeaderHeight := 35
:SetRdd()
:SetBackGround( oBrush )
:lRecordSelector := .F.
:nStretchCol := STRETCHCOL_LAST
:nMarqueeStyle := MARQSTYLE_HIGHLROW
:CreateFromCode()
END
*oWChild:SetControl( oBrw )
SetParent( oOutLook2003:hWnd, oWChild:hWnd )
oWChild:oClient = NIL
@ 0, 191 SPLITTER oSplit ;
VERTICAL _3DLOOK ;
PREVIOUS CONTROLS oOutLook2003 ;
HINDS CONTROLS oWChild:oWndClient, oBrw;
SIZE 4, oWChild:nHeight - 70 PIXEL ;
OF oWChild
SetParent( oSplit:hWnd, oWChild:hWnd )
ACTIVATE WINDOW oWChild;
ON RESIZE ( oSplit:Adjust(),;
WndLeft( oWChild:oWndClient:hWnd, oSplit:nRight + 1 ),;
WndWidth( oWChild:oWndClient:hWnd, oWChild:nWidth - oOutLook2003:nWidth + 80 ) ) ;
VALID( CierraDbf( "T10REF09", cAliCos ), lSalir )
* ACTIVATE WINDOW oWChild;
* VALID( CierraDbf( "T10REF09", cAliCos ), lSalir )
RELEASE FONT oFont
RETURN( .T. )
Salu2
Francis