Results 1 to 9 of 9

Thread: How can I clear a console?

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    How can I clear a console?

    well?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Are you sure you can clear it ????

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    well if I was SURE about that, then I wouldnt post this here
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  4. #4
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Little upset about the MCP MrPolite? Just thought I would change my sig for you...lol.

  5. #5
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    To answer your question, I got this code from this sample code:
    http://www.c-sharpcorner.com/Code/20...SysConsole.asp

    Code:
    static public void ClearScreen()
    {
    	//   First, fisical clear screen.
    	int writted = 0;
    	Win32Native.COORD start = new Win32Native.COORD();
    	start.x = start.y = 0;
    	Win32Native.FillConsoleOutputCharacter(m_hCon, ' ', m_Info.MaxSize.y * m_Info.MaxSize.x, 
    						start, ref writted);
    	Win32Native.FillConsoleOutputAttribute(m_hCon, m_BackAtt, m_Info.MaxSize.y * m_Info.MaxSize.x,
    						start, ref writted);
    
    	//   Cursor go at left/top.
    	Locate(1, 1);
    }
    I leave it to you to figure out, at least it may get you started. And of course, it is in C#....you should know it by now...lol.

  6. #6

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by hellswraith
    Little upset about the MCP MrPolite? Just thought I would change my sig for you...lol.

    btw that "for mendhak" in my sig refers to the other pic following it....
    It's a great honor to have my name in our sig!
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  7. #7

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    thanks alot, it works fine, just tested it....
    I'm lazy! gutto get used to API's in .NET
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  8. #8
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    in psc theres a far more complicatted example for vb.net if u want to knowlol

  9. #9

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    well there aren't that many API's for console apps. So I dont know how much more complicated it can be
    can you send a link anyways?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width