home *** CD-ROM | disk | FTP | other *** search
/ ftp.tcs3.com / ftp.tcs3.com.tar / ftp.tcs3.com / DRIVERS / Audio / Office2010 / InfoPath.en-us / InfLR.cab / FL_DeterminetheActiveMDIChild_snippet_142701_ENU____.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Extensible Markup Language  |  2008-09-17  |  2KB  |  53 lines

  1. <?xml version="1.0"?>
  2. <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  3.   <CodeSnippet Format="1.0.0">
  4.     <Header>
  5.       <Title>Determine the Active MDI Child and Control</Title>
  6.       <Author>Microsoft Corporation</Author>
  7.       <Description>Retrieves the active MDI child form and the active control on the child form.</Description>
  8.       <Shortcut>mdiActive</Shortcut>
  9.     </Header>
  10.     <Snippet>
  11.       <References>
  12.         <Reference>
  13.           <Assembly>System.Drawing.dll</Assembly>
  14.         </Reference>
  15.         <Reference>
  16.           <Assembly>System.Windows.Forms.dll</Assembly>
  17.         </Reference>
  18.         <Reference>
  19.           <Assembly>System.dll</Assembly>
  20.         </Reference>
  21.       </References>
  22.       <Imports>
  23.         <Import>
  24.           <Namespace>Microsoft.VisualBasic</Namespace>
  25.         </Import>
  26.         <Import>
  27.           <Namespace>System.Drawing</Namespace>
  28.         </Import>
  29.         <Import>
  30.           <Namespace>System.Windows.Forms</Namespace>
  31.         </Import>
  32.         <Import>
  33.           <Namespace>System</Namespace>
  34.         </Import>
  35.       </Imports>
  36.       <Declarations>
  37.         <Object>
  38.           <ID>formName</ID>
  39.           <Type>Form</Type>
  40.           <ToolTip>Replace with a reference to the MDI parent form.</ToolTip>
  41.           <Default>Me</Default>
  42.         </Object>
  43.       </Declarations>
  44.       <Code Language="VB" Kind="method body"><![CDATA[Dim activeChild As Form = $formName$.ActiveMdiChild
  45.  
  46. Dim activeControl As Control = Nothing
  47. If Not activeChild IsNot Nothing Then
  48.     activeControl = activeChild.ActiveControl
  49. End If
  50. ]]></Code>
  51.     </Snippet>
  52.   </CodeSnippet>
  53. </CodeSnippets>