Exemplo n.º 1
0
        public Webbrowser()
        {
            //WebBrowserHelper.FixBrowserVersion();

            InitializeComponent();

            wb = new System.Windows.Forms.WebBrowser();
            FormsHost.Child           = wb;
            wb.ScriptErrorsSuppressed = true;

            wb.Navigate("about:blank");

            System.Windows.Forms.Button btn = button();
            wb.Controls.Add(btn);
            btn.BringToFront();
        }
    public void LoadClient(string Name)
    {
        Client Game = new Client();

        Windows = Game.Window(Name);

        SetParent(Windows[0], WindowHostPanel.Handle);

        int style = GetWindowLong(Windows[1], GWL_STYLE);

        style = style & ~WS_CAPTION & ~WS_THICKFRAME & ~SWP_NOZORDER & ~SWP_NOACTIVATE;
        SetWindowLong(Windows[1], GWL_STYLE, style);

        MoveWindow(Windows[1], 0, 0, WindowHostPanel.Width, WindowHostPanel.Height, true);

        SetWindowFocus();

        ShowWindow(Windows[1], 0);

        System.Windows.Forms.Button btn = button();
        WindowHostPanel.Controls.Add(btn);
        btn.BringToFront();
    }