Turning off the Wait Window bell


Author
Message
Peter Jones
Peter Jones
Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi,

Is there any way of turning off the Wait Window beep - its drives me nuts!!

Cheers, Peter

Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Peter,

I use the Wait Window control and mine does not sound any beep.

Edhy Rijo

Peter Jones
Peter Jones
Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi Edhy,

Well that's interesting. Your comment made me think that, maybe, I was triggering something else in my environment however when I look at our library code for showing / hiding the wait window the only thing extra it does is change the form's Cursor.Current property which doesn't cause a beep.

I guess I will await SF's confirmation that the wait window doesn't beep then delve a bit deeper into my environment.

Cheers, Peter


Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Peter, this is the code I use for the wait window...

Me.Cursor = Cursors.WaitCursor

Me.WaitWindow1.Message = "Please wait, Creating Invoice Number " & Me.BizServiceCalls1.InvoiceNumber & "..."

Of course there is more code prior to ShowMessage and HideWaitwindow.

Edhy Rijo

Dustin Taylor
Dustin Taylor
StrataFrame Team Member (652 reputation)
Group: StrataFrame Users
Posts: 364, Visits: 771
Nope it shouldn't be soudning a beep.

Depending on the context you are using to call it, it might cause an error or notification bell to fire. For example, if you are calling it from a combo and in the process are causing an unhandled keypress, it might beep at you.

I'd try creating a new solution call the wait window from a button on a blank form to remove everything else from the equation. If it still beeps there let us know and we'll take a closer look, but it shouldn't Smile.

Peter Jones
Peter Jones
Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K

Hi Dustin,

Well, here's the issue. It is definitely the WaitWindow that is causing the beep. I know this because if I remove the calls to WaitWindow it works ok. However, we call WaitWindow in utility class but, if the code is the form itself (as in Edhy's example), then no problems, e.g.

This doesn't beep:

    Private Sub PopulateGrids()

        Me.WaitWindow1.Message = "Please Wait. Refreshing Data.."

        Me.BoOTA1.RefreshBO()
        Me.BoOTY1.RefreshBO()

        Me.WaitWindow1.HideWaitWindow()

    End Sub


But this does:

    Private Sub PopulateGrids()

        clsFU.ShowTheWaitWindow(Me.WaitWindow1)

        Me.BoOTA1.RefreshBO()
        Me.BoOTY1.RefreshBO()

        clsFU.HideTheWaitWindow(Me.WaitWindow1)

    End Sub


The utility class code is:

#Region " Handle Wait Windows "

    Public Shared Sub ShowTheWaitWindow(ByVal WaitWindow As MicroFour.StrataFrame.Messaging.WaitWindow)
        ' Show we are doing something using default mesages
        ShowTheWaitWindow(WaitWindow, "PleaseWait", "RefreshingData")

    End Sub

    Public Shared Sub ShowTheWaitWindow(ByVal WaitWindow As MicroFour.StrataFrame.Messaging.WaitWindow, _
                                        ByVal WaitMessageLocKey As String, _
                                        ByVal ReasonMessageLocKey As String)
        ' Show we are doing something
        System.Windows.Forms.Cursor.Current = Cursors.WaitCursor
        Waitwindow.ShowWaitWindow(clsLOC.Localise(WaitMessageLocKey), _
                                  clsLOC.Localise(ReasonMessageLocKey), _
                                  MicroFour.StrataFrame.Messaging.MessagingCardinalPosition.Center)
    End Sub

    Public Shared Sub HideTheWaitWindow(ByVal WaitWindow As MicroFour.StrataFrame.Messaging.WaitWindow)
        ' The refresh is over - hide the wait window
        System.Windows.Forms.Cursor.Current = Cursors.Default
        Waitwindow.HideWaitWindow()
    End Sub

#End Region


We use DevExpress for our UI - could this be influencing things in anyway?

Cheers, Peter

Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Peter the problem is that your method ShowTheWaitWindow is not using the waitwindow parameter, it is calling itself "ShowTheWaitWindow" again

Public Shared Sub ShowTheWaitWindow(ByVal WaitWindow As MicroFour.StrataFrame.Messaging.WaitWindow)
        ' Show we are doing something using default mesages
        ' ShowTheWaitWindow(WaitWindow, "PleaseWait", "RefreshingData") ' This line is wrong, should be

        WaitWindow.ShowWaitWindow("PleaseWait", "RefreshingData")

End Sub



Edhy Rijo

Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Please disregard my previous post, I did not notice you have an overload method.

Check the clsLOC.Localise() method to see if the beep is coming from there, test your method wihout using the clsLOC.Localise or put a break there to see where you are actually getting the beep.

Edhy Rijo

Peter Jones
Peter Jones
Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi Edhy,

Thanks for the follow-up. Actually I did check that out and it was ok. It couldn't really be in that area as all our UI is localasied so it would have being doing a lot more than 'driving me nuts' if we had a beep every time a string was localised!

Cheers, Peter

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Actually, to correct the direction of this post, we actually HAVE seen instances where Windows will force a beep.  It has to do with certain environments and it is actually Windows performing the beep, not the Waitwindow.  The WaitWindow itself does not have any sound.  But under Vista, there have been several reports where the WaitWindow will sound a beep.  This has to do with focus changes and the redirection of the focus.  I experienced this once but could never reliably reproduce when I sat down on my development machine to try and determine where the sound was coming from.  Since the wait window can be shown as an independent dialog or as a child of another form, this can also have an impact.  I will try and set this up, but for the record here, the WaitWindow itself does not make a sound...it is Windows attempting to address the focus and/or the modality of the dialog.  The beep you are hearing is the same sound you would hear if you had a modal dialog up and then click outside of that dialog.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search