示例#1
0
        public DefaultForm(WindowClassStyle classStyle, WindowsExtendedStyle dwStyleEx, string title,
                           WindowStyles windowStyle, int left, int top, int winWidth, int winHeight, Control parentHWnd)
        {
            this._classStyle  = classStyle;
            this._dwStyleEx   = dwStyleEx;
            this._windowStyle = windowStyle;
            this.Text         = title;

            SuspendLayout();

            BackColor = Color.Black;
            Name      = title;
            Left      = left;
            Top       = top;
            Width     = winWidth;
            Height    = winHeight;
            if (parentHWnd != null)
            {
                Parent = parentHWnd;
            }

            Load       += _defaultFormLoad;
            Deactivate += _defaultFormDeactivate;
            Activated  += _defaultFormActivated;
            Closing    += _defaultFormClose;
            Resize     += _defaultFormResize;
            Cursor.Hide();

            ResumeLayout(false);
        }
示例#2
0
	    public DefaultForm( WindowClassStyle classStyle, WindowsExtendedStyle dwStyleEx, string title, 
            WindowStyles windowStyle, int left, int top, int winWidth, int winHeight, Control parentHWnd )
	    {
	        _classStyle = classStyle;
	        _dwStyleEx = dwStyleEx;
	        _windowStyle = windowStyle;

	        SuspendLayout();
           
            AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            BackColor = System.Drawing.Color.Black;
            ClientSize = new System.Drawing.Size(640, 480);
            Name = title;
	        Left = left;
	        Top = top;
	        Width = winWidth;
	        Height = winHeight;
            if (parentHWnd != null)
	            Parent = parentHWnd;

            Load += DefaultFormLoad;
            Deactivate += DefaultFormDeactivate;
            Activated += DefaultFormActivated;
            Closing += DefaultFormClose;
            Resize += DefaultFormResize;

            ResumeLayout(false);
	    }
示例#3
0
	[DllImport("user32", EntryPoint="CreateWindowEx", CharSet=CharSet.Auto, ExactSpelling=false, CallingConvention = CallingConvention.Winapi)] //Auto
	public static extern IntPtr CreateWindowExA(WindowsExtendedStyle dwExStyle, string lpszClassName, string lpszWindowName, WindowStyle style, int x, int y, int width, int height, IntPtr hWndParent, IntPtr hMenu, IntPtr hInst, IntPtr pvParam);
示例#4
0
	public static extern bool AdjustWindowRectEx(ref RECT lpRect, WindowStyle dwStyle, [MarshalAs(UnmanagedType.Bool)] bool bMenu, WindowsExtendedStyle dwExStyle);
示例#5
0
	public static extern int SetWindowLongA( IntPtr hWnd, SetWindowLongType nIndex, WindowsExtendedStyle dwNewLong);
示例#6
0
		public DefaultForm( WindowClassStyle classStyle, WindowsExtendedStyle dwStyleEx, string title,
		                    WindowStyles windowStyle, int left, int top, int winWidth, int winHeight, Control parentHWnd )
		{
			this._classStyle = classStyle;
			this._dwStyleEx = dwStyleEx;
			this._windowStyle = windowStyle;

			SuspendLayout();

			BackColor = Color.Black;
			Name = title;
			Left = left;
			Top = top;
			Width = winWidth;
			Height = winHeight;
			if ( parentHWnd != null )
			{
				Parent = parentHWnd;
			}

			Load += _defaultFormLoad;
			Deactivate += _defaultFormDeactivate;
			Activated += _defaultFormActivated;
			Closing += _defaultFormClose;
			Resize += _defaultFormResize;
			Cursor.Hide();

			ResumeLayout( false );
		}