maximize

Making the console window bigger in C

﹥>﹥吖頭↗ 提交于 2019-12-01 14:45:15
How can I resize the Windows console window in C? Alright, after much deliberation, I got the code working. Using this include: #include <windows.h> This struct: struct SMALL_RECT { SHORT Left; SHORT Top; SHORT Right; SHORT Bottom; }; And this function: void adjustWindowSize() { struct SMALL_RECT test; HANDLE hStdout; COORD coord; BOOL ok; hStdout = GetStdHandle(STD_OUTPUT_HANDLE); coord.X = 100; coord.Y = 50; ok = SetConsoleScreenBufferSize(hStdout, coord); test.Left = 0; test.Top = 0; test.Right = coord.X-1; test.Bottom = coord.Y-1; SetConsoleWindowInfo(hStdout, ok, &test); } //end

Making the console window bigger in C

自闭症网瘾萝莉.ら 提交于 2019-12-01 12:45:11
问题 How can I resize the Windows console window in C? 回答1: Alright, after much deliberation, I got the code working. Using this include: #include <windows.h> This struct: struct SMALL_RECT { SHORT Left; SHORT Top; SHORT Right; SHORT Bottom; }; And this function: void adjustWindowSize() { struct SMALL_RECT test; HANDLE hStdout; COORD coord; BOOL ok; hStdout = GetStdHandle(STD_OUTPUT_HANDLE); coord.X = 100; coord.Y = 50; ok = SetConsoleScreenBufferSize(hStdout, coord); test.Left = 0; test.Top = 0;

How to maximize window in XNA

我怕爱的太早我们不能终老 提交于 2019-12-01 11:15:59
This SHOULD be a very simple question but after lots of searching there seems to be no working example anywhere. I just want my XNA window to start off maximized. I know how to set the width and height of the window, but that's not quite the same. I also need to do this without going full screen. I just want a normal maximized window. @Cyral has the closest answer so far, but it's still not quite what you want. To maximize a Windows Form, you use the WindowState property: var form = (Form)Form.FromHandle(Window.Handle); form.WindowState = FormWindowState.Maximized; Set the IsFullScreen

How to maximize window in XNA

爷,独闯天下 提交于 2019-12-01 08:54:34
问题 This SHOULD be a very simple question but after lots of searching there seems to be no working example anywhere. I just want my XNA window to start off maximized. I know how to set the width and height of the window, but that's not quite the same. I also need to do this without going full screen. I just want a normal maximized window. 回答1: @Cyral has the closest answer so far, but it's still not quite what you want. To maximize a Windows Form, you use the WindowState property: var form =

Maximize window from the Main function?

倖福魔咒の 提交于 2019-12-01 07:32:38
I have used a mutex to run a single instance program, and now I want the window to become maximized if it is currently minimized when the user reopens the application. Here is the code I currently have in my Program.cs file: static class Program { [DllImport("user32.dll")] public static extern bool SetForegroundWindow(IntPtr hWnd); /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { bool Ok = true; string ProductName = Application.ProductName; Mutex m = new Mutex(true, ProductName, out Ok); if (!Ok) { System.Diagnostics.Process[] p =

Maximize MDI child form

Deadly 提交于 2019-11-30 03:14:59
问题 I'm working on a legacy WinForms MDI application and have some trouble making the child forms behave as I want. My objective is to have the child form always maximized (docked). The problem is, that even if I set MaximizeBox to false the maximize/resize button appears in the MDIs toolstrip and let the user resize (undock) the child form. The only way to avoid this is to set ControlBox to false but then the close button disappears to (thats not what I want). I've already tried to use a fixed

Enable Maximize, Minimize and Restore Window in WPF (Manual Resize is disable)

╄→尐↘猪︶ㄣ 提交于 2019-11-29 04:52:21
I need to enable the following on my application (C# WPF application): Have normal size of 1024*768 The user can maximize the application The user can minimize the application The user can restore the application (1024*768) The user cannot manually resize the application by draging its border. There isn't any ResizeMode the fulfills all of those requirements. Is there any way to do do? Nir I've finally found a relatively decent solution. The idea is to overide the OnStateChanged event of the window, cancel the Min/Max constraints and refresh it. If the window is not maximized, we simply apply

DragMove() and Maximize

核能气质少年 提交于 2019-11-29 03:53:18
I have a problem with my custom window (AllowTransparency, WindowStyle=None) in WPF. DragMove() method works good, but when I maximize window, or it maximizing automatically by Windows 7 Aero Snap, this method does not work at all. So I can't unsnap window with mouse drag and return it state to WindowState.Normal. Left and Right Aero Snap works good, I can snap and unsnap window without a problem. But when it maximized, nothing works except Win+Down combination. Maybe somebody knows how to solve this problem or where can I find other ways to do proper DragMove of custom window with working

Properly maximizing WPF window with WindowStyle=None

…衆ロ難τιáo~ 提交于 2019-11-29 02:32:47
问题 There are two problems with WPF windows when the WindowStyle=None option is used. The window covers the Taskbar when maximized. Once maximized, the window cannot be dragged down to unmaximize. How can these problems be corrected? Preferably without using Windows.Forms. 回答1: There are other answers to these problems online. However none of them take into acount how the solution will perform on setups with multiple monitors. Especially if the primary monitor is not the left-most in the setup. I

How can I make a WPF window maximized on the screen with the mouse cursor?

假如想象 提交于 2019-11-29 00:54:09
According to the MSDN documentation for the WindowStartupLocation Property : Setting CenterScreen causes a window to be positioned in the center of the screen that contains the mouse cursor. Although the MSDN doc for the CenterScreen Field itself defines it somewhat less clearly as: The startup location of a window is the center of the screen on which it is opened. A simple test shows this working as it should: MainWindow.xaml <Window x:Class="CenterScreenTest.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">