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. hide console window

hide console window

Scheduled Pinned Locked Moved C#
tutorial
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.
  • O Offline
    O Offline
    Otis_69
    wrote on last edited by
    #1

    Hey, me again, just wondering iff anyone knows how to get rid of the console window... Im making my forms dynamically, using a console application, but if the console window shows, it isnt as attractive... //Otis

    S 1 Reply Last reply
    0
    • O Otis_69

      Hey, me again, just wondering iff anyone knows how to get rid of the console window... Im making my forms dynamically, using a console application, but if the console window shows, it isnt as attractive... //Otis

      S Offline
      S Offline
      Stefan Troschuetz
      wrote on last edited by
      #2

      I think you get what you want, if you create a Windows application and fill the Main-method with some other code before showing a form. static void Main() { // // Do what you want here. // System.Windows.Forms.Application.Run(new MainForm()); } www.troschuetz.de

      O 1 Reply Last reply
      0
      • S Stefan Troschuetz

        I think you get what you want, if you create a Windows application and fill the Main-method with some other code before showing a form. static void Main() { // // Do what you want here. // System.Windows.Forms.Application.Run(new MainForm()); } www.troschuetz.de

        O Offline
        O Offline
        Otis_69
        wrote on last edited by
        #3

        I know, but i made a console program, its an irc server, and now i want to make it use a tray icon, so you can tell tyhe status of the server, but i already coded 75% of it in console, and i cba to switch to a windows application... Isnt there a compiler directive to hide the console? //Otis

        S 1 Reply Last reply
        0
        • O Otis_69

          I know, but i made a console program, its an irc server, and now i want to make it use a tray icon, so you can tell tyhe status of the server, but i already coded 75% of it in console, and i cba to switch to a windows application... Isnt there a compiler directive to hide the console? //Otis

          S Offline
          S Offline
          Stefan Troschuetz
          wrote on last edited by
          #4

          Don't know a direct way to do this, cause I never coded a console application with .NET. Maybe you could use some API methods to hide the console window. Is it so complicated to copy the "console" code to a Windows Application to reach the effect you want.? www.troschuetz.de

          O 1 Reply Last reply
          0
          • S Stefan Troschuetz

            Don't know a direct way to do this, cause I never coded a console application with .NET. Maybe you could use some API methods to hide the console window. Is it so complicated to copy the "console" code to a Windows Application to reach the effect you want.? www.troschuetz.de

            O Offline
            O Offline
            Otis_69
            wrote on last edited by
            #5

            yes. One, is file size, and i dont want the program to be loading all the stuff i dont need. File size saves time (downloading and running) and saving time means more users (most likley me and a bunch of friends) will want it to be fast, small, etc. Would it be possible to grab the process and set it to hid somehow through that? //Otis

            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