Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

maximize window c# console

    using System;  
    using System.Collections.Generic;  
    using System.Linq;  
    using System.Text;  
    using System.IO;  
    using System.Diagnostics;  
    using System.Runtime.InteropServices;  
    namespace Consolefullscreen  
    {  
       class Program  
       {  
          [DllImport("kernel32.dll", ExactSpelling = true)]  
          private static extern IntPtr GetConsoleWindow();  
          private static IntPtr ThisConsole = GetConsoleWindow();  
          [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]  
          private static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);  
          private const int HIDE = 0;  
          private const int MAXIMIZE = 3;  
          private const int MINIMIZE = 6;  
          private const int RESTORE = 9;  
          static void Main(string[] args)  
          {  
             Console.SetWindowSize(Console.LargestWindowWidth, Console.LargestWindowHeight);  
             ShowWindow(ThisConsole, MAXIMIZE);  
             Console.ReadLine();  
          }  
       }  
    }  
Comment

PREVIOUS NEXT
Code Example
Csharp :: placeholder syntax c# 
Csharp :: slider.onchanged in unity 
Csharp :: if statement swiftui 
Csharp :: unity default cube mesh 
Csharp :: how to change a string variables value c# 
Csharp :: add rotation unity c# 
Csharp :: unity set dropdown value 
Csharp :: convert string to int and read it 
Csharp :: make folder with c# 
Csharp :: default generic parameter for method in c# 
Csharp :: c# how to write an array in a single line 
Csharp :: how unsort the data table options 
Csharp :: how to check a list is null or empty in c# 
Csharp :: c# minus days from datetime 
Csharp :: how to remove all buttons on a form C# 
Csharp :: visual studio c# color dialog 
Csharp :: c# ftp file download 
Csharp :: c# web api return image file 
Csharp :: c# restclient timeout 
Csharp :: c# read xml file 
Csharp :: gameobject in unity c# 
Csharp :: c# remove items from one list that are in another 
Csharp :: how to check if a path is a directory or file c# 
Csharp :: c# inline array initialization 
Csharp :: Minimize window to system tray c# 
Csharp :: unity call function on animation end 
Csharp :: unity string lowercase 
Csharp :: c# get directory name from filename 
Csharp :: validating file upload asp.net core mvc 
Csharp :: c# list 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =