You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ITSM/.svn/pristine/a1/a17d7e8ea3600b160d019ecb55b...

146 lines
6.7 KiB

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML xmlns:MSHelp="http://msdn.microsoft.com/mshelp" DIR="LTR"><HEAD>
<meta name="GENERATOR" content="VBdocman .NET - documentation generator; http://www.vbdocman.com">
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=UTF-8">
<TITLE>frmApplikationAbhaengigkeit.GetControl -Methode</TITLE>
<xml>
<MSHelp:TOCTitle Title="frmApplikationAbhaengigkeit.GetControl -Methode"/>
<MSHelp:RLTitle Title="frmApplikationAbhaengigkeit.GetControl -Methode"/>
<MSHelp:Keyword Index="A" Term="topic_0000000000001590"/>
<MSHelp:Keyword Index="K" Term="frmApplikationAbhaengigkeit.GetControl -Methode"/>
<MSHelp:Keyword Index="K" Term="Vertragsverwaltung.frmApplikationAbhaengigkeit.GetControl -Methode"/>
<MSHelp:Keyword Index="F" Term="Vertragsverwaltung.frmApplikationAbhaengigkeit.GetControl"/>
<MSHelp:Keyword Index="F" Term="frmApplikationAbhaengigkeit.GetControl"/>
<MSHelp:Keyword Index="F" Term="Vertragsverwaltung.frmApplikationAbhaengigkeit.frmApplikationAbhaengigkeit.GetControl"/>
<MSHelp:Attr Name="DevLang" Value="VB"/>
<MSHelp:Attr Name="DevLangVers" Value="kbLangVB"/>
<MSHelp:Attr Name="DocSet" Value="Visual Basic"/>
<MSHelp:Attr Name="DocSet" Value="Visual Studio"/>
<MSHelp:Attr Name="DocSet" Value="VSM"/>
<MSHelp:Attr Name="Product" Value="VB"/>
<MSHelp:Attr Name="ProductVers" Value="kbVBp700"/>
<MSHelp:Attr Name="Product" Value="VSA"/>
<MSHelp:Attr Name="ProductVers" Value="kbVSA"/>
<MSHelp:Attr Name="Technology" Value="ManagedCode"/>
<MSHelp:Attr Name="TechnologyVers" Value="kbManagedCode"/>
<MSHelp:Attr Name="TopicType" Value="kbSyntax"/>
<MSHelp:Attr Name="TargetOS" Value="Windows"/>
<MSHelp:Attr Name="Locale" Value="kbEnglish"/>
</xml>
<META name="rtfFileName" content="">
<META NAME="save" CONTENT="history">
<!--CSS_START-->
<SCRIPT SRC="MSHelp/scripts/dtuelink.js"></SCRIPT>
<!--CSS_END-->
<SCRIPT language="JavaScript">
function indent(level) {
for (i=1; i<=level; i++) {
document.write("&nbsp;&nbsp;&nbsp;");
}
}
</SCRIPT>
</HEAD>
<body topmargin=0 id="bodyID" class = "dtBODY"><!--NONSCROLLING BANNER START-->
<div id="nsbanner">
<div id="bannerrow1">
<TABLE CLASS="bannerparthead" CELLSPACING=0>
<TR ID="hdr">
<TD CLASS="runninghead" nowrap>Vertragsverwaltung-Klassenbibliothek</TD>
<TD CLASS="product" nowrap>&nbsp;</TD>
</TR>
</TABLE>
</div>
<div id="TitleRow">
<H1 class="dtH1"><A NAME="topic_0000000000001590"></A>frmApplikationAbhaengigkeit.GetControl -Methode</H1>
</div></div>
<!--NONSCROLLING BANNER END-->
<DIV id="nstext" valign="bottom"><!---->
<P>Sucht in den Base-Controls sämtliche Controls mit dem Namen in &quot;Key&quot; (Wildcards * möglich) und listet
die gefundnen Controls in der Liste L zur weiteren Bearbeitung</P>
<PRE class="syntax"><SPAN class="lang">[Visual&nbsp;Basic]
</SPAN><B>Private Function GetControl( _&nbsp;<br> ByVal <i>BaseControl</i> As <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemWindowsFormsControlClassTopic.htm">Control</a>, _&nbsp;<br> ByVal <i>Key</i> As <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">String</a>, _&nbsp;<br> ByRef <i>L</i> As <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsGenericListClassTopic.htm">List</a>(Of <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemWindowsFormsControlClassTopic.htm">Control</a>), _&nbsp;<br> Optional ByVal <i>ReturnAtFirstElement</i> As <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemBooleanClassTopic.htm">Boolean</a> = False _&nbsp;<br>) As <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemBooleanClassTopic.htm">Boolean</a></B></PRE>
<H4 class="dtH4">Parameter</H4>
<dl>
<dt><i>BaseControl</i></dt>
<dd>Base-Contrlo (z.B. aktuelles Formular</dd>
<dt><i>Key</i></dt>
<dd>Schlüssel welcher gesucht werden soll</dd>
<dt><i>L</i></dt>
<dd>Liste der gefundenen Objekte</dd>
<dt><i>ReturnAtFirstElement</i></dt>
<dd>Optional. Der Standardwert ist False.</dd>
</dl>
<H4 class="dtH4">Rückgabewert</H4>
<P>True wenn eines oder mehr Controls gefunden wurden, false wenn kein Control gefunden wurde.</P>
<H4 class="dtH4">Quellcode</H4>
<pre class="code"><SPAN class="lang">[Visual&nbsp;Basic]</SPAN>
Private Function GetControl(ByVal BaseControl As Control, ByVal Key As String, ByRef L As List(Of Control), Optional ByVal ReturnAtFirstElement As Boolean = False) As Boolean&nbsp;<br> If L Is Nothing Then L = New List(Of Control)&nbsp;<br> Dim Gut As Boolean&nbsp;<br> Dim ReturnFlag As Boolean = False&nbsp;<br> If Key IsNot Nothing Then Key = Key.ToLower&nbsp;<br>&nbsp;<br> If BaseControl.HasChildren = True Then&nbsp;<br> For Each ctl As Control In BaseControl.Controls&nbsp;<br> Gut = False&nbsp;<br> If Key Is Nothing Then&nbsp;<br> Gut = True&nbsp;<br> Else&nbsp;<br> If ctl.Name.Length &gt;= Key.Length Then&nbsp;<br> Key = Key.ToLower&nbsp;<br> If Key.StartsWith(&quot;*&quot;) Then&nbsp;<br> If Key.Substring(1) = ctl.Name.ToLower.Substring(ctl.Name.Length - (Key.Length - 1), Key.Length - 1) Then Gut = True&nbsp;<br> ElseIf Key.EndsWith(&quot;*&quot;) Then&nbsp;<br> If Key.Substring(0, Key.Length - 1) = ctl.Name.ToLower.Substring(0, Key.Length - 1) Then Gut = True&nbsp;<br> Else&nbsp;<br> If Key = ctl.Name.ToLower Then Gut = True&nbsp;<br> End If&nbsp;<br> End If&nbsp;<br> End If&nbsp;<br>&nbsp;<br> If Gut = True Then&nbsp;<br> L.Add(ctl)&nbsp;<br> If ReturnAtFirstElement = True Then ReturnFlag = True&nbsp;<br> End If&nbsp;<br> If ReturnFlag = False Then&nbsp;<br> Call GetControl(ctl, Key, L)&nbsp;<br> End If&nbsp;<br> Next&nbsp;<br> End If&nbsp;<br>&nbsp;<br> If L.Count - 1 &gt; -1 Then&nbsp;<br> Return True&nbsp;<br> Else&nbsp;<br> Return False&nbsp;<br> End If&nbsp;<br> End Function
</pre>
<H4 class="dtH4">Forderungen</H4>
<P><b class="le">Plattformen:&nbsp;</b>Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition</P>
<H4 class="dtH4">Siehe auch</H4>
<p>
<a href="topic_000000000000132F.html">frmApplikationAbhaengigkeit</a>
</p>
<DIV CLASS="footer">
<HR>
Generated by VBdocman .NET
<p>
</div></div>
</BODY>
</HTML>