|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Minimised Application Not Restoring or MaximisingAny help with the following will be greatly appreciated.
On Windows XP Professional, a User minimises an application (that has been written in VB6) to allow him to work on two other applications (one off the shelf product and one in-house written application). After a period of time the user uses the mouse to click on the application on the taskbar and nothing happens. User then right clicks on the application on the taskbar and all of the popup menu items are disabled. The net result of this is that the user has to log off, reboot and log back on so that they can reuse the application. Does anyone know of any bugs, in VB or XP that might cause this problem to arise? Do you have any code in your resize event and if so post it here so we can
see it. grant Show quoteHide quote "The Referee" <stephenp.sm***@prudential.co.uk> wrote in message news:1127394978.749836.35850@f14g2000cwb.googlegroups.com... > Any help with the following will be greatly appreciated. > > On Windows XP Professional, a User minimises an application (that has > been written in VB6) to allow him to work on two other applications > (one off the shelf product and one in-house written application). > > After a period of time the user uses the mouse to click on the > application on the taskbar and nothing happens. > User then right clicks on the application on the taskbar and all of the > popup menu items are disabled. > > The net result of this is that the user has to log off, reboot and log > back on so that they can reuse the application. > > Does anyone know of any bugs, in VB or XP that might cause this problem > to arise? > Grant
Thanks for taking time to look at this. code below is all of my form resize event. '~~~~ Standard Error Handler ~~~~~~~~~~~~~~~~ Const lstrProcName = "Form_Resize" On Error GoTo ErrorTrap '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dim llngToolbarHeight As Long Dim llngStatusBarHeight As Long ' Determine height of toolbar and status bar (depending on visibility) If tlbMain.Visible = True Then llngToolbarHeight = tlbMain.Height Else llngToolbarHeight = 0 End If If staContents.Visible = True Then llngStatusBarHeight = staContents.Height Else llngStatusBarHeight = 0 End If PruSplitter1.Left = 0 PruSplitter1.Top = llngToolbarHeight PruSplitter1.Width = IIf(Me.ScaleWidth < (pnlQueue.Height * 2), (pnlQueue.Height * 2), Me.ScaleWidth) PruSplitter1.Height = IIf((Me.ScaleHeight - llngToolbarHeight - llngStatusBarHeight) < (pnlQueue.Height * 2), _ (pnlQueue.Height * 2), _ (Me.ScaleHeight - llngToolbarHeight - llngStatusBarHeight)) If Me.WindowState = vbMinimized Then Me.Caption = "Queue Explorer - " & treOrgUnit.SelectedItem.Text Else Me.Caption = App.Title & " - Oracle" End If '~~~~ Standard Error Handler ~~~~~~~~~~~~~~~~ Exit Sub ErrorTrap: If mobjFatalError.UnhandledError(Err.Number, Me) Then mobjFatalError.Raise Err.Number, Err.Description ReportError mstrModule, lstrProcName, Err.Number, Err.Description, True Unload Me End If '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ UGH wrote: Show quoteHide quote > Do you have any code in your resize event and if so post it here so we can > see it. > > grant > > "The Referee" <stephenp.sm***@prudential.co.uk> wrote in message > news:1127394978.749836.35850@f14g2000cwb.googlegroups.com... > > Any help with the following will be greatly appreciated. > > > > On Windows XP Professional, a User minimises an application (that has > > been written in VB6) to allow him to work on two other applications > > (one off the shelf product and one in-house written application). > > > > After a period of time the user uses the mouse to click on the > > application on the taskbar and nothing happens. > > User then right clicks on the application on the taskbar and all of the > > popup menu items are disabled. > > > > The net result of this is that the user has to log off, reboot and log > > back on so that they can reuse the application. > > > > Does anyone know of any bugs, in VB or XP that might cause this problem > > to arise? > > "The Referee" <stephenp.sm***@prudential.co.uk> wrote in message One possible problem..... You should be checking toolbar height (etc) news:1127400615.764751.247380@o13g2000cwo.googlegroups.com... > Grant > > Thanks for taking time to look at this. code below is all of my form > resize event. Show quoteHide quote >>after<< testing the window state. iow, skip that entire procedure if WindowState = Minimized. -- Ken Halter - MS-MVP-VB - http://www.vbsight.com DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm Please keep all discussions in the groups.. I would try this so bring this to the top and add the exit sub if it is
minimized. If Me.WindowState = vbMinimized Then Me.Caption = "Queue Explorer - " & treOrgUnit.SelectedItem.Text exit sub Else Me.Caption = App.Title & " - Oracle" End If Show quoteHide quote "The Referee" <stephenp.sm***@prudential.co.uk> wrote in message news:1127400615.764751.247380@o13g2000cwo.googlegroups.com... > Grant > > Thanks for taking time to look at this. code below is all of my form > resize event. > > '~~~~ Standard Error Handler ~~~~~~~~~~~~~~~~ > Const lstrProcName = "Form_Resize" > On Error GoTo ErrorTrap > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Dim llngToolbarHeight As Long > Dim llngStatusBarHeight As Long > > ' Determine height of toolbar and status bar (depending on > visibility) > If tlbMain.Visible = True Then > llngToolbarHeight = tlbMain.Height > Else > llngToolbarHeight = 0 > End If > If staContents.Visible = True Then > llngStatusBarHeight = staContents.Height > Else > llngStatusBarHeight = 0 > End If > > PruSplitter1.Left = 0 > PruSplitter1.Top = llngToolbarHeight > PruSplitter1.Width = IIf(Me.ScaleWidth < (pnlQueue.Height * 2), > (pnlQueue.Height * 2), Me.ScaleWidth) > PruSplitter1.Height = IIf((Me.ScaleHeight - llngToolbarHeight - > llngStatusBarHeight) < (pnlQueue.Height * 2), _ > (pnlQueue.Height * 2), _ > (Me.ScaleHeight - llngToolbarHeight - > llngStatusBarHeight)) > > If Me.WindowState = vbMinimized Then > Me.Caption = "Queue Explorer - " & treOrgUnit.SelectedItem.Text > Else > Me.Caption = App.Title & " - Oracle" > End If > > '~~~~ Standard Error Handler ~~~~~~~~~~~~~~~~ > Exit Sub > ErrorTrap: > If mobjFatalError.UnhandledError(Err.Number, Me) Then > mobjFatalError.Raise Err.Number, Err.Description > ReportError mstrModule, lstrProcName, Err.Number, > Err.Description, True > Unload Me > End If > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > UGH wrote: >> Do you have any code in your resize event and if so post it here so we >> can >> see it. >> >> grant >> >> "The Referee" <stephenp.sm***@prudential.co.uk> wrote in message >> news:1127394978.749836.35850@f14g2000cwb.googlegroups.com... >> > Any help with the following will be greatly appreciated. >> > >> > On Windows XP Professional, a User minimises an application (that has >> > been written in VB6) to allow him to work on two other applications >> > (one off the shelf product and one in-house written application). >> > >> > After a period of time the user uses the mouse to click on the >> > application on the taskbar and nothing happens. >> > User then right clicks on the application on the taskbar and all of the >> > popup menu items are disabled. >> > >> > The net result of this is that the user has to log off, reboot and log >> > back on so that they can reuse the application. >> > >> > Does anyone know of any bugs, in VB or XP that might cause this problem >> > to arise? >> > > |
|||||||||||||||||||||||