Making a form bigger than the Screen Resolution

11. August 2011 02:55 by Mrojas in General  //  Tags: , , , , ,   //   Comments (0)

 

A friend at work asked me how do I make my form bigger that the screen resolution. I was not able to do it, but
he google it and found a solution from: http://social.msdn.microsoft.com/Forums/en/vblanguage/thread/65c48eea-408a-45ed-a1cc-ea0336047798

This is just the transliteration of that code in C# just as a reference
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows.Forms;
public class Form1 : Form { [DllImport("User32.dll", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)] private static extern bool MoveWindow(IntPtr hWnd, int x, int y, int w, int h, bool Repaint); private void Form1_Load(System.Object sender, System.EventArgs e) { this.MaximumSize = new Size(5000, 800); bool Result = MoveWindow(this.Handle, this.Left, this.Top, 5000, 500, true); } public Form1() { Load += Form1_Load; } }

Categories