Wait Window


Author
Message
Ralph
Ralph
StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)StrataFrame Beginner (2 reputation)
Group: Forum Members
Posts: 2, Visits: 21
Hi,



found something out about it:



--------------------

private void button2_Click(object sender, EventArgs e)

{

//-- Show the wait window

this.waitWindow1.ShowWaitWindow("TITLE!", "MESSAGE!", MicroFour.StrataFrame.Messaging.MessagingCardinalPosition.Center);

//-- Pause the thread

System.Threading.Thread.Sleep(500);

//-- Hide the wait window

this.waitWindow1.HideWaitWindow();

}

-------------------



sleep(500) will let sleeping the system 500ms and seems to keep the wait window from showing. After that the HideWaitWindow() takes place immediately, so the waitWindow is never shown.



Comment out the HideWaitWindow and try it with Sleep(5000).



Bug or feature? ;-)



As a workaround one can use something from the infoBox class, which will work as expected.



Friendly greetings,



Ralph
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Ben Chase (08/24/2006)
yeah, that's what I did as well... that's strange. If you take out everything except

Me.WaitWindow1.ShowWaitWindow("hi")

Does it display when you click the button?


yes sir it does........

Keith Chisarik
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
If I try and put a WaitWindow with a pause in any looping structure other than a very simple one I get the error below, just a WaitWindow alone causes no error, but does not display until the end one:



As in doing a read thru an XmlTextReader or looping thru a datatable ....



************** Exception Text **************

System.Threading.ThreadAbortException: Thread was being aborted.

at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)

at System.Windows.Forms.Control.DefWndProc(Message& m)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)





************** Loaded Assemblies **************

mscorlib

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

----------------------------------------

Microsoft.VisualStudio.HostingProcess.Utilities

Assembly Version: 8.0.0.0

Win32 Version: 8.0.50727.42

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.HostingProcess.Utilities/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.HostingProcess.Utilities.dll

----------------------------------------

System.Windows.Forms

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

----------------------------------------

System

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

----------------------------------------

System.Drawing

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

----------------------------------------

Microsoft.VisualStudio.HostingProcess.Utilities.Sync

Assembly Version: 8.0.0.0

Win32 Version: 8.0.50727.42

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.HostingProcess.Utilities.Sync/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll

----------------------------------------

vshost

Assembly Version: 8.0.0.0

Win32 Version: 8.0.50727.42

CodeBase: file:///V:/2005%20Projects/lightaction/lascan/bin/Release/lascan.vshost.exe

----------------------------------------

MicroFour StrataFrame Base

Assembly Version: 1.4.0.0

Win32 Version: 1.4.0.0

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/MicroFour%20StrataFrame%20Base/1.4.0.0__99fe9917f71608a7/MicroFour%20StrataFrame%20Base.dll

----------------------------------------

MicroFour StrataFrame Business

Assembly Version: 1.4.0.0

Win32 Version: 1.4.0.0

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/MicroFour%20StrataFrame%20Business/1.4.0.0__99fe9917f71608a7/MicroFour%20StrataFrame%20Business.dll

----------------------------------------

MicroFour StrataFrame DBEngine

Assembly Version: 1.4.0.0

Win32 Version: 1.4.0.0

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/MicroFour%20StrataFrame%20DBEngine/1.4.0.0__99fe9917f71608a7/MicroFour%20StrataFrame%20DBEngine.dll

----------------------------------------

MicroFour StrataFrame UI

Assembly Version: 1.4.0.0

Win32 Version: 1.4.0.0

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/MicroFour%20StrataFrame%20UI/1.4.0.0__99fe9917f71608a7/MicroFour%20StrataFrame%20UI.dll

----------------------------------------

System.Data

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll

----------------------------------------

System.Deployment

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Deployment/2.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll

----------------------------------------

System.Xml

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll

----------------------------------------

Microsoft.VisualBasic

Assembly Version: 8.0.0.0

Win32 Version: 8.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll

----------------------------------------

lascan

Assembly Version: 1.0.0.0

Win32 Version: 1.0.0.0

CodeBase: file:///V:/2005%20Projects/lightaction/lascan/bin/Release/lascan.EXE

----------------------------------------

System.Web

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll

----------------------------------------

lascan_BO_lib

Assembly Version: 1.0.0.0

Win32 Version: 1.0.0.0

CodeBase: file:///V:/2005%20Projects/lightaction/lascan/bin/Release/lascan_BO_lib.DLL

----------------------------------------

System.Configuration

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

----------------------------------------

System.Transactions

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll

----------------------------------------

System.EnterpriseServices

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll

----------------------------------------

Accessibility

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll

----------------------------------------



************** JIT Debugging **************

To enable just-in-time (JIT) debugging, the .config file for this

application or computer (machine.config) must have the

jitDebugging value set in the system.windows.forms section.

The application must also be compiled with debugging

enabled.



For example:











When JIT debugging is enabled, any unhandled exception

will be sent to the JIT debugger registered on the computer

rather than be handled by this dialog box.


Keith Chisarik
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
I created a quick test and it seemed to work fine for me.  I attached the sample project I created.
Attachments
WaitWindowTest.zip (136 views, 674.00 KB)
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
yeah, that's what I did as well... that's strange.  If you take out everything except

Me.WaitWindow1.ShowWaitWindow("hi")

Does it display when you click the button?

Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
I just put your code in a button click event, the simplest implementation I could think of just to get it working.

Keith Chisarik
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Hrm, it worked for me... when are you showing that wait window? in the Load of a form? or after the form is already up?
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
That does nothing as well for me Ben Sad

Keith Chisarik
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Try this:

Me.WaitWindow1.ShowWaitWindow("hi")

System.Threading.Thread.Sleep(5000)

For x As Integer = 1 To 5
    Me.WaitWindow1.Message = x.ToString
    System.Threading.Thread.Sleep(1000)
Next

Me.WaitWindow1.HideWaitWindow()

Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Please tell me why the below code will not work. I think it should display a wait window that says "hi" for 5 seconds, then count from 1 to 5. It does neither. Please help.



Me.WaitWindow1.Message = "hi"

Me.WaitWindow1.ShowWaitWindow()



System.Threading.Thread.Sleep(5000)



Dim x As Integer

For x = 1 To 5

Me.WaitWindow1.Message = x.ToString

Me.WaitWindow1.ShowWaitWindow()

System.Threading.Thread.Sleep(1000)

'Me.WaitWindow1.HideWaitWindow() (optional)

Next

Keith Chisarik
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