Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. OLE

OLE

Scheduled Pinned Locked Moved The Weird and The Wonderful
csharpcsscomhelpcareer
12 Posts 8 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Lutoslaw

    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 Sub

    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.

    P Offline
    P Offline
    Pete OHanlon
    wrote on last edited by
    #3

    I think you worded it incorrectly. Surely it should be "This one sucks..."

    Deja View - the feeling that you've seen this post before.

    1 Reply Last reply
    0
    • N NormDroid

      gajatko wrote:

      On Error Resume Next

      :sigh: Thats VB for you.

      If you're struggling developing software, then I'd recommend gardening.

      L Offline
      L Offline
      Lutoslaw
      wrote on last edited by
      #4

      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.

      1 Reply Last reply
      0
      • L Lutoslaw

        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 Sub

        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.

        M Offline
        M Offline
        Mike Dimmick
        wrote on last edited by
        #5

        DoEvents: generating unexpected recursion since 1991.

        Stability. What an interesting concept. -- Chris Maunder

        P J 2 Replies Last reply
        0
        • M Mike Dimmick

          DoEvents: generating unexpected recursion since 1991.

          Stability. What an interesting concept. -- Chris Maunder

          P Offline
          P Offline
          Patrick Etc
          wrote on last edited by
          #6

          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

          M N 2 Replies Last reply
          0
          • P Patrick Etc

            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

            M Offline
            M Offline
            Mike Dimmick
            wrote on last edited by
            #7

            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

            1 Reply Last reply
            0
            • P Patrick Etc

              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

              N Offline
              N Offline
              NormDroid
              wrote on last edited by
              #8

              Whats good about VB, absolutely nothing, zilch.

              If you're struggling developing software, then I'd recommend gardening.

              A 1 Reply Last reply
              0
              • M Mike Dimmick

                DoEvents: generating unexpected recursion since 1991.

                Stability. What an interesting concept. -- Chris Maunder

                J Offline
                J Offline
                Judah Gabriel Himango
                wrote on last edited by
                #9

                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

                1 Reply Last reply
                0
                • L Lutoslaw

                  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 Sub

                  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.

                  K Offline
                  K Offline
                  KarstenK
                  wrote on last edited by
                  #10

                  I like the first line most.:mad:

                  Greetings from Germany

                  1 Reply Last reply
                  0
                  • N NormDroid

                    Whats good about VB, absolutely nothing, zilch.

                    If you're struggling developing software, then I'd recommend gardening.

                    A Offline
                    A Offline
                    AEternal
                    wrote on last edited by
                    #11

                    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!

                    N 1 Reply Last reply
                    0
                    • A AEternal

                      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!

                      N Offline
                      N Offline
                      NormDroid
                      wrote on last edited by
                      #12

                      Welcome to the club of many hundreds of thousands of developers who share the same sentiments about VB.

                      Chuck Norris counted to infinity - twice.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups