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. slow performance of C# windows form program

slow performance of C# windows form program

Scheduled Pinned Locked Moved C#
csharpjavaperformancequestion
3 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.
  • V Offline
    V Offline
    vcorn
    wrote on last edited by
    #1

    hi all, i just want to ask for suggestion i create a windows form program mainform.cs, and in this mainform i created instance of all classes that will be used. then i have another form that will only be created when user click a button on mainform. the second form itself have some functionality, when user click on button, it will call a function. I found doin this(multiple forms) slow down my program 100% instead of just using one mainform and call the function when user click on the button of the mainform directly. If this is true that C# windows form very slow when i did this, it's very bad right? i used to program with multiple java frame(window) and it doesn't matter at all. Is there something wrong i did?

    C 1 Reply Last reply
    0
    • V vcorn

      hi all, i just want to ask for suggestion i create a windows form program mainform.cs, and in this mainform i created instance of all classes that will be used. then i have another form that will only be created when user click a button on mainform. the second form itself have some functionality, when user click on button, it will call a function. I found doin this(multiple forms) slow down my program 100% instead of just using one mainform and call the function when user click on the button of the mainform directly. If this is true that C# windows form very slow when i did this, it's very bad right? i used to program with multiple java frame(window) and it doesn't matter at all. Is there something wrong i did?

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      vcorn wrote: Is there something wrong i did? It sounds like it because I've never had any slow down in speed when dealing with one, two or more forms. Can you describe more accrurately what you are trying to do, because I can't work out what you're doing to get it to slow down.


      "You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar The Second EuroCPian Event will be in Brussels on the 4th of September Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way! My Blog

      V 1 Reply Last reply
      0
      • C Colin Angus Mackay

        vcorn wrote: Is there something wrong i did? It sounds like it because I've never had any slow down in speed when dealing with one, two or more forms. Can you describe more accrurately what you are trying to do, because I can't work out what you're doing to get it to slow down.


        "You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar The Second EuroCPian Event will be in Brussels on the 4th of September Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way! My Blog

        V Offline
        V Offline
        vcorn
        wrote on last edited by
        #3

        i feel weird too, it's basically just call a function of an object when user click on a button. indeed this function deal with active directory(creating user in active directory). when i switch to call this function from mainform button, it execute just well. but when i change it to call this function from the second form(show as dialog with mainform as parent), it slow down, i have to wait 2-3 minutes to get it finish executing creating a user. so i think there is nothing wrong in the code that slow down the performance,am i right?

        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