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. General Programming
  3. .NET (Core and Framework)
  4. Save Variable Values to a file and start another application when unhandled error occurs

Save Variable Values to a file and start another application when unhandled error occurs

Scheduled Pinned Locked Moved .NET (Core and Framework)
helpquestion
6 Posts 2 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.
  • M Offline
    M Offline
    Mehdi Ghiasi
    wrote on last edited by
    #1

    I want to save variable Values to a file and start another application when unhandled error occurs. Does anyone has any idea?

    Regards
    Mahdi Ghiasi

    L 1 Reply Last reply
    0
    • M Mehdi Ghiasi

      I want to save variable Values to a file and start another application when unhandled error occurs. Does anyone has any idea?

      Regards
      Mahdi Ghiasi

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      mahdigh wrote:

      Does anyone has any idea?

      About what exactly? Writing things to a file shouldn't be much of a problem. There's an event[^] that's triggered when an unhandled exception occurs. Starting an application is done via Proces.Start[^]. That about covers it, I guess :)

      I are Troll :suss:

      M 1 Reply Last reply
      0
      • L Lost User

        mahdigh wrote:

        Does anyone has any idea?

        About what exactly? Writing things to a file shouldn't be much of a problem. There's an event[^] that's triggered when an unhandled exception occurs. Starting an application is done via Proces.Start[^]. That about covers it, I guess :)

        I are Troll :suss:

        M Offline
        M Offline
        Mehdi Ghiasi
        wrote on last edited by
        #3

        Where is Proces.Start in VB?

        Mahdi Ghiasi

        L 1 Reply Last reply
        0
        • M Mehdi Ghiasi

          Where is Proces.Start in VB?

          Mahdi Ghiasi

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          mahdigh wrote:

          Where is Proces.Start in VB?

          In VB.NET you'll find it in the diagnostics namespace. If you're using VB6, then there won't be a namespace. You'd use the built-in Shell function, or call the CreateProcess[^] API. Hope this helps :)

          I are Troll :suss:

          M 1 Reply Last reply
          0
          • L Lost User

            mahdigh wrote:

            Where is Proces.Start in VB?

            In VB.NET you'll find it in the diagnostics namespace. If you're using VB6, then there won't be a namespace. You'd use the built-in Shell function, or call the CreateProcess[^] API. Hope this helps :)

            I are Troll :suss:

            M Offline
            M Offline
            Mehdi Ghiasi
            wrote on last edited by
            #5

            Where is diagnostics namespace in VB.NET?

            Mahdi Ghiasi

            L 1 Reply Last reply
            0
            • M Mehdi Ghiasi

              Where is diagnostics namespace in VB.NET?

              Mahdi Ghiasi

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              It's under the System namespace. You can call it like this;

              System.Diagnostics.Process.Start(@"c:\Them_Variables_Be_Here.txt")

              That would open the file in the application that's associated with text-files, which defaults to Notepad. A more elaborate example can be found on MSDN[^]. Enjoy :)

              I are Troll :suss:

              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