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
0
101. Example
Project: ContinuousTests
Source File: ResultTabs.cs
Source File: ResultTabs.cs
private void textOutputMenuItem_Click(object sender, System.EventArgs e) { SimpleSettingsDialog.Display( this.FindForm(), new TextOutputSettingsPage("Text Output") ); }
0
102. Example
Project: ContinuousTests
Source File: TipWindow.cs
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; }
0
103. Example
Project: ContinuousTests
Source File: ResultTabs.cs
Source File: ResultTabs.cs
private void textOutputMenuItem_Click(object sender, System.EventArgs e) { SimpleSettingsDialog.Display( this.FindForm(), new TextOutputSettingsPage("Text Output") ); }
0
104. Example
Project: ContinuousTests
Source File: TipWindow.cs
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; }
0
105. Example
Project: JiraSVN
Source File: ImmediateUpdateForm.cs
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; } } }
0
106. Example
Project: VisualPlus
Source File: VisualControlBox.cs
Source File: VisualControlBox.cs
protected virtual void OnMaximizeClick(ControlBoxEventArgs e) { Parent.FindForm().WindowState = FormWindowState.Maximized; MaximizeClick?.Invoke(e); }
0
107. Example
Project: VisualPlus
Source File: VisualControlBox.cs
Source File: VisualControlBox.cs
protected virtual void OnMinimizeClick(ControlBoxEventArgs e) { Parent.FindForm().WindowState = FormWindowState.Minimized; MinimizeClick?.Invoke(e); }
0
108. Example
Project: VisualPlus
Source File: VisualControlBox.cs
Source File: VisualControlBox.cs
protected virtual void OnRestoredFormWindow(ControlBoxEventArgs e) { Parent.FindForm().WindowState = FormWindowState.Normal; RestoredFormWindow?.Invoke(e); }
0
109. Example
Project: EDDiscovery
Source File: ActionPackEditCondition.cs
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; } }
0
110. Example
Project: FAtiMA-Toolkit
Source File: TypedFieldBox.cs
Source File: TypedFieldBox.cs
private void OnKeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char) Keys.Return) this.FindForm().ActiveControl=null; }
0
111. Example
Project: PKHeX
Source File: SlotChangeManager.cs
Source File: SlotChangeManager.cs
public void SetCursor(Cursor z, object sender) { if (SE != null) DragInfo.Cursor = (sender as Control).FindForm().Cursor = z; }
0
112. Example
Project: MultiversePlatform
Source File: Win32InputReader.cs
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."); } }
0
113. Example
Project: MultiversePlatform
Source File: Win32InputReader.cs
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."); //} }
0
114. Example
Project: MultiversePlatform
Source File: Win32InputReader.cs
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 }
0
115. Example
Project: MultiversePlatform
Source File: Win32InputReader.cs
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."); //} }
0
116. Example
Project: nunit-gui
Source File: TipWindow.cs
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; }
0
117. Example
Project: OpenLiveWriter
Source File: MinMaxClose.cs
Source File: MinMaxClose.cs
private void btnMinimize_Click(object sender, System.EventArgs e) { FindForm().WindowState = FormWindowState.Minimized; }
0
118. Example
Project: OpenLiveWriter
Source File: GlossaryManagementControl.cs
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); } }
0
119. Example
Project: OpenLiveWriter
Source File: HtmlSourceEditorControl.cs
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; } }
0
120. Example
Project: OpenLiveWriter
Source File: MshtmlEditor.cs
Source File: MshtmlEditor.cs
private void DocumentEvents_GotFocus(object sender, EventArgs e) { Form form = FindForm(); if (form != null) form.ActiveControl = this; }
0
121. Example
Project: OpenLiveWriter
Source File: WeblogAccountManagementControl.cs
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); } }
0
122. Example
Project: OpenLiveWriter
Source File: WeblogAccountManagementControl.cs
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); } }
0
123. Example
Project: OpenLiveWriter
Source File: BlogPostListBox.cs
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[] { }; } }
0
124. Example
Project: OpenLiveWriter
Source File: PostPropertiesBandControl.cs
Source File: PostPropertiesBandControl.cs
private void PostProperties_Execute(object sender, EventArgs e) { if (!Visible) return; if (postPropertiesForm.Visible) postPropertiesForm.Hide(); else postPropertiesForm.Show(FindForm()); }
0
125. Example
Project: OpenLiveWriter
Source File: PostPropertiesBandControl.cs
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(); } }
0
126. Example
Project: OpenLiveWriter
Source File: ColumnWidthControl.cs
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; } }
0
127. Example
Project: OpenLiveWriter
Source File: PostEditorMainControl.cs
Source File: PostEditorMainControl.cs
private void commandShowDisplayMessageTestForm_Execute(object sender, EventArgs e) { using (DisplayMessageTestForm form = new DisplayMessageTestForm()) { form.ShowDialog(FindForm()); } }
0
128. Example
Project: OpenLiveWriter
Source File: PostEditorMainControl.cs
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; }
0
129. Example
Project: IronAHK
Source File: Gui.cs
Source File: Gui.cs
static GuiInfo GuiAssociatedInfo(Control control) { return control.FindForm().Tag as GuiInfo; }
0
130. Example
Project: superputty
Source File: ctlApplicationPanel.cs
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; } }
0
131. Example
Project: poderosa
Source File: PaneDivision.cs
Source File: PaneDivision.cs
private Form FindForm() { return _rootList.HostingControl.FindForm(); }
0
132. Example
Project: poderosa
Source File: DisplayOptionPanel.cs
Source File: DisplayOptionPanel.cs
private void OnSelectBackgroundImage(object sender, EventArgs args) { string t = EditRenderProfile.SelectPictureFileByDialog(FindForm()); if (t != null) { _backgroundImageBox.Text = t; } }
0
133. Example
Project: comparator
Source File: GridResult.cs
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; }
0
134. Example
Project: comparator
Source File: GridResult.cs
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); }
0
135. Example
Project: comparator
Source File: GridResult.cs
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); }
0
136. Example
Project: comparator
Source File: SourcePanel.cs
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; }
0
137. Example
Project: Sardauscan
Source File: DragDropTaskList.cs
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; } } }
0
138. Example
Project: TaoShang
Source File: OrderRecordListControl.cs
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); } }
0
139. Example
Project: ynoteclassic
Source File: TextBoxWrapper.cs
Source File: TextBoxWrapper.cs
public virtual Form FindForm() { return target.FindForm(); }
0
140. Example
Project: FieldLog
Source File: USizeGrip.cs
Source File: USizeGrip.cs
private Form FindFormEx() { Form form = FindForm(); if (form.MdiParent != null && form.WindowState == FormWindowState.Maximized) { form = form.MdiParent; } return form; }
0
141. Example
Project: open3mod
Source File: HierarchyInspectionView.cs
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); }
0
142. Example
Project: open3mod
Source File: HierarchyInspectionView.cs
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); }
0
143. Example
Project: AutoTest.Net
Source File: ResultTabs.cs
Source File: ResultTabs.cs
private void textOutputMenuItem_Click(object sender, System.EventArgs e) { SimpleSettingsDialog.Display( this.FindForm(), new TextOutputSettingsPage("Text Output") ); }
0
144. Example
Project: AutoTest.Net
Source File: TipWindow.cs
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; }
0
145. Example
Project: AutoTest.Net
Source File: ResultTabs.cs
Source File: ResultTabs.cs
private void textOutputMenuItem_Click(object sender, System.EventArgs e) { SimpleSettingsDialog.Display( this.FindForm(), new TextOutputSettingsPage("Text Output") ); }
0
146. Example
Project: AutoTest.Net
Source File: TipWindow.cs
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; }
0
147. Example
Project: AutoTest.Net
Source File: ResultTabs.cs
Source File: ResultTabs.cs
private void textOutputMenuItem_Click(object sender, System.EventArgs e) { SimpleSettingsDialog.Display( this.FindForm(), new TextOutputSettingsPage("Text Output") ); }
0
148. Example
Project: AutoTest.Net
Source File: TipWindow.cs
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; }
0
149. Example
Project: Krypton
Source File: KryptonDockingControl.cs
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(); } }
0
150. Example
Project: Krypton
Source File: ModalWaitDialog.cs
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; }