Hi, Viv
This is a bug that was fixed in PFC 5.0.03. Below is the code (actually
copied from V6.5.1) that contains the fix (+ another fix that they added
without putting a comment to that effect).
See how now it hides the StatusBar, disables the timer, and returns out
early when the frame is minimized, not visible or is smaller than the
microhelp area?
Have fun,
~Sharon
--
Sharon Weinstrom Buntz | mailto:[EMAIL PROTECTED]
Cheat Sheet for PFC/PB Help | http://www.pfccheatsheet.com/
In PFCWNSRV.PBL(pfc_w_statusbar):
--------------------------------
//////////////////////////////////////////////////////////////////////////////
//
// Function: of_RefreshPosition
//
// Access: public
//
// Arguments: None
//
// Returns: Integer
// 1 if it succeeds and -1 if an error occurs.
//
// Description:
// Movement of the Parent Frame Window is currently ongoing.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
// 5.0.03 Hide statusbar (disable timer) when the parentwindow is minimized
or
// not visible.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//////////////////////////////////////////////////////////////////////////////
Integer li_rc
// Check window reference.
If IsNull(iw_parentwindow) Or Not IsValid(iw_parentwindow) Then
Return -1
End If
if iw_parentwindow.windowstate = minimized! or &
Not iw_parentwindow.Visible or &
iw_parentwindow.mdi_1.microhelpheight + 150 > iw_parentwindow.Height then
// Hide statusbar (disable timer) when the parentwindow is minimized or
// not visible.
this.visible = false
Timer (0, this)
return 1
end if
// Hide until the move is complete.
this.visible = false
Timer (0, this)
li_rc = of_SetPosition()
If IsValid(iw_parentwindow) Then iw_parentwindow.SetFocus()
Timer (0.5, this)
Return 1
"Crompton, Vivian (London)" wrote:
>
> Hi all,
> Well I have been banging my head against a brick wall with an annoying
> little problem. Perhaps someone out there can help.
> I have an application I have written in Powerbuilder 5.0, using PFC.
> For some reason, if you minimise the application, it does not get restored
> to normal size by clicking on it's task bar button, like other windows apps
> do.
> The only way to restore it is to choose "Restore" from the popup menu you
> get when clicking on a task bar button.
> I have tried doing various things to check to see if it is getting the click
> event, but so far I have found no PowerBuilder event that gets triggered
> when the task bar button is clicked on. Resize , Minimise , Maximise and
> Control Menu options are enabled in the property sheet for each window,
> including the MDI frame window.
>
> Anyone got any ideas? It's a small but extremely irritating problem.
>
> Thanks, Viv Crompton
> [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS, ADDRESS
> A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE: help pfcsig
> SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]