pfc_preopen


pfcutil.pbl   >   pfc_w_sqlspy   >   pfc_preopen   

Full name pfc_w_sqlspy.pfc_preopen
Access public
Extend of
Return value
Prototype event pfc_preopen()

Name Datatype
No Data

Name Datatype
No Data

event pfc_preopen;call super::pfc_preopen;//////////////////////////////////////////////////////////////////////////////
//
//	Event:  			pfc_preopen
//
//	(Arguments:		None)
//
//	(Returns:  		None)
//
//	Description:	Handle processing that occurs before the open event.
//
//////////////////////////////////////////////////////////////////////////////
//	
//	Revision History
//
//	Version
//	5.0   Initial version
// 5.0.02 Added code to appropriately force or not force this window to always
//		be on top.
//	6.0	Added groupbox, close and help buttons.  Adjust minimum size & resize 
//		of window to accomodate controls.  Made st_history not visible.  
//		Removed all code relating to st_history.
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1997 Sybase, Inc. and its subsidiaries.  All rights reserved.
//	Any distribution of the PowerBuilder Foundation Classes (PFC)
//	source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////

//Allow window to close without the CloseQuery checks being performed.
ib_disableclosequery = True

// If appropriate force this window to be on top.
of_SetAlwaysOnTop(gnv_app.inv_debug.inv_sqlspy.of_GetAlwaysOnTop())

//Determine what controls should be visible/enabled
If Not gnv_app.inv_debug.inv_sqlspy.of_GetAllowInspect() Then
	//Hide all controls that relate to the default functionality.
	cbx_batchmode.Visible = False
	
	//Move the History controls to fill up the entire window.
	//The window's resize event will then take take of resizing them correctly.
	gb_sqlhistory.Move (gb_sqlhistory.X, gb_sqlhistory.Y - 100)
	gb_sqlhistory.Resize (gb_sqlhistory.Width, gb_sqlhistory.Height + 100)
	mle_history.Move (mle_history.X, mle_history.Y - 100)
	mle_history.Resize (mle_history.Width, mle_history.Height + 100)
Else
	//Syncronize the visual BatchMode checkbox.
	of_updatebatchmode()
End If

//Get the current history
of_updatehistory()

//Start the resize service
of_SetResize(True)

//Set the minimum size of the window
inv_resize.of_SetMinSize( cbx_batchmode.X + cb_clear.Width *3 + 145, &
								  mle_history.Y + cb_clear.Height *3 + 90)
	
//Register each control that needs to move or resize after the window resizes
inv_resize.of_Register (cb_clear, inv_resize.FIXEDRIGHTBOTTOM)
inv_resize.of_Register (cb_save, inv_resize.FIXEDRIGHTBOTTOM)
inv_resize.of_Register (cb_print, inv_resize.FIXEDRIGHTBOTTOM)
inv_resize.of_Register (gb_sqlhistory, inv_resize.SCALERIGHTBOTTOM)
inv_resize.of_Register (mle_history, inv_resize.SCALERIGHTBOTTOM)
inv_resize.of_register (cb_close, inv_resize.FIXEDRIGHTBOTTOM)
inv_resize.of_register (cb_dlghelp, inv_resize.FIXEDRIGHTBOTTOM)

//If appropriate, start the Preference service.
If gnv_app.of_IsRegistryAvailable() Then
	If Len(gnv_app.of_GetUserKey())> 0 Then 
		of_SetPreference(True)
	End If
Else
	If Len(gnv_app.of_GetUserIniFile()) > 0 Then
		of_SetPreference(True)
	End If
End If

end event

     
Name Owner
No Data

     
Name Owner
windowobject.move windowobject
windowobject.resize windowobject
systemfunctions.len systemfunctions
n_cst_demopfc.of_isregistryavailable n_cst_demopfc
pfc_n_cst_appmanager.of_getuserinifile pfc_n_cst_appmanager
pfc_n_cst_appmanager.of_getuserkey pfc_n_cst_appmanager
pfc_w_master.of_setresize pfc_w_master
pfc_w_master.of_setpreference pfc_w_master
pfc_w_sqlspy.of_updatebatchmode pfc_w_sqlspy
pfc_w_sqlspy.of_updatehistory pfc_w_sqlspy
pfc_w_sqlspy.of_SetAlwaysOnTop pfc_w_sqlspy
pfc_n_cst_sqlspy.of_GetAllowInspect pfc_n_cst_sqlspy
pfc_n_cst_sqlspy.of_getalwaysontop pfc_n_cst_sqlspy
pfc_n_cst_resize.of_register pfc_n_cst_resize
pfc_n_cst_resize.of_setminsize pfc_n_cst_resize
w_master.pfc_preopen w_master

     
Full name
pfc_w_sqlspy
pfc_u_cb
pfc_w_sqlspy.cbx_batchmode
pfc_w_sqlspy.mle_history
pfc_w_sqlspy.gb_sqlhistory
demopfc

     
Name Scope
No Data