Initial Commit of the PDM project (ready for DWS migration)
This commit is contained in:
284
documentation/api_extracted/Execute_Template_2_Example_VBNET.htm
Normal file
284
documentation/api_extracted/Execute_Template_2_Example_VBNET.htm
Normal file
@@ -0,0 +1,284 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Execute Template and Return Data Example (VB.NET)</title>
|
||||
<meta http-equiv="Content-Language" content="en-us">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
||||
<link rel="stylesheet" type="text/css" href="ApiHelp.css">
|
||||
</head>
|
||||
<meta name=MS-HKWD content="VB.NET examples,templates">
|
||||
<meta name=MS-HKWD content="VB.NET examples,folders">
|
||||
|
||||
<body>
|
||||
<h1><font size="1"><span style="font-weight: 400">SOLIDWORKS PDM Professional API Help</span></h1>
|
||||
<h1>Execute Template and Return Data Example (VB.NET)</h1>
|
||||
<p><a name="Top"></a>This example shows how to execute a template to create a
|
||||
folder structure in a vault and return information.</p>
|
||||
<p><b>NOTE</b>: If using the primary interop assembly
|
||||
provided with SOLIDWORKS PDM Professional, see
|
||||
<a href="Using_NET_Framework_in_Applications.htm">Using .NET Framework 4.0 in
|
||||
Stand-alone Applications</a>.</p>
|
||||
<p><img border="0" src="ExecuteTemplate.gif" width="262" height="161"></p>
|
||||
|
||||
<pre style="font-family: Courier New; font-size: 13; color: black; background: white"><span style="color: green">'----------------------------------------------------------------------------</span>
|
||||
<span style="color: green">' Preconditions:</span>
|
||||
<span style="color: green">' 1. Start Microsoft Visual Studio.</span>
|
||||
<span style="color: green">' a. Click <b>File > New > Project > Visual Basic > Windows Forms Application</b>.</span>
|
||||
<span style="color: green">' b. Type <b>TemplateVBNET</b> in <b>Name</b>.</span>
|
||||
<span style="color: green">' c. Click <b>Browse</b> and navigate to the folder where to create the project.</span>
|
||||
<span style="color: green">' d. Click <b>OK</b>. </span>
|
||||
<span style="color: green">' e. Click <b>Show All Files</b> in the Solution Explorer toolbar and expand </span>
|
||||
<span style="color: green">' <b>Form1.vb </b>in the Solution Explorer.</span>
|
||||
<span style="color: green">' f. Replace the code in <b>Form1.vb</b> with <a href="#Form1">this code</a>.</span>
|
||||
<span style="color: green">' g. To create the form, replace the code in <b>Form1.Designer.vb</b> with </span>
|
||||
<span style="color: green">' <a href="#Designer">this code</a>.</span>
|
||||
<span style="color: green">' 2. Add <b>EPDM.Interop.epdm.dll</b> as a reference (right-click the project</span>
|
||||
<span style="color: green">' name in the Solution Explorer, click <b>Add Reference</b>, click </span>
|
||||
<span style="color: green">' <b>Assemblies > Framework</b> in the left-side panel, browse to the top folder of </span>
|
||||
<span style="color: green">' your SOLIDWORKS PDM Professional installation, locate and click </span>
|
||||
<span style="color: green">' <b>EPDM.Interop.epdm.dll</b>, click <b>Open</b>, click <b>Add</b>, and click <b>Close</b>).</span>
|
||||
<span style="color: green">' 3. Right-click <b>EPDM.Interop.epdm</b> in References, click <b>Properties</b>, and set </span>
|
||||
<span style="color: green">' <b>Embed Interop Types</b> to <b>False</b> to handle methods that pass arrays of </span>
|
||||
<span style="color: green">' structures.</span>
|
||||
<span style="color: green">' 4. Ensure that a template exists in the vault that you plan to </span>
|
||||
<span style="color: green">' select and that a template card is assigned to that template.</span>
|
||||
<span style="color: green">' <b>NOTE</b>: This example assumes that the template in your selected vault</span>
|
||||
<span style="color: green">' creates a folder structure and that folder structure does not already
|
||||
' exist in the selected vault.</span>
|
||||
<span style="color: green">' 5. Click <b>Debug > Start Debugging</b> or press F5.</span>
|
||||
<span style="color: green">'</span>
|
||||
<span style="color: green">' Postconditions: </span>
|
||||
<span style="color: green">' 1. Displays the Execute Template dialog box.</span>
|
||||
<span style="color: green">' a. Select a vault view.</span>
|
||||
<span style="color: green">' b. Click <b>Execute Template</b>.</span>
|
||||
<span style="color: green">' c. Displays a message box showing the name of the template to execute.</span>
|
||||
<span style="color: green">' d. Click <b>OK</b> to close the message box.</span>
|
||||
<span style="color: green">' e. A template card dialog may appear to prompt for values.
|
||||
' 1. Type values.
|
||||
' 2. Click <b>OK</b>. </span><span style="color:green;">
|
||||
' 2. Displays a message box informing you that a new folder structure</span>
|
||||
<span style="color:green;">' is, or is not, created in the selected vault.</span><span style="color: green">
|
||||
' 3. Click <b>OK</b>.
|
||||
' 4. If a folder structure is created, displays a message box with
|
||||
' information about the folder structure.
|
||||
' 5. Click <b>OK</b>.</span>
|
||||
<span style="color: green">' 6. Close the Execute Template dialog box.</span>
|
||||
<span style="color: green">' 7. Examine the selected vault to verify that a new folder</span>
|
||||
<span style="color: green">' structure based on the template is, or is not, created.</span>
|
||||
<span style="color: green">'----------------------------------------------------------------------------</span>
|
||||
<span style="color: green"><a name="Form1"></a>'Form1.vb</span></pre>
|
||||
<p style="font-family: Courier New; font-size: 13; color: black; background: white" class="APICODE">
|
||||
<span style="color:blue;">Imports</span> System.IO<br>
|
||||
<span style="color:blue;">Imports</span> System.Xml.Serialization<br>
|
||||
<span style="color:blue;">Imports</span> System.Collections<br>
|
||||
<span style="color:blue;">Imports</span> System.Collections.Generic<br>
|
||||
<span style="color:blue;">Imports</span> System.Data<br>
|
||||
<span style="color:blue;">Imports</span> System.Diagnostics<br>
|
||||
<span style="color:blue;">Imports</span> System.Windows.Forms<br>
|
||||
<span style="color:blue;">Imports</span> System.ComponentModel<br>
|
||||
<span style="color:blue;">Imports</span> EPDM.Interop.epdm<br>
|
||||
<br>
|
||||
<span style="color:blue;">Public</span> <span style="color:blue;">Class</span> <span style="color:#2b91af;">Form1</span><br>
|
||||
<span style="color:blue;">Dim</span> vault1 <span style="color:blue;">As</span> <span style="color:#2b91af;">IEdmVault5</span> = <span style="color:blue;">New</span> <span style="color:#2b91af;">EdmVault5</span>()<br>
|
||||
<span style="color:blue;">Dim</span> vault <span style="color:blue;">As</span> <span style="color:#2b91af;">IEdmVault8</span> = <span style="color:blue;">DirectCast</span>(vault1, <span style="color:#2b91af;">IEdmVault8</span>)<br>
|
||||
<span style="color:blue;">Dim</span> Views <span style="color:blue;">As</span> <span style="color:#2b91af;">EdmViewInfo</span>() = <span style="color:blue;">Nothing</span><br>
|
||||
<span style="color:blue;">Public</span> <span style="color:blue;">Sub</span> Form1_Load(<span style="color:blue;">ByVal</span> sender <span style="color:blue;">As</span> System.<span style="color:#2b91af;">Object</span>, <span style="color:blue;">ByVal</span> e <span style="color:blue;">As</span> System.<span style="color:#2b91af;">EventArgs</span>) <span style="color:blue;">Handles</span> <span style="color:blue;">MyBase</span>.Load<br>
|
||||
<br>
|
||||
<span style="color:blue;">Try</span><br>
|
||||
vault.<b>GetVaultViews</b>(Views, <span style="color:blue;">False</span>)<br>
|
||||
VaultsComboBox.Items.Clear()<br>
|
||||
<span style="color:blue;">For</span> <span style="color:blue;">Each</span> View <span style="color:blue;">As</span> <span style="color:#2b91af;">EdmViewInfo</span> <span style="color:blue;">In</span> Views<br>
|
||||
VaultsComboBox.Items.Add(View.<b>mbsVaultName</b>)<br>
|
||||
<span style="color:blue;">Next</span><br>
|
||||
<span style="color:blue;">If</span> VaultsComboBox.Items.Count > 0 <span style="color:blue;">Then</span><br>
|
||||
VaultsComboBox.Text = <span style="color:blue;">DirectCast</span>(VaultsComboBox.Items(0), <span style="color:blue;">String</span>)<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">If</span><br>
|
||||
<span style="color:blue;">Catch</span> ex <span style="color:blue;">As</span> System.Runtime.InteropServices.<span style="color:#2b91af;">COMException</span><br>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(<span style="color:#a31515;">"HRESULT = 0x"</span> + ex.ErrorCode.ToString(<span style="color:#a31515;">"X"</span>) + <span style="color:#a31515;">" "</span> + ex.Message)<br>
|
||||
<span style="color:blue;">Catch</span> ex <span style="color:blue;">As</span> <span style="color:#2b91af;">Exception</span><br>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(ex.Message)<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Try</span><br>
|
||||
<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Sub</span><br>
|
||||
<br>
|
||||
<span style="color:blue;">Private</span> <span style="color:blue;">Sub</span> ExecuteTemplateButton_Click(<span style="color:blue;">ByVal</span> sender <span style="color:blue;">As</span> System.<span style="color:#2b91af;">Object</span>, <span style="color:blue;">ByVal</span> e <span style="color:blue;">As</span> System.<span style="color:#2b91af;">EventArgs</span>) <span style="color:blue;">Handles</span> ExecuteTemplateButton.Click<br>
|
||||
<br>
|
||||
<span style="color:blue;">Try</span><br>
|
||||
<span style="color:blue;">Dim</span> vault2 <span style="color:blue;">As</span> <span style="color:#2b91af;">IEdmVault7</span> = <span style="color:blue;">Nothing</span><br>
|
||||
<span style="color:blue;">If</span> vault1 <span style="color:blue;">Is</span> <span style="color:blue;">Nothing</span> <span style="color:blue;">Then</span><br>
|
||||
vault1 = <span style="color:blue;">New</span> <span style="color:#2b91af;">EdmVault5</span>()<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">If</span><br>
|
||||
vault2 = <span style="color:blue;">DirectCast</span>(vault1, <span style="color:#2b91af;">IEdmVault7</span>)<br>
|
||||
<br>
|
||||
<span style="color:blue;">If</span> <span style="color:blue;">Not</span> vault1.<b>IsLoggedIn</b> <span style="color:blue;">Then</span><br>
|
||||
vault1.<b>LoginAuto</b>(VaultsComboBox.Text, <span style="color:blue;">Me</span>.Handle.ToInt32())<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">If</span><br>
|
||||
<br>
|
||||
<span style="color:green;">'Access template in the selected vault</span><br>
|
||||
<span style="color:blue;">Dim</span> templateMgr <span style="color:blue;">As</span> <span style="color:#2b91af;">IEdmTemplateMgr5</span><br>
|
||||
templateMgr = vault1.<b>CreateUtility</b>(<span style="color:#2b91af;">EdmUtility</span>.EdmUtil_TemplateMgr)<br>
|
||||
<span style="color:blue;">Dim</span> pos <span style="color:blue;">As</span> <span style="color:#2b91af;">IEdmPos5</span><br>
|
||||
pos = templateMgr.<b>GetFirstTemplatePosition</b><br>
|
||||
<span style="color:blue;">Dim</span> template <span style="color:blue;">As</span> <span style="color:#2b91af;">IEdmTemplate53</span> = <span style="color:blue;">Nothing</span><br>
|
||||
<br>
|
||||
<span style="color:blue;">Dim</span> message <span style="color:blue;">As</span> <span style="color:blue;">String</span> = <span style="color:#a31515;">""</span><br>
|
||||
message = <span style="color:#a31515;">"Installed template in vault, "</span> + vault.<b>Name</b> + <span style="color:#a31515;">", to use:"</span> + vbLf + vbLf<br>
|
||||
<br>
|
||||
<span style="color:blue;">While</span> <span style="color:blue;">Not</span> pos.<b>IsNull</b><br>
|
||||
<br>
|
||||
template = templateMgr.<b>GetNextTemplate</b>(pos)<br>
|
||||
<br>
|
||||
message = message + template.<b>GetMenuString</b> + vbLf<br>
|
||||
<span style="color:green;">'Display message box with name of template
|
||||
to execute</span><br>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(message)<br>
|
||||
<br>
|
||||
<span style="color:green;">'Create template folders in the selected vault </span><br>
|
||||
<span style="color:green;">'using this template</span><br>
|
||||
<span style="color:blue;">Dim</span> refreshFlag <span style="color:blue;">As</span> <span style="color:#2b91af;">EdmRefreshFlag</span><br>
|
||||
<span style="color:blue;">Dim</span> retData() <span style="color:blue;">As</span> <span style="color:blue;">Object</span><br>
|
||||
refreshFlag = template.<b>RunEx</b>(<span style="color:blue;">Me</span>.Handle.ToInt32(), vault1.<b>RootFolderID</b>, retData)<br>
|
||||
<br>
|
||||
<span style="color:blue;">If</span> retData.Length <= 0 <span style="color:blue;">Then</span><br>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(<span style="color:#a31515;">"No folder structure created."</span>)<br>
|
||||
<span style="color:blue;">Else</span><br>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(<span style="color:#a31515;">"The new folder structure based on the template is created in the selected vault."</span>)<br>
|
||||
<span style="color:blue;">If</span> refreshFlag = <span style="color:#2b91af;">EdmRefreshFlag</span>.EdmRefresh_FileList <span style="color:blue;">Then</span><br>
|
||||
vault1.<b>RefreshFolder</b>(vault1.<b>RootFolderPath</b>)<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">If</span><br>
|
||||
<br>
|
||||
<span style="color:green;">'Show a message box with information about the folder structure created by the template</span><br>
|
||||
<span style="color:blue;">Dim</span> idx <span style="color:blue;">As</span> <span style="color:blue;">Long</span><br>
|
||||
idx = LBound(retData)<br>
|
||||
<span style="color:blue;">Dim</span> upper <span style="color:blue;">As</span> <span style="color:blue;">Long</span><br>
|
||||
upper = UBound(retData)<br>
|
||||
<br>
|
||||
<span style="color:blue;">Dim</span> data <span style="color:blue;">As</span> <span style="color:#2b91af;">EdmData</span><br>
|
||||
message = <span style="color:#a31515;">"Template generated:"</span> + vbLf<br>
|
||||
<span style="color:blue;">Dim</span> row <span style="color:blue;">As</span> <span style="color:blue;">String</span><br>
|
||||
<br>
|
||||
<span style="color:blue;">While</span> idx <= upper<br>
|
||||
data = retData(idx)<br>
|
||||
<span style="color:blue;">Select</span> <span style="color:blue;">Case</span> data.<b>Type</b><br>
|
||||
<span style="color:blue;">Case</span> <span style="color:#2b91af;">EdmDataType</span>.EdmData_File<br>
|
||||
row = <span style="color:#a31515;">"Type=File, Path="</span> + data.<b>Get</b>(<span style="color:#2b91af;">EdmDataPropertyType</span>.EdmProp_Path)<br>
|
||||
<span style="color:blue;">Case</span> <span style="color:#2b91af;">EdmDataType</span>.EdmData_Folder<br>
|
||||
row = <span style="color:#a31515;">"Type=Folder, path="</span> + data.<b>Get</b>(<span style="color:#2b91af;">EdmDataPropertyType</span>.EdmProp_Path)<br>
|
||||
<span style="color:blue;">Case</span> <span style="color:#2b91af;">EdmDataType</span>.EdmData_Variable<br>
|
||||
row = <span style="color:#a31515;">"Type=Variable, Name="</span> + data.<b>Get</b>(<span style="color:#2b91af;">EdmDataPropertyType</span>.EdmProp_Name) + <span style="color:#a31515;">", Value="</span> + data.<b>Get</b>(<span style="color:#2b91af;">EdmDataPropertyType</span>.EdmProp_Value)<br>
|
||||
<span style="color:blue;">Case</span> <span style="color:#2b91af;">EdmDataType</span>.EdmData_Link<br>
|
||||
row = <span style="color:#a31515;">"Type=Link, Name="</span> + data.<b>Get</b>(<span style="color:#2b91af;">EdmDataPropertyType</span>.EdmProp_LinkPath)<br>
|
||||
<span style="color:blue;">Case Else</span><br>
|
||||
row = <span style="color:#a31515;">"No data"</span><br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Select</span><br>
|
||||
<br>
|
||||
idx = idx + 1<br>
|
||||
message = message + row + vbLf<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">While</span><br>
|
||||
<br>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(message)<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">If</span><br>
|
||||
<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">While</span><br>
|
||||
<br>
|
||||
<span style="color:blue;">Catch</span> ex <span style="color:blue;">As</span> System.Runtime.InteropServices.<span style="color:#2b91af;">COMException</span><br>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(<span style="color:#a31515;">"HRESULT = 0x"</span> + ex.ErrorCode.ToString(<span style="color:#a31515;">"X"</span>) + <span style="color:#a31515;">" "</span> + ex.Message)<br>
|
||||
<span style="color:blue;">Catch</span> ex <span style="color:blue;">As</span> <span style="color:#2b91af;">Exception</span><br>
|
||||
<span style="color:#2b91af;">MessageBox</span>.Show(ex.Message)<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Try</span><br>
|
||||
<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Sub</span><br>
|
||||
<br>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Class</span></p>
|
||||
<div align="center">
|
||||
<pre style="font-family: Courier New; font-size: 13; color: black; background: white"><font face="Calibri"><a href="#Top">Back to top</a></font></pre>
|
||||
</div>
|
||||
<div align="left">
|
||||
<pre style="font-family: Courier New; font-size: 13; color: #008000; background-image: none; background-repeat: repeat; background-attachment: scroll"><a name="Designer"></a>'Form1.Designer.vb</pre>
|
||||
</div>
|
||||
<div align="left">
|
||||
<pre style="font-family: Courier New; font-size: 13; color: black; background: white"><<span style="color:blue;">Global</span>.Microsoft.VisualBasic.CompilerServices.<span style="color:#2b91af;">DesignerGenerated</span>()> _
|
||||
<span style="color:blue;">Partial</span> <span style="color:blue;">Class</span> <span style="color:#2b91af;">Form1</span>
|
||||
<span style="color:blue;">Inherits</span> System.Windows.Forms.<span style="color:#2b91af;">Form</span>
|
||||
|
||||
<span style="color:green;">'Form overrides dispose to clean up the component list.</span>
|
||||
<System.Diagnostics.<span style="color:#2b91af;">DebuggerNonUserCode</span>()> _
|
||||
<span style="color:blue;">Protected</span> <span style="color:blue;">Overrides</span> <span style="color:blue;">Sub</span> Dispose(<span style="color:blue;">ByVal</span> disposing <span style="color:blue;">As</span> <span style="color:blue;">Boolean</span>)
|
||||
<span style="color:blue;">Try</span>
|
||||
<span style="color:blue;">If</span> disposing <span style="color:blue;">AndAlso</span> components <span style="color:blue;">IsNot</span> <span style="color:blue;">Nothing</span> <span style="color:blue;">Then</span>
|
||||
components.Dispose()
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">If</span>
|
||||
<span style="color:blue;">Finally</span>
|
||||
<span style="color:blue;">MyBase</span>.Dispose(disposing)
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Try</span>
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Sub</span>
|
||||
|
||||
<span style="color:green;">'Required by the Windows Form Designer</span>
|
||||
<span style="color:blue;">Private</span> components <span style="color:blue;">As</span> System.ComponentModel.<span style="color:#2b91af;">IContainer</span>
|
||||
|
||||
<span style="color:green;">'NOTE: The following procedure is required by the Windows Form Designer</span>
|
||||
<span style="color:green;">'It can be modified using the Windows Form Designer. </span>
|
||||
<span style="color:green;">'Do not modify it using the code editor.</span>
|
||||
<System.Diagnostics.<span style="color:#2b91af;">DebuggerStepThrough</span>()> _
|
||||
<span style="color:blue;">Private</span> <span style="color:blue;">Sub</span> InitializeComponent()
|
||||
<span style="color:blue;">Me</span>.ExecuteTemplateButton = <span style="color:blue;">New</span> System.Windows.Forms.<span style="color:#2b91af;">Button</span>()
|
||||
<span style="color:blue;">Me</span>.VaultsComboBox = <span style="color:blue;">New</span> System.Windows.Forms.<span style="color:#2b91af;">ComboBox</span>()
|
||||
<span style="color:blue;">Me</span>.Label1 = <span style="color:blue;">New</span> System.Windows.Forms.<span style="color:#2b91af;">Label</span>()
|
||||
<span style="color:blue;">Me</span>.SuspendLayout()
|
||||
<span style="color:green;">'</span>
|
||||
<span style="color:green;">'ExecuteTemplateButton</span>
|
||||
<span style="color:green;">'</span>
|
||||
<span style="color:blue;">Me</span>.ExecuteTemplateButton.Location = <span style="color:blue;">New</span> System.Drawing.<span style="color:#2b91af;">Point</span>(30, 75)
|
||||
<span style="color:blue;">Me</span>.ExecuteTemplateButton.Name = <span style="color:#a31515;">"ExecuteTemplateButton"</span>
|
||||
<span style="color:blue;">Me</span>.ExecuteTemplateButton.Size = <span style="color:blue;">New</span> System.Drawing.<span style="color:#2b91af;">Size</span>(102, 23)
|
||||
<span style="color:blue;">Me</span>.ExecuteTemplateButton.TabIndex = 0
|
||||
<span style="color:blue;">Me</span>.ExecuteTemplateButton.Text = <span style="color:#a31515;">"Execute Template"</span>
|
||||
<span style="color:blue;">Me</span>.ExecuteTemplateButton.TextAlign = System.Drawing.<span style="color:#2b91af;">ContentAlignment</span>.MiddleLeft
|
||||
<span style="color:blue;">Me</span>.ExecuteTemplateButton.UseVisualStyleBackColor = <span style="color:blue;">True</span>
|
||||
<span style="color:green;">'</span>
|
||||
<span style="color:green;">'VaultsComboBox</span>
|
||||
<span style="color:green;">'</span>
|
||||
<span style="color:blue;">Me</span>.VaultsComboBox.FormattingEnabled = <span style="color:blue;">True</span>
|
||||
<span style="color:blue;">Me</span>.VaultsComboBox.Location = <span style="color:blue;">New</span> System.Drawing.<span style="color:#2b91af;">Point</span>(30, 39)
|
||||
<span style="color:blue;">Me</span>.VaultsComboBox.Name = <span style="color:#a31515;">"VaultsComboBox"</span>
|
||||
<span style="color:blue;">Me</span>.VaultsComboBox.Size = <span style="color:blue;">New</span> System.Drawing.<span style="color:#2b91af;">Size</span>(169, 21)
|
||||
<span style="color:blue;">Me</span>.VaultsComboBox.TabIndex = 1
|
||||
<span style="color:green;">'</span>
|
||||
<span style="color:green;">'Label1</span>
|
||||
<span style="color:green;">'</span>
|
||||
<span style="color:blue;">Me</span>.Label1.AutoSize = <span style="color:blue;">True</span>
|
||||
<span style="color:blue;">Me</span>.Label1.Location = <span style="color:blue;">New</span> System.Drawing.<span style="color:#2b91af;">Point</span>(27, 23)
|
||||
<span style="color:blue;">Me</span>.Label1.Name = <span style="color:#a31515;">"Label1"</span>
|
||||
<span style="color:blue;">Me</span>.Label1.Size = <span style="color:blue;">New</span> System.Drawing.<span style="color:#2b91af;">Size</span>(91, 13)
|
||||
<span style="color:blue;">Me</span>.Label1.TabIndex = 2
|
||||
<span style="color:blue;">Me</span>.Label1.Text = <span style="color:#a31515;">"Select vault view:"</span>
|
||||
<span style="color:green;">'</span>
|
||||
<span style="color:green;">'Form1</span>
|
||||
<span style="color:green;">'</span>
|
||||
<span style="color:blue;">Me</span>.AutoScaleDimensions = <span style="color:blue;">New</span> System.Drawing.<span style="color:#2b91af;">SizeF</span>(6.0!, 13.0!)
|
||||
<span style="color:blue;">Me</span>.AutoScaleMode = System.Windows.Forms.<span style="color:#2b91af;">AutoScaleMode</span>.Font
|
||||
<span style="color:blue;">Me</span>.ClientSize = <span style="color:blue;">New</span> System.Drawing.<span style="color:#2b91af;">Size</span>(246, 123)
|
||||
<span style="color:blue;">Me</span>.Controls.Add(<span style="color:blue;">Me</span>.Label1)
|
||||
<span style="color:blue;">Me</span>.Controls.Add(<span style="color:blue;">Me</span>.VaultsComboBox)
|
||||
<span style="color:blue;">Me</span>.Controls.Add(<span style="color:blue;">Me</span>.ExecuteTemplateButton)
|
||||
<span style="color:blue;">Me</span>.Name = <span style="color:#a31515;">"Form1"</span>
|
||||
<span style="color:blue;">Me</span>.Text = <span style="color:#a31515;">"Execute Template"</span>
|
||||
<span style="color:blue;">Me</span>.ResumeLayout(<span style="color:blue;">False</span>)
|
||||
<span style="color:blue;">Me</span>.PerformLayout()
|
||||
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Sub</span>
|
||||
<span style="color:blue;">Friend</span> <span style="color:blue;">WithEvents</span> ExecuteTemplateButton <span style="color:blue;">As</span> System.Windows.Forms.<span style="color:#2b91af;">Button</span>
|
||||
<span style="color:blue;">Friend</span> <span style="color:blue;">WithEvents</span> VaultsComboBox <span style="color:blue;">As</span> System.Windows.Forms.<span style="color:#2b91af;">ComboBox</span>
|
||||
<span style="color:blue;">Friend</span> <span style="color:blue;">WithEvents</span> Label1 <span style="color:blue;">As</span> System.Windows.Forms.<span style="color:#2b91af;">Label</span>
|
||||
|
||||
<span style="color:blue;">End</span> <span style="color:blue;">Class</span></pre>
|
||||
</div>
|
||||
<div align="center">
|
||||
<pre style="font-family: Courier New; font-size: 13; color: #008000; background-image: none; background-repeat: repeat; background-attachment: scroll"><font face="Calibri"><a href="#Top">Back to top</a></font></pre>
|
||||
</div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user