Display: Cloud | List
Most Popular Tags
Results (8 total) All > parent (x)
CenterParent with dialog (Form.StartPosition Property (System.Windows.Forms))
This code can be added to a dialog form to center it over its parent form (set Owner to the calling form or use the version of ShowDialog() that specifies the owning window). Using StartPosition = FormStartPosition.CenterParent fails for several reasons, as documented in the comments. This is a workaround. /// <summary>/// Center the form over its parent (owner) window./// </summary>/
Last modified by -- on 3/11/2011 7:47:47 PM
VB.NET example of using this API to get parent process ID (NtQueryInformationProcess function (Windows))
Public Const PROCESSBASICINFORMATION As UInteger = 0 <System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Pack:=1)> _ Public Structure Process_Basic_Information Public ExitStatus As IntPtr Public PepBaseAddress As IntPtr Public AffinityMask As IntPtr Public BasePriority As IntPtr Public UniqueProc
Last modified by Chris128 on 2/6/2010 3:15:12 AM
Tags:  get  id  parent  process  vb.net
Doesn't work... (How to: Retrieve Information from the Parent Form of a Dialog Box)
This method always yields NULL in .NET 4 Beta 2.The only solution I got working was to use the version of ShowDialog with parameters, set the argument to this/Me and use the Owner property in the Dialog then: private void MyForm_Load(object sender, EventArgs e){ new MyDialog().ShowDialog(this); // Must be this overload! If using ShowDialog(), the Dialog's Owner property will be NULL !!!} .
Last modified by BetterToday on 11/26/2009 10:35:19 PM
How to figure out which component called a context menu item (ContextMenu Component Overview (Windows Forms))
Context menus advertise as one of their advantages that they can be hooked into multiple components on a form, but then how do you know which component called the menu item on the context menu? I had a great deal of difficulty tracking down the solution to this one, so I thought I'd submit it here to save others the trouble I had.Imagine a form with three toolstrips on it, and each of them has a c
Last modified by Contessa Mary on 7/6/2009 11:08:54 PM
Tags:  2008  contextmenu  parent  vb
For a full explanation of how the recursive part work with examples see my blog: http://sqlblogcasts.com/blogs/tonyrogerson/archive/2008/05/11/common-table-expressions-cte-s-how-it-works-how-recursion-works-using-with-adjacency-list.aspx----create table adjacency_list ( parent_extractedword_id int not null, child_extractedword_id int not null, constraint pk_adjacency_list primary k
Last modified by Stanley Roark on 1/18/2009 7:15:44 PM
Color.Transparent Property Gets a system-defined color. Namespace: System.DrawingAssembly: System.Drawing (in system.drawing.dll)SyntaxVisual Basic (Declaration)Public Shared ReadOnly Property Transparent As ColorVisual Basic (Usage)Dim value As Color value = Color.Transparent C#public static Color Transparent { get; }C++public: static property Color Transparent { Color
Last modified by Microsoft on 1/15/2008 1:17:24 AM
Tags:  parent  transparent
Owner window or Parent Window (GetWindow function (Windows))
Beware, “Owner window” and “Parent window” are two different things, if you try to use GW_OWNER in order to retrieve the parent window, you’ll get NULL and you probably think your program has an error, but GetLastError() will return zero so that means you program is correct. In the “See also” section should be a reference to GetParent.
Last modified by george_5154 on 9/25/2008 10:49:52 PM
Tags:  owner  parent  window
Sample causes a NullReferenceException (TreeNode.Parent Property (System.Web.UI.WebControls))
The sample uses the following expression to determine a root node if (LinksTreeView.SelectedNode.Parent.Depth != -1) This line actually causes a NullReferenceException as a root node does not have a parent node. The expression should correctly be... if (LinksTreeView.SelectedNode.Parent != null)
Last modified by Michael Sivers on 10/5/2007 10:51:06 PM
Page view tracker