VB6 which runs from Windows session log in "this app seems to not respond" - Page 2-VBForums
Page 2 of 2 FirstFirst 12
Results 41 to 50 of 50

Thread: VB6 which runs from Windows session log in "this app seems to not respond"

  1. #41

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2013
    Posts
    285

    Re: VB6 which runs from Windows session log in "this app seems to not respond"

    Quote Originally Posted by DEXWERX View Post
    I'm sure you can refactor this nicely, but here's a draft.

    Code:
    Option Explicit
    
    Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
    Private m_Busy As Boolean
    
    Private Sub Form_Load()
        Show
        
        ' Set properties needed by MCI to open.
        MMControl1.Wait = False ' Async
        MMControl1.DeviceType = "WaveAudio"
        MMControl1.FileName = "C:\WINDOWS\Media\Windows XP Startup.wav"
    
        ' Open the MCI WaveAudio device.
        m_Busy = True
        MMControl1.Notify = True
        MMControl1.Command = "Open"
        Dim Start As Single: Start = Timer
        Do
            DoEvents
            Sleep 1
            If Timer - Start > 0.2 Then Exit Do ' timeout
        Loop While m_Busy
        If Not m_Busy Then MMControl1.Command = "Play"
    End Sub
    
    Private Sub Form_Unload(Cancel As Integer)
        MMControl1.Command = "Close"
    End Sub
    
    Private Sub MMControl1_Done(NotifyCode As Integer)
        m_Busy = False
    End Sub
    interesting, I never digged deep in that control.

  2. #42
    Fanatic Member
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    571

    Re: VB6 which runs from Windows session log in "this app seems to not respond"

    Found a thread that mentions these properties of the App object that might help:

    Code:
    App.OleRequestPendingTimeout
    App.OleServerBusyTimeout 
    App.OLEServerBusyRaiseError
    Looks like App.OLEServerBusyRaiseError = True might be a good idea? You will get an error raised and if you trap it you can take any action you like?

    Thread here: http://forums.codeguru.com/showthrea...witch-to-retry
    Last edited by jpbro; Mar 14th, 2017 at 06:48 PM. Reason: Changed advice from FALSE to TRUE

  3. #43

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2013
    Posts
    285

    Re: VB6 which runs from Windows session log in "this app seems to not respond"

    guys, I thinks I am claiming about the wrong little window alert... this app already has disable ghosting..

    and the alert is this:

    Is it the same as the da mn not responding app?. right?.

    This is when the computer just start up and is too busy to respond quickly...

    Sometimes it does half way typing the user/pass, so no any SOUND play.

  4. #44
    Fanatic Member
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    571

    Re: VB6 which runs from Windows session log in "this app seems to not respond"

    Did you try App.OLEServerBusyRaiseError = True and then trap that error? Or perhaps try setting App.OleServerBusyTimeout to a higher number? I think those settings apply to that particular dialog.

    PS: The Not Responding I was referring to is in the Window title, not that separate dialog. I think that dialog only appears when using an out of process OLE server call...maybe this is WMI?

  5. #45

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2013
    Posts
    285

    Re: VB6 which runs from Windows session log in "this app seems to not respond"

    Quote Originally Posted by jpbro View Post
    Did you try App.OLEServerBusyRaiseError = True and then trap that error? Or perhaps try setting App.OleServerBusyTimeout to a higher number? I think those settings apply to that particular dialog.

    PS: The Not Responding I was referring to is in the Window title, not that separate dialog. I think that dialog only appears when using an out of process OLE server call...maybe this is WMI?

    okkkkkk seems to be in the right track....

    I will test.

  6. #46

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2013
    Posts
    285

    Re: VB6 which runs from Windows session log in "this app seems to not respond"

    Quote Originally Posted by jpbro View Post
    Did you try App.OLEServerBusyRaiseError = True and then trap that error? Or perhaps try setting App.OleServerBusyTimeout to a higher number? I think those settings apply to that particular dialog.

    PS: The Not Responding I was referring to is in the Window title, not that separate dialog. I think that dialog only appears when using an out of process OLE server call...maybe this is WMI?
    yeah I also was confused I though both things were about the same feature. So, I searched the wrong thing, and my frustration was increasing over time.

    I will preffer it to trigger an error, so with ON ERROR GOTO I can skip the task. But I don't know what are the usual response times, I would preffer to set time to a quarter of second but not risking to do the feature impossible to run.

    Anyone has experience setting those OLE timmings?

    App.OleRequestPendingTimeout
    App.OleServerBusyTimeout
    App.OLEServerBusyRaiseError

  7. #47

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2013
    Posts
    285

    Re: VB6 which runs from Windows session log in "this app seems to not respond"

    well App.OleServerBusyTimeout default is 10 seconds, App.OleRequestPendingTimeout default is 5 seconds.

    so, it can work for WMI requests in 4 and 2 seconds respectivelly?

  8. #48
    Member
    Join Date
    Feb 2017
    Posts
    60

    Re: VB6 which runs from Windows session log in "this app seems to not respond"

    Quote Originally Posted by flyguille View Post
    yeah I also was confused I though both things were about the same feature. So, I searched the wrong thing, and my frustration was increasing over time.

    I will preffer it to trigger an error, so with ON ERROR GOTO I can skip the task. But I don't know what are the usual response times, I would preffer to set time to a quarter of second but not risking to do the feature impossible to run.

    Anyone has experience setting those OLE timmings?

    App.OleRequestPendingTimeout
    App.OleServerBusyTimeout
    App.OLEServerBusyRaiseError
    The defaults are 5 and 10 seconds:

    https://msdn.microsoft.com/en-us/lib...(v=vs.60).aspx
    https://msdn.microsoft.com/en-us/lib...(v=vs.60).aspx

  9. #49

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2013
    Posts
    285

    Re: VB6 which runs from Windows session log in "this app seems to not respond"

    ok if I understand correctly now, App.OleRequestPendingTimeout is the time when the WMI query is already waiting a reply, and the if the user hit a key or click with mouse, it will pass by default 5 seconds before appearing that little warning?

    and serverbusytimeout is the time that will pass before detecting it is busy?



    I am trying to do this..


    if busy, don't wait, just trigger an error and escape the feature.

    So I don't want the app to freeze like 5 seconds or so, I want it as much give 2 seconds, but I unkown if in normal load the WMI procedure will complete within just one second, or needs 4 second or so. So I imagine it is a test and error go.



    EDIT: now I think ServerBusyTimeout is for when the APP is the provider of the OLE service, so VB will trigger a request event until that time? and the other is for client side right?.
    Last edited by flyguille; Mar 17th, 2017 at 07:13 AM.

  10. #50
    Member
    Join Date
    Feb 2017
    Posts
    60

    Re: VB6 which runs from Windows session log in "this app seems to not respond"

    All depends how important are the tasks that the p

    That'rogram is doing at the time the message appears, if these tasks are neccesary and you need them even if they take time, then these values should be highter in order to avoid the message and still perform the tasks.

    That's as I understand it.
    Last edited by Eduardo-; Mar 17th, 2017 at 02:27 PM.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.