I have this:
Dim myTemp As String
myTemp = System.DateTime.Now().ToString("MMMddyyyy_HHmmss") & ".pdf"
System.IO.File.Copy(myFile, "c:\" & myTemp)
Application.DoEvents()
OpenFile(myTemp)
The problem is that when I call OpenFile, which is just a call to a sub that opens a file, it cannot find the file. This is bec...
I've encountered a strange difference between a program running in VS2005 and running the executable directly. Essentially, when an exception is thrown in a method inside an Application.DoEvents() call, the exception can be caught when running inside Visual Studio. When running the compiled executable, the exception is not caught and t...
Hi
what is the necessity of using Application.DoEvents and when we should use it?
...
I have a strange problem with a Windows Forms event. To be exact, it's a KryptonHeaderGroup's ButtonSpec Click event, but it also happens with a plain vanilla System.Windows.Forms.Button.
In the click event, the user interface is brought down (there's a label and a cancel button left), and then an expensive LINQ query is built from prev...
I have a WPF application where I'd like to create a custom pop-up that has modal behavior. I've been able to hack up a solution using an equivalent to 'DoEvents', but is there a better way to do this? Here is what I have currently:
private void ShowModalHost(FrameworkElement element)
{
//Create new modal host
v...
I have a custom control's library. Now there's a control which looks like a panel, and when it opens up I want to animate its vertical growing like this:
For h As Single = 0 To finalHeight Step 0.5
Me.Height = CInt(h)
' HERE I WANT TO CALL DoEvents'
Next
Me.Height = finalHeight
If I don't call DoEvents in the loop then the a...
I have a printing application that is using the Printer object to print files. On one particular machine (not others), this program will crash after processing some number of files (20 or so).
The crashes always occur during a DoEvents call.
Has anyone seen anything like this?
Thanks!
...
I have some commercial equipment that I can connect to with a .Net library supplied by the equipment manufacturer - so I have no control over the library or the equipment, only my code.
The manufacturer has set their system up so that if you are not connected to the equipment via their library then it works fine. However, when you do c...
In WinForms, Application.DoEvents method has been regarded as evil by some people. Can anybody tell if its counterpart of Dispatcher.PushFrame in WPF is safe to use?
...
I'm trying to figure out the best way to handle a backgroundworker that is triggered off radio button clicks. I created a very simple form with 3 radio buttons and a label. Each of the radio buttons share the same event radioButton_CheckedChanged. If the event completes then I update the label to "Complete". If you click another radio...