Visual Basic (Declaration) | |
---|---|
Public Overloads Shared Function Create() As Application |
C# | |
---|---|
public static Application Create() |
C++/CLI | |
---|---|
public: static Application^ Create(); |
Return Value
A handle to an Application object. If no instances of Keysight 89600 VSA are running, null is returned. If multiple instances are running, the returned handle is always for the instance with the lowest port number..NET 6+ note: ApplicationFactory.Create behaves slightly differently than described here. See the intellisense help or the .NET 6+ Nuget Packages topic in the .NET Reference.
If there are no instances of Keysight 89600 VSA running, a new instance is not created.
On a 64-bit version of Windows, the Create() method will return a reference to the 64-bit version of the VSA when the version of the Agilent.SA.Vsa.VsaInterfaces assembly referenced by your program is 15.00 or later. When your program references an earlier version, the 32-bit version of the VSA is the default.
You can change the default by setting the Utilities > Startup Preferences > Programmatic Startup parameter. You can also specify whether to get a handle to a 32-bit or 64-bit instance by using the other overloads of the Create() method.
C# | ![]() |
---|---|
// First, try getting a reference to an already running 89600 VSA. Application app = ApplicationFactory.Create(); bool isCreated = false; if (app == null) { // There is no running 89600 VSA; try to create a new one. app = ApplicationFactory.Create(true, null, null, -1); isCreated = true; } app.IsVisible = true; // Make the main window visible app.Title = "Custom title"; // Label the VSA main window |
Target Platforms: Windows 11 Professional or Enterprise; Windows 10 Professional, Enterprise, or Education (64-bit)