<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta name="generator" content="Adobe RoboHelp 2019" />
<title>Visual Basic .NET(.NET Framework)</title>
<link rel="StyleSheet" href="../../../../ms_help.css" type="text/css" />
<script type="text/javascript" language="JavaScript">
//<![CDATA[
function reDo() {
  if (innerWidth != origWidth || innerHeight != origHeight)
     location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
	origWidth = innerWidth;
	origHeight = innerHeight;
	onresize = reDo;
}
onerror = null; 
//]]>
</script>
<style type="text/css">
<!--
div.WebHelpPopupMenu { position:absolute;
left:0px;
top:0px;
z-index:4;
visibility:hidden; }
p.WebHelpNavBar { text-align:right; }
-->
</style>

<script type="text/javascript" src="../../../../template/scripts/rh.min.js"></script>
<script type="text/javascript" src="../../../../template/scripts/common.min.js"></script>
<script type="text/javascript" src="../../../../template/scripts/topic.min.js"></script>
<script type="text/javascript" src="../../../../template/scripts/constants.js"></script>
<script type="text/javascript" src="../../../../template/scripts/utils.js"></script>
<script type="text/javascript" src="../../../../template/scripts/mhutils.js"></script>
<script type="text/javascript" src="../../../../template/scripts/mhlang.js"></script>
<script type="text/javascript" src="../../../../template/scripts/mhver.js"></script>
<script type="text/javascript" src="../../../../template/scripts/settings.js"></script>
<script type="text/javascript" src="../../../../template/scripts/XmlJsReader.js"></script>
<script type="text/javascript" src="../../../../template/scripts/loadparentdata.js"></script>
<script type="text/javascript" src="../../../../template/scripts/loadscreen.js"></script>
<script type="text/javascript" src="../../../../template/scripts/loadprojdata.js"></script>
<script type="text/javascript" src="../../../../template/scripts/mhtopic.js"></script>
 <link rel="stylesheet" type="text/css" href="../../../../template/styles/widgets.min.css">
 <link rel="stylesheet" type="text/css" href="../../../../template/styles/topic.min.css">
<script type="text/javascript" >
gRootRelPath = "../../../..";
gCommonRootRelPath = "../../../..";
gTopicId = "5.2.1.1.0_2";
</script>
 <meta name="brsprev" value="sdk/component_object_model/tutorial/create/visual_basic_net8.htm">
 <meta name="brsnext" value="sdk/component_object_model/tutorial/create/visual_c_net8.htm">
 <meta name="topic-breadcrumbs" content="C-WaveformGenerator SDK > Componet Object Model > Tutorial > Create Project" />
</head>

<body>
<script type="text/javascript" src="../../../../ehlpdhtm.js"></script>

<!-- Google Tag Manager (noscript) -->
<noscript>
<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-P45RPFN" style="width: 0px; 
		 height: 0px; display: none; visibility: hidden;">
 <p>&#160;</p>
</iframe>
</noscript>
<!-- End Google Tag Manager (noscript) -->


<div><script type="text/javascript" language="javascript">//<![CDATA[
document.write("<p  style=\"text-align:left;\" class=\"breadcrumbs\">");
AddMasterBreadcrumbs("../../../../c_waveformgenerator.htm", "breadcrumbs", " &gt; ", "Home", "../../../../welcome/c_waveformgenerator.htm");
document.write("<a class=\"breadcrumbs\" href=\"../../../welcome/CWaveformGeneratorSDK.htm\">C-WaveformGenerator SDK<\/a>  &gt;  <a class=\"breadcrumbs\" href=\"../../component_object_model.htm\">Componet Object Model<\/a>  &gt;  <a class=\"breadcrumbs\" href=\"../tutorial.htm\">Tutorial<\/a>  &gt;  <a class=\"breadcrumbs\" href=\"create_project.htm\">Create Project<\/a>  &gt;  Visual Basic .NET(.NET Framework)<\/p>");
//]]></script>
</div>

<h1>Visual Basic .NET (.NET Framework)</h1>
<hr style="float: aligncenter; " />
<p style="font-weight: bold;">Create Project</p>
<p style="margin-left: 40px;">Launch Visual Studio, select [New]-[Project] from [File] menu.<br />
From the [Templates] of [New Project] dialog box, select [Windows Form Application] of [Visual Basic],<br />
and specify the name and location of the project to be created.<br />
When click the [OK] button, the project will be created.</p>
<p style="margin-left: 40px;">* Item names and commands may differ depending on the version of Visual Studio.</p>
<h2>Import Type Library</h2>
<p style="margin-left: 40px; margin-top: 0pt; margin-bottom: 0pt;">The CWaveFormGenerator.tlb file is required 
 to use the functions of the C-WaveformGenerator SDK driver in Visual Basic.</p>
<p style="margin-left: 40px; margin-top: 0pt; margin-bottom: 0pt;">Place CWaveFormGenerator.tlb in the same directory as the project.<br />
</p>
<p style="margin-left: 40px; margin-top: 0pt; margin-bottom: 0pt;">Select Project -&gt; Add Reference to display the Reference Manager.</p>
<p style="margin-left: 40px; margin-top: 0pt; margin-bottom: 0pt;"><br />
Select &quot;COM&quot; in the tree of the Reference Manager window, press the Browse button, select CWaveformGenerator.tlb in the same directory, and press OK.</p>
<p style="margin-left: 40px; margin-top: 0pt; margin-bottom: 0pt;"><img src="visual_basic_net_framework1.png" alt="" style=" border:none; width:100%; max-width:786px;" border="0" /></p>
<p style="margin-left: 40px; margin-top: 0pt; margin-bottom: 0pt;">&#160;</p>
<h2>Embed Interop Types</h2>
<p style="margin-left: 40px; margin-top: 0pt; margin-bottom: 0pt;">Select &quot;References&quot; -&gt; &quot;CWaveformGenerator&quot; on Visual Studio's Solution Explorer to display the reference properties of Interop.CWaveformGenerator.</p>
<p style="margin-left: 40px; margin-top: 0pt; margin-bottom: 0pt;">Set the &quot;Embed Interop Types&quot; item in the properties window to &quot;False&quot;.</p>
<p style="margin-left: 40px; margin-top: 0pt; margin-bottom: 0pt;"><img src="visual_basic_net_framework2.png" alt="" style=" border:none; width:100%; max-width:351px;" border="0" /></p>
<p style="margin-left: 40px; margin-top: 0pt; margin-bottom: 0pt;">&#160;</p>
<h2>Create Class Instance</h2>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 40px;">Declare a variable within your form class to use CWaveformGenerator.</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 40px;">Inside the subroutine, create a class instance of CWaveformGenerator.CCWaveformGeneratorClass.<br />
</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 40px;">The following is an example of the Form1 class, declaring the c_fgen variable and creating a class instance within the Form1_Load subroutine.</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 40px;">&#160;</p>
<p class="code" style="margin-left: 64px;">Public Class Form1</p>
<p class="code" style="margin-left: 64px;">&#160;&#160;&#160;&#160;Dim 
 c_fgen</p>
<p class="code" style="margin-left: 64px;">&#160;</p>
<p class="code" style="margin-left: 64px;">&#160;&#160;&#160;&#160;Private 
 Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load</p>
<p class="code" style="margin-left: 64px;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;c_fgen 
 = New CWaveformGenerator.CCWaveformGeneratorClass()</p>
<p class="code" style="margin-left: 64px;">&#160;&#160;&#160;&#160;End 
 Sub</p>
<p class="code" style="margin-left: 64px;">&#160;</p>
<p class="code" style="margin-left: 64px;">&#160;&#160;&#160;&#160;......</p>
<p class="code" style="margin-left: 64px;">&#160;&#160;&#160;&#160;......</p>
<p class="code" style="margin-left: 64px;">&#160;&#160;&#160;&#160;......</p>
<p class="code" style="margin-left: 64px;">&#160;</p>
<p class="code" style="margin-left: 64px;">End Class</p>
<p>&#160;</p>
<p>&#160;</p>
<div style="width: 100%; position: relative;" id="footer">
	<hr style="float: aligncenter; " />
	<p>This website uses cookies. By continuing to browse our site you 
	 agree to our <a href="https://www.contec.com/privacy#anc-01">use of 
	 cookies</a>.</p>
</div>
</body>
</html>
