OLE
-
This one rocks...
Private Sub Run_Click()
On Error Resume Next
OLE1.SourceDoc = pat & Grid
OLE1.SourceItem = pat & Grid
OLE1.Action = 1
DoEvents
OLE1.Action = 7
DoEvents
OLE1.Action = 10
End SubGreetings - Gajatko Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
I think you worded it incorrectly. Surely it should be "This one sucks..."
Deja View - the feeling that you've seen this post before.
-
gajatko wrote:
On Error Resume Next
:sigh: Thats VB for you.
If you're struggling developing software, then I'd recommend gardening.
norm .net wrote:
That's
Yes, but 's can be expanded now to "was", not "is" :)
Greetings - Gajatko Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
-
This one rocks...
Private Sub Run_Click()
On Error Resume Next
OLE1.SourceDoc = pat & Grid
OLE1.SourceItem = pat & Grid
OLE1.Action = 1
DoEvents
OLE1.Action = 7
DoEvents
OLE1.Action = 10
End SubGreetings - Gajatko Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
DoEvents: generating unexpected recursion since 1991.
Stability. What an interesting concept. -- Chris Maunder
-
DoEvents: generating unexpected recursion since 1991.
Stability. What an interesting concept. -- Chris Maunder
Mike Dimmick wrote:
DoEvents: generating unexpected recursion since 1991.
Commonly read in the VB forums: "What's so bad about DoEvents?" :mad:
The early bird who catches the worm works for someone who comes in late and owns the worm farm. -- Travis McGee
-
Mike Dimmick wrote:
DoEvents: generating unexpected recursion since 1991.
Commonly read in the VB forums: "What's so bad about DoEvents?" :mad:
The early bird who catches the worm works for someone who comes in late and owns the worm farm. -- Travis McGee
The good: it allows other events to occur, so they don't end up massively queued up with your application unresponsive while you perform some complex task. The bad: it allows all other events to occur, so you can end up re-entering the current block of code and ultimately end up with stack overflow. Also, if you happen to include it in a COM callback, or a paint handler when you've already made a COM call to another process, and one of the events that fires tries to make a COM call to another process, you get a 'cannot call out within message filter' error. That one caused a lot of head-scratching, I can tell you. You end up having to break up your big routine littered with DoEvents into lots of little event handlers and somehow have a way of transferring control between them by some other object raising an event. Timers work, of course, but the minimum timer duration is about 15ms on Windows XP, which is eons in computing time. (I wrote a component in C++ which merely posts a message back to a hidden window, and raises an event when this occurs, cutting that down to tiny amounts.)
DoEvents
: Generating unexpected recursion since 1991 -
Mike Dimmick wrote:
DoEvents: generating unexpected recursion since 1991.
Commonly read in the VB forums: "What's so bad about DoEvents?" :mad:
The early bird who catches the worm works for someone who comes in late and owns the worm farm. -- Travis McGee
-
DoEvents: generating unexpected recursion since 1991.
Stability. What an interesting concept. -- Chris Maunder
It's a real shame they included this in .NET's WinForms implementation. I utterly rebuke any code that uses it. :) Thank God they didn't such an easily abusable API in WPF. In WinForms, if you really need to do lots of work and don't want to back up the UI thread, split up your work and execute it inside Application.Idle event. Much more scalable, no scary re-entry issues to deal with. Or alternately just use a background thread. :)
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Sound The Great Shofar! The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
This one rocks...
Private Sub Run_Click()
On Error Resume Next
OLE1.SourceDoc = pat & Grid
OLE1.SourceItem = pat & Grid
OLE1.Action = 1
DoEvents
OLE1.Action = 7
DoEvents
OLE1.Action = 10
End SubGreetings - Gajatko Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
-
Whats good about VB, absolutely nothing, zilch.
If you're struggling developing software, then I'd recommend gardening.
-
norm .net wrote:
Whats good about VB, absolutely nothing, zilch.
My first post on this board is in vehement agreement with this wise poster. :) Hello!