System.Windows.Forms.Control.FindForm()

Here are the examples of the csharp api class System.Windows.Forms.Control.FindForm() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

200 Examples 7

101. Example

Project: ContinuousTests
Source File: ResultTabs.cs
private void textOutputMenuItem_Click(object sender, System.EventArgs e)
		{
			SimpleSettingsDialog.Display( this.FindForm(), new TextOutputSettingsPage("Text Output") );
		}

102. Example

Project: ContinuousTests
Source File: TipWindow.cs
private void InitControl( Control control )
		{
			this.control = control;
			this.Owner = control.FindForm();
			this.itemBounds = control.ClientRectangle;

			this.ControlBox = false;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.BackColor = Color.LightYellow;
			this.FormBorderStyle = FormBorderStyle.None;
			this.StartPosition = FormStartPosition.Manual; 			

			this.Font = control.Font;
		}

103. Example

Project: ContinuousTests
Source File: ResultTabs.cs
private void textOutputMenuItem_Click(object sender, System.EventArgs e)
		{
			SimpleSettingsDialog.Display( this.FindForm(), new TextOutputSettingsPage("Text Output") );
		}

104. Example

Project: ContinuousTests
Source File: TipWindow.cs
private void InitControl( Control control )
		{
			this.control = control;
			this.Owner = control.FindForm();
			this.itemBounds = control.ClientRectangle;

			this.ControlBox = false;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.BackColor = Color.LightYellow;
			this.FormBorderStyle = FormBorderStyle.None;
			this.StartPosition = FormStartPosition.Manual; 			

			this.Font = control.Font;
		}

105. Example

Project: JiraSVN
Source File: ImmediateUpdateForm.cs
void ValidateControl(object sender, EventArgs args)
		{
			Form frm = _top.FindForm();
			if (frm != null)
			{
				if (sender is Control && ((Control)sender).Focused)
				{
					Log.Verbose("{0} Changed: {1}", sender, ((Control)sender).Text);
					((Control)sender).DataBindings.DefaultDataSourceUpdateMode = DataSourceUpdateMode.OnPropertyChanged;
					((Control)sender).DataBindings[0].ControlUpdateMode = ControlUpdateMode.OnPropertyChanged;
				}
			}
		}

106. Example

Project: VisualPlus
Source File: VisualControlBox.cs
protected virtual void OnMaximizeClick(ControlBoxEventArgs e)
        {
            Parent.FindForm().WindowState = FormWindowState.Maximized;
            MaximizeClick?.Invoke(e);
        }

107. Example

Project: VisualPlus
Source File: VisualControlBox.cs
protected virtual void OnMinimizeClick(ControlBoxEventArgs e)
        {
            Parent.FindForm().WindowState = FormWindowState.Minimized;
            MinimizeClick?.Invoke(e);
        }

108. Example

Project: VisualPlus
Source File: VisualControlBox.cs
protected virtual void OnRestoredFormWindow(ControlBoxEventArgs e)
        {
            Parent.FindForm().WindowState = FormWindowState.Normal;
            RestoredFormWindow?.Invoke(e);
        }

109. Example

Project: EDDiscovery
Source File: ActionPackEditCondition.cs
private void Keypress_Click(object sender, EventArgs e)
        {
            ExtendedControls.KeyForm kf = new ExtendedControls.KeyForm();
            kf.Init(this.Icon, false, ",", buttonKeys.Text.Equals("?") ? "" : buttonKeys.Text);
            if ( kf.ShowDialog(FindForm()) == DialogResult.OK)
            {
                buttonKeys.Text = kf.KeyList;
                cd.fields[0].matchstring = kf.KeyList;
                cd.fields[0].matchtype = (kf.KeyList.Contains(",")) ? ConditionEntry.MatchType.IsOneOf : ConditionEntry.MatchType.Equals;
            }
        }

110. Example

Project: FAtiMA-Toolkit
Source File: TypedFieldBox.cs
private void OnKeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == (char) Keys.Return)
				this.FindForm().ActiveControl=null;
		}

111. Example

Project: PKHeX
Source File: SlotChangeManager.cs
public void SetCursor(Cursor z, object sender)
        {
            if (SE != null)
                DragInfo.Cursor = (sender as Control).FindForm().Cursor = z;
        }

112. Example

Project: MultiversePlatform
Source File: Win32InputReader.cs
private void InitializeImmediateKeyboard() {
			// Create the device.
			keyboardDevice = new DInput.Device(SystemGuid.Keyboard);

			// grab the keyboard
            CooperativeLevelFlags excl = ownKeyboard ? CooperativeLevelFlags.Exclusive : CooperativeLevelFlags.NonExclusive;
            CooperativeLevelFlags background = (backgroundKeyboard && !ownKeyboard) ? CooperativeLevelFlags.Background : CooperativeLevelFlags.Foreground;
           
            keyboardDevice.SetCooperativeLevel(control.FindForm(), excl | background);
            
			// Set the data format to the keyboard pre-defined format.
			keyboardDevice.SetDataFormat(DeviceDataFormat.Keyboard);

			try {
				keyboardDevice.Acquire();
			}
			catch {
				throw new Exception("Unable to acquire a keyboard using DirectInput.");
			}
		}

113. Example

Project: MultiversePlatform
Source File: Win32InputReader.cs
private void InitializeBufferedKeyboard() {
			// create the device
			keyboardDevice = new DInput.Device(SystemGuid.Keyboard);

			// Set the data format to the keyboard pre-defined format.
			keyboardDevice.SetDataFormat(DeviceDataFormat.Keyboard);

			// grab the keyboard
            // For debugging, use the background flag so we don't lose input when we are in the debugger.
            // For release, use the foreground flag, so input to other apps doesn't show up here
            CooperativeLevelFlags excl = ownKeyboard ? CooperativeLevelFlags.Exclusive : CooperativeLevelFlags.NonExclusive;
            CooperativeLevelFlags background = (backgroundKeyboard && !ownKeyboard) ? CooperativeLevelFlags.Background : CooperativeLevelFlags.Foreground;

            keyboardDevice.SetCooperativeLevel(control.FindForm(), excl | background);

            // set the buffer size to use for input
			keyboardDevice.Properties.BufferSize = BufferSize;

            // note: dont acquire yet, wait till capture
            //try {
            //    keyboardDevice.Acquire();
            //}
            //catch {
            //    throw new Exception("Unable to acquire a keyboard using DirectInput.");
            //}
		}

114. Example

Project: MultiversePlatform
Source File: Win32InputReader.cs
private void InitializeImmediateMouse() {
			// create the device
			mouseDevice = new DInput.Device(SystemGuid.Mouse);

			mouseDevice.Properties.AxisModeAbsolute = true;

			// set the device format so DInput knows this device is a mouse
			mouseDevice.SetDataFormat(DeviceDataFormat.Mouse);

            CooperativeLevelFlags excl = ownMouse ? CooperativeLevelFlags.Exclusive : CooperativeLevelFlags.NonExclusive;
            CooperativeLevelFlags background = (backgroundMouse && !ownMouse) ? CooperativeLevelFlags.Background : CooperativeLevelFlags.Foreground;

            // set cooperation level
            mouseDevice.SetCooperativeLevel(control.FindForm(), excl | background);

			// note: dont acquire yet, wait till capture
		}

115. Example

Project: MultiversePlatform
Source File: Win32InputReader.cs
private void InitializeBufferedMouse() {
			// create the device
			mouseDevice = new DInput.Device(SystemGuid.Mouse);

			mouseDevice.Properties.AxisModeAbsolute = true;

			// set the device format so DInput knows this device is a mouse
			mouseDevice.SetDataFormat(DeviceDataFormat.Mouse);

			// set the buffer size to use for input
			mouseDevice.Properties.BufferSize = BufferSize;

            CooperativeLevelFlags excl = ownMouse ? CooperativeLevelFlags.Exclusive : CooperativeLevelFlags.NonExclusive;
            CooperativeLevelFlags background = (backgroundMouse && !ownMouse) ? CooperativeLevelFlags.Background : CooperativeLevelFlags.Foreground;

            // set cooperation level
            mouseDevice.SetCooperativeLevel(control.FindForm(), excl | background);

			// note: dont acquire yet, wait till capture?
			//try {
			//    mouseDevice.Acquire();
			//} catch {
			//    throw new Exception("Unable to acquire a mouse using DirectInput.");
			//}
		}

116. Example

Project: nunit-gui
Source File: TipWindow.cs
private void InitControl( Control control )
        {
            _control = control;
            Owner = control.FindForm();
            ItemBounds = control.ClientRectangle;

            ControlBox = false;
            MaximizeBox = false;
            MinimizeBox = false;
            BackColor = Color.LightYellow;
            FormBorderStyle = FormBorderStyle.None;
            StartPosition = FormStartPosition.Manual; 			

            Font = control.Font;
        }

117. Example

Project: OpenLiveWriter
Source File: MinMaxClose.cs
private void btnMinimize_Click(object sender, System.EventArgs e)
        {
            FindForm().WindowState = FormWindowState.Minimized;
        }

118. Example

Project: OpenLiveWriter
Source File: GlossaryManagementControl.cs
private void EditSelectedEntry()
        {
            if (SelectedEntry == null)
                return;

            try
            {
                using (new WaitCursor())
                {
                    GlossaryLinkItem revisedEntry = GlossaryManager.Instance.EditEntry(FindForm(), SelectedEntry.Text);

                    if (revisedEntry != null)
                    {
                        listViewGlossary.CheckForDelete(revisedEntry.Text, listViewGlossary.SelectedItems[0]);
                        // refresh contents of list-view item
                        listViewGlossary.PopulateListItem(listViewGlossary.SelectedItems[0], revisedEntry);
                    }

                    // set focus to the list
                    listViewGlossary.Focus();
                }
            }
            catch (Exception ex)
            {
                UnexpectedErrorMessage.Show(ex);
            }

        }

119. Example

Project: OpenLiveWriter
Source File: HtmlSourceEditorControl.cs
public bool CheckSpelling()
        {
            // check spelling
            using (SpellCheckerForm spellCheckerForm = new SpellCheckerForm(SpellingChecker, EditorControl.FindForm(), false))
            {
                //  center the spell-checking form over the document body
                spellCheckerForm.StartPosition = FormStartPosition.CenterParent;

                // create word range
                // TODO: smarter word range for html
                //TextBoxWordRange wordRange = new TextBoxWordRange(_textBox, _textBox.SelectionLength > 0);
                HtmlTextBoxWordRange wordRange = new HtmlTextBoxWordRange(_textBox);

                // check spelling
                spellCheckerForm.CheckSpelling(wordRange);

                // return completed status
                return spellCheckerForm.Completed;
            }
        }

120. Example

Project: OpenLiveWriter
Source File: MshtmlEditor.cs
private void DocumentEvents_GotFocus(object sender, EventArgs e)
        {
            Form form = FindForm();
            if (form != null)
                form.ActiveControl = this;
        }

121. Example

Project: OpenLiveWriter
Source File: WeblogAccountManagementControl.cs
private void buttonAdd_Click(object sender, EventArgs e)
        {
            try
            {
                using (new WaitCursor())
                {
                    string newBlogId = WeblogConfigurationWizardController.Add(FindForm(), false);
                    if (newBlogId != null)
                    {
                        // add the weblog
                        using (BlogSettings blogSettings = BlogSettings.ForBlogId(newBlogId))
                        {
                            ListViewItem item = listViewWeblogs.AddWeblogItem(blogSettings);

                            // select the item that was added
                            listViewWeblogs.SelectedItems.Clear();
                            item.Selected = true;

                            // set focus to the list
                            listViewWeblogs.Focus();
                        }
                    }
                    return;

                }
            }
            catch (Exception ex)
            {
                UnexpectedErrorMessage.Show(ex);
            }
        }

122. Example

Project: OpenLiveWriter
Source File: WeblogAccountManagementControl.cs
private void EditSelectedWeblog()
        {
            if (SelectedWeblog == null)
                return;

            try
            {
                using (new WaitCursor())
                {
                    WeblogSettingsManager.EditSettings(FindForm(), SelectedWeblog.Id, typeof(AccountPanel));

                    // refresh contents of list-view item
                    listViewWeblogs.EditWeblogItem(listViewWeblogs.SelectedItems[0], SelectedWeblog);

                    // set focus to the list
                    listViewWeblogs.Focus();

                    // if we have an editing site then notify it that we
                    // just edited weblog settings
                    if (EditingSite != null)
                        EditingSite.NotifyWeblogSettingsChanged(SelectedWeblog.Id, true);

                }
            }
            catch (Exception ex)
            {
                UnexpectedErrorMessage.Show(ex);
            }

        }

123. Example

Project: OpenLiveWriter
Source File: BlogPostListBox.cs
private PostInfo[] GetRecentPostsSync(bool getPages)
        {
            try
            {
                using (new WaitCursor())
                {
                    if (getPages)
                        return PostSource.GetPages(RecentPostRequest);
                    else
                        return PostSource.GetRecentPosts(RecentPostRequest);

                }
            }
            catch (Exception ex)
            {
                DisplayableExceptionDisplayForm.Show(FindForm(), ex);
                return new PostInfo[] { };
            }
        }

124. Example

Project: OpenLiveWriter
Source File: PostPropertiesBandControl.cs
private void PostProperties_Execute(object sender, EventArgs e)
        {
            if (!Visible)
                return;

            if (postPropertiesForm.Visible)
                postPropertiesForm.Hide();
            else
                postPropertiesForm.Show(FindForm());
        }

125. Example

Project: OpenLiveWriter
Source File: PostPropertiesBandControl.cs
private void linkViewAll_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (e.Button != MouseButtons.Left)
                return;

            if (!postPropertiesForm.Visible)
                postPropertiesForm.Show(FindForm());
            else
            {
                if (postPropertiesForm.WindowState == FormWindowState.Minimized)
                    postPropertiesForm.WindowState = FormWindowState.Normal;
                postPropertiesForm.Activate();
            }
        }

126. Example

Project: OpenLiveWriter
Source File: ColumnWidthControl.cs
public bool ValidateInput(int maxValue)
        {
            if (!PixelPercent.IsAcceptableWidth(textBoxWidth.Text))
            {
                DisplayMessage.Show(MessageId.UnspecifiedValue, this, Res.Get(StringId.Width));
                textBoxWidth.Focus();
                return false;
            }
            else if (ColumnWidth.Units != PixelPercentUnits.Undefined && ColumnWidth.Value <= 0)
            {
                DisplayMessage.Show(MessageId.InvalidNumberPositiveOnly, FindForm(), Res.Get(StringId.Width));
                textBoxWidth.Focus();
                return false;
            }
            else if (maxValue > 0 && ColumnWidth.Units != PixelPercentUnits.Undefined && ColumnWidth.Value >= maxValue)
            {
                DisplayMessage.Show(MessageId.ValueExceedsMaximum, FindForm(), maxValue, Res.Get(StringId.Width));
                textBoxWidth.Focus();
                return false;
            }
            else
            {
                return true;
            }
        }

127. Example

Project: OpenLiveWriter
Source File: PostEditorMainControl.cs
private void commandShowDisplayMessageTestForm_Execute(object sender, EventArgs e)
        {
            using (DisplayMessageTestForm form = new DisplayMessageTestForm())
            {
                form.ShowDialog(FindForm());
            }
        }

128. Example

Project: OpenLiveWriter
Source File: PostEditorMainControl.cs
private bool ValidateTitleSpecified()
        {

            if (_htmlEditor.Title == String.Empty)
            {
                if (_editingManager.BlogRequiresTitles)
                {
                    // show error
                    DisplayMessage.Show(MessageId.NoTitleSpecified, FindForm());

                    // focus the title and return false
                    _htmlEditor.FocusTitle();
                    return false;
                }
                else if (PostEditorSettings.TitleReminder)
                {
                    using (TitleReminderForm titleReminderForm = new TitleReminderForm(_editingManager.EditingPage))
                    {
                        if (titleReminderForm.ShowDialog(FindForm()) != DialogResult.Yes)
                        {
                            _htmlEditor.FocusTitle();
                            return false;
                        }
                    }
                }
            }

            // got this far so the title must be valid
            return true;
        }

129. Example

Project: IronAHK
Source File: Gui.cs
static GuiInfo GuiAssociatedInfo(Control control)
        {
            return control.FindForm().Tag as GuiInfo;
        }

130. Example

Project: superputty
Source File: ctlApplicationPanel.cs
void WinEventProc(IntPtr hWinEventHook, uint eventType, IntPtr hwnd, int idObject, int idChild, uint dwEventThread, uint dwmsEventTime)
        {
            // if we got the EVENT_SYSTEM_FOREGROUND, and the hwnd is the putty terminal hwnd (m_AppWin)
            // then bring the supperputty window to the foreground
            if (eventType == WinAPI.EVENT_SYSTEM_FOREGROUND && hwnd == m_AppWin)
            {
                // This is the easiest way I found to get the superputty window to be brought to the top
                // if you leave TopMost = true; then the window will always be on top.
                this.TopLevelControl.FindForm().TopMost = true;
                this.TopLevelControl.FindForm().TopMost = false;
            }
        }

131. Example

Project: poderosa
Source File: PaneDivision.cs
private Form FindForm() {
            return _rootList.HostingControl.FindForm();
        }

132. Example

Project: poderosa
Source File: DisplayOptionPanel.cs
private void OnSelectBackgroundImage(object sender, EventArgs args) {
            string t = EditRenderProfile.SelectPictureFileByDialog(FindForm());
            if (t != null) {
                _backgroundImageBox.Text = t;
            }
        }

133. Example

Project: comparator
Source File: GridResult.cs
private void bPin_Click(object sender, EventArgs e)
    {
      FindForm().TopMost = !FindForm().TopMost;
      bPin.Image = FindForm().TopMost ? Properties.Resources.pinon : Properties.Resources.pinoff;
    }

134. Example

Project: comparator
Source File: GridResult.cs
private void bExcel_Click(object sender, EventArgs e)
    {
      cmp.ToHTML(true, true, (FindForm() as FormResult).ResultPath, (FindForm() as FormResult).ResultFileName, onError: onError);
    }

135. Example

Project: comparator
Source File: GridResult.cs
private void bHTML_Click(object sender, EventArgs e)
    {
      cmp.ToHTML(true, false, (FindForm() as FormResult).ResultPath, (FindForm() as FormResult).ResultFileName, onError: onError);
    }

136. Example

Project: comparator
Source File: SourcePanel.cs
private void SourcePanel_Load(object sender, EventArgs e)
    {
      ParentView = (IView)FindForm();
      sync = SynchronizationContext.Current;
      panelCommon.Dock = DockStyle.Top;
      panelCommon.BringToFront();
      
      panelDatabase.Dock = DockStyle.Fill;
      panelDatabase.Visible = false;
      panelDatabase.BringToFront(); 
      
      panelExcel.Dock = DockStyle.Fill;
      panelExcel.Visible = false;
      panelExcel.BringToFront();

      panelCsv.Dock = DockStyle.Fill;
      panelCsv.Visible = false;
      panelCsv.BringToFront();

      panelXml.Dock = DockStyle.Fill;
      panelXml.Visible = false;
      panelXml.BringToFront();        

      Dock = DockStyle.Fill;
    }

137. Example

Project: Sardauscan
Source File: DragDropTaskList.cs
private void ListDragSource_QueryContinueDrag(object sender, System.Windows.Forms.QueryContinueDragEventArgs e)
		{
			// Cancel the drag if the mouse moves off the form.
			ListBox lb = sender as ListBox;

			if (lb != null)
			{

				Form f = lb.FindForm();

				// Cancel the drag if the mouse moves off the form. The screenOffset 
				// takes into account any desktop bands that may be at the top or left 
				// side of the screen. 
				if (((Control.MousePosition.X - screenOffset.X) < f.DesktopBounds.Left) ||
						((Control.MousePosition.X - screenOffset.X) > f.DesktopBounds.Right) ||
						((Control.MousePosition.Y - screenOffset.Y) < f.DesktopBounds.Top) ||
						((Control.MousePosition.Y - screenOffset.Y) > f.DesktopBounds.Bottom))
				{

					e.Action = DragAction.Cancel;
				}
			}
		}

138. Example

Project: TaoShang
Source File: OrderRecordListControl.cs
void Reload(object sender, EventArgs e)
        {
            var parent = FindForm() as ViewOptMain;
            if (parent != null)
            {
                int? shopId = null;
                int? orderStateId = null;

                var shop = scbShop.SelectedItem as Shop;
                if (shop != null && shop.Id != -1)
                {
                    shopId = shop.Id;
                }

                var orderState = scbOrderState.SelectedItem as OrderState;
                if (orderState != null && orderState.Id != -1)
                {
                    orderStateId = orderState.Id;
                }

                parent.LoadOrderRecordPageList(
                    PaginationOrderRecordList.PageIndex,
                    PaginationOrderRecordList.PageSize,
                    shopId, orderStateId);
            }
        }

139. Example

Project: ynoteclassic
Source File: TextBoxWrapper.cs
public virtual Form FindForm()
        {
            return target.FindForm();
        }

140. Example

Project: FieldLog
Source File: USizeGrip.cs
private Form FindFormEx()
		{
			Form form = FindForm();
			if (form.MdiParent != null && form.WindowState == FormWindowState.Maximized)
			{
				form = form.MdiParent;
			}
			return form;
		}

141. Example

Project: open3mod
Source File: HierarchyInspectionView.cs
private void SetMeshDetailDialogInfo(Mesh mesh, string text)
        {
            if (_meshDiag == null)
            {
                _meshDiag = new MeshDetailsDialog(FindForm() as MainWindow, _scene);
                _meshDiag.FormClosed += (o, args) =>
                                        {
                                            _meshDiag = null;
                                        };
                _meshDiag.Show();
            }
            else
            {
                _meshDiag.BringToFront();
            }

            _meshDiag.SetMesh(mesh, text);
        }

142. Example

Project: open3mod
Source File: HierarchyInspectionView.cs
private void SetNodeDetailDialogInfo(Node node)
        {
            if (_nodeDiag == null)
            {
                _nodeDiag = new NodeItemsDialog();
                _nodeDiag.FormClosed += (o, args) =>
                                        {
                                            _nodeDiag = null;
                                        };
                _nodeDiag.Show();
            }
            else
            {
                _nodeDiag.BringToFront();
            }

            _nodeDiag.SetNode(FindForm() as MainWindow, _scene, node);
        }

143. Example

Project: AutoTest.Net
Source File: ResultTabs.cs
private void textOutputMenuItem_Click(object sender, System.EventArgs e)
		{
			SimpleSettingsDialog.Display( this.FindForm(), new TextOutputSettingsPage("Text Output") );
		}

144. Example

Project: AutoTest.Net
Source File: TipWindow.cs
private void InitControl( Control control )
		{
			this.control = control;
			this.Owner = control.FindForm();
			this.itemBounds = control.ClientRectangle;

			this.ControlBox = false;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.BackColor = Color.LightYellow;
			this.FormBorderStyle = FormBorderStyle.None;
			this.StartPosition = FormStartPosition.Manual; 			

			this.Font = control.Font;
		}

145. Example

Project: AutoTest.Net
Source File: ResultTabs.cs
private void textOutputMenuItem_Click(object sender, System.EventArgs e)
		{
			SimpleSettingsDialog.Display( this.FindForm(), new TextOutputSettingsPage("Text Output") );
		}

146. Example

Project: AutoTest.Net
Source File: TipWindow.cs
private void InitControl( Control control )
		{
			this.control = control;
			this.Owner = control.FindForm();
			this.itemBounds = control.ClientRectangle;

			this.ControlBox = false;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.BackColor = Color.LightYellow;
			this.FormBorderStyle = FormBorderStyle.None;
			this.StartPosition = FormStartPosition.Manual; 			

			this.Font = control.Font;
		}

147. Example

Project: AutoTest.Net
Source File: ResultTabs.cs
private void textOutputMenuItem_Click(object sender, System.EventArgs e)
		{
			SimpleSettingsDialog.Display( this.FindForm(), new TextOutputSettingsPage("Text Output") );
		}

148. Example

Project: AutoTest.Net
Source File: TipWindow.cs
private void InitControl( Control control )
		{
			this.control = control;
			this.Owner = control.FindForm();
			this.itemBounds = control.ClientRectangle;

			this.ControlBox = false;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.BackColor = Color.LightYellow;
			this.FormBorderStyle = FormBorderStyle.None;
			this.StartPosition = FormStartPosition.Manual; 			

			this.Font = control.Font;
		}

149. Example

Project: Krypton
Source File: KryptonDockingControl.cs
private void OnControlSizeChanged(object sender, EventArgs e)
        {
            if (!Control.Size.IsEmpty)
            {
                Form ownerForm = Control.FindForm();

                // When the control is inside a minimized form we do not enforce the minimum
                if ((ownerForm != null) && (ownerForm.WindowState != FormWindowState.Minimized))
                    EnforceInnerMinimum();
            }
        }

150. Example

Project: Krypton
Source File: ModalWaitDialog.cs
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
        public bool PreFilterMessage(ref Message m)
        {
            // Prevent mouse messages from activating any application windows
            if (((m.Msg >= 0x0200) && (m.Msg <= 0x0209)) || 
                ((m.Msg >= 0x00A0) && (m.Msg <= 0x00A9)))  
            {
                // Discover target control for message
                if (Control.FromHandle(m.HWnd) != null)
                {
                    // Find the form that the control is inside
                    Form f = Control.FromHandle(m.HWnd).FindForm();

                    // If the message is for this dialog then let it be dispatched
                    if ((f != null) && (f == this))
                        return false;
                }

                // Eat message to prevent dispatch
                return true;
            }
            else
                return false;
        }