When my program does some functions like envoke an email message, when I return to my program, one of my toolbars has dissappeared.
If I minimise and maximise the program it reappears. Where is my problem?
//Main application window:
DEFINE WINDOW Win_Main FROM 0, 0 TO 600, 800 PIXEL TITLE 'SubsPro' MDI ICON oIcon MENU mainmenu() //ICON FILENAME "..\RESOURCE\SUBSPRO.BMP" //BACKCOLOR aBackcolor ON RELEASE quitprog()
//Button Bar at top:
DEFINE BUTTONBAR oMain_Toolbar OF Win_Main SIZE 70, 50 3D // Microsoft Standard: 24,26 3D bitmaps to be 18pix high by 19pix wide
DEFINE BUTTON of oMain_Toolbar PROMPT "Subscribers" TOP ACTION DBMAIN() TOOLTIP "Current / Active Subscribers" RESOURCE "LED_GREEN"
DEFINE BUTTON of oMain_Toolbar PROMPT "Prospective" TOP ACTION DBPROS() TOOLTIP "Prospective Subscribers" RESOURCE "LED_YELLOW"
DEFINE BUTTON of oMain_Toolbar PROMPT "Free" TOP ACTION DBFREE() TOOLTIP "Voucher/Free Copies" RESOURCE "LED_RED"
// DEFINE BUTTON of oMain_Toolbar PROMPT "Report" TOP ACTION makertf() RESOURCE "LETTER" //report2() GROUP //puts a little space before this button
// DEFINE BUTTON of oMain_Toolbar PROMPT "Open DBFs" TOP ACTION opendbfs() RESOURCE "tools"
DEFINE BUTTON of oMain_Toolbar PROMPT "Exit" TOP ACTION quitprog() TOOLTIP "Exit" RESOURCE "exit"
//MDICHILD
DEFINE WINDOW Win_Dbmain TITLE "Subscribers Database" MDICHILD ICON oIcon //NOMINIMIZE NOMAXIMIZE //VSCROLL HSCROLL
//Button bar of MDICHILD
DEFINE BUTTONBAR oButton_Bar OF Win_Dbmain SIZE 40, 40 3D
ACTIVATE DIALOG Dlg_Dbmain NOWAIT ; // It has to be NonModal
ON INIT ( Dlg_Dbmain:Move( 0, 0 ), BuildButtonBar( Dlg_Dbmain ) ) ;
VALID ( Win_Dbmain:End(), .T. )
ACTIVATE WINDOW Win_Dbmain MAXIMIZED ;
ON RESIZE ( WNDSETSIZE( Dlg_Dbmain, WNDHEIGHT( Win_Dbmain ), WNDWIDTH( Win_Dbmain ) ) ) ;
VALID ( IF( save_MAIN_data(), ( close_tables(), Win_Dbmain := NIL, .T. ), .F. ) )
...
function BuildButtonBar( oDlg )
local oButton_Bar
DEFINE BUTTONBAR oButton_Bar OF oDlg SIZE 40, 40 3D
... add the buttons here
return nil
ACTIVATE DIALOG Dlg_Dbmain NOWAIT ; // It has to be NonModal
ON INIT ( Dlg_Dbmain:Move( 0, 0 ), BuildButtonBar( Dlg_Dbmain ) ) ;
VALID ( Win_Dbmain:End(), .T. )
ACTIVATE WINDOW Win_Dbmain MAXIMIZED ;
ON RESIZE ( WNDSETSIZE( Dlg_Dbmain, WNDHEIGHT( Win_Dbmain ), WNDWIDTH( Win_Dbmain ) ) ) ;
VALID ( IF( save_MAIN_data(), ( close_tables(), Win_Dbmain := NIL, .T. ), .F. ) )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 98 guests