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. C#
  4. program disables the application

program disables the application

Scheduled Pinned Locked Moved C#
helpcsharpperformance
5 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.
  • S Offline
    S Offline
    Saamir
    wrote on last edited by
    #1

    Hi guys, I need your help. I am not a pro in C# and have stalled with a problem. My application does a bunch of things in the following function and this function is called when a button is clicked. upon clicking and upon execution of these functions my application background stalls/turns white due to I believe memory overloading. Please advice on what I could do to avoid that, I tried using application.doevents() but that causes then my MDI screen to go white :) Please advice.... public bool ProcessMain(string []psfile,out string sErrMessage) { bool rt=true; string ErrMessage=string.Empty; sErrMessage=string.Empty; try { rt=CleanBox(out ErrMessage); if(rt) { rt=ParseFile(psfile,out ErrMessage); if(rt) { rt=ProcessBatch(out ErrMessage); if(rt) { rt=ProcessErrors(out ErrMessage); if(rt) {

    Sameer

    J 1 Reply Last reply
    0
    • S Saamir

      Hi guys, I need your help. I am not a pro in C# and have stalled with a problem. My application does a bunch of things in the following function and this function is called when a button is clicked. upon clicking and upon execution of these functions my application background stalls/turns white due to I believe memory overloading. Please advice on what I could do to avoid that, I tried using application.doevents() but that causes then my MDI screen to go white :) Please advice.... public bool ProcessMain(string []psfile,out string sErrMessage) { bool rt=true; string ErrMessage=string.Empty; sErrMessage=string.Empty; try { rt=CleanBox(out ErrMessage); if(rt) { rt=ParseFile(psfile,out ErrMessage); if(rt) { rt=ProcessBatch(out ErrMessage); if(rt) { rt=ProcessErrors(out ErrMessage); if(rt) {

      Sameer

      J Offline
      J Offline
      Justin Perez
      wrote on last edited by
      #2

      Create a worker thread and run the method from there.

      I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer

      S 1 Reply Last reply
      0
      • J Justin Perez

        Create a worker thread and run the method from there.

        I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer

        S Offline
        S Offline
        Saamir
        wrote on last edited by
        #3

        Thank you Justin, Unfortunately I am clueless about threads, i researched google but can't figure out exactly on how to implement it with my code. Please advice

        Sameer

        J 1 Reply Last reply
        0
        • S Saamir

          Thank you Justin, Unfortunately I am clueless about threads, i researched google but can't figure out exactly on how to implement it with my code. Please advice

          Sameer

          J Offline
          J Offline
          Justin Perez
          wrote on last edited by
          #4

          This article[^] is pretty simple, and straight forward. It has some sample code, with comments. It should be pretty easy to figure out, and then implement for your own needs. Good luck :)

          I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer

          S 1 Reply Last reply
          0
          • J Justin Perez

            This article[^] is pretty simple, and straight forward. It has some sample code, with comments. It should be pretty easy to figure out, and then implement for your own needs. Good luck :)

            I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer

            S Offline
            S Offline
            Saamir
            wrote on last edited by
            #5

            thank you and I appreciate your help.

            Sameer

            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