
GetAllControls – Retrieving all the controls inside a container and its sub-containers
‘ Returns an array with all the controls in the specified container control and ‘ its child containers’ Example:’ ‘ print the name of all the controls on the form

‘ Returns an array with all the controls in the specified container control and ‘ its child containers’ Example:’ ‘ print the name of all the controls on the form

‘ Return the application’s path.’ Note: it also works with add-ins’s dll, whereas Application.StartupPath ‘ returns’ Visual Studio .NET’s startup path instead’ Example: MessageBox.Show(GetApplicationPath())Function GetApplicationPath() As String Return System.IO.Path.GetDirectoryName _

‘ Check whether an object is storing a numeric value’ Examples:’ Dim s As String = “hello”‘ Dim d As Double = 2.4′ Dim i As Integer = 5’ Debug.WriteLine(IsNumeric(d))

‘ Return a validation summary string with all the error messages, if any,’ of the controls inside the specified container,’ associated to an ErrorProvider control’ ‘ Example:’ Dim summary As

‘ Unregister an Enterprise Service from the COM+ Catalog’ Note: requires a reference to the System.EnterpriseServices.dll assembly’ Note: applicationID is the name of the COM+ application that contains the ‘

‘ Get the path of the SQL Server’s OSQL.exe utilityFunction GetOsqlPath() As String Dim regKey As Microsoft.Win32.RegistryKey = _ Microsoft.Win32.Registry.LocalMachine.OpenSubKey( _ “SOFTWAREMicrosoftMicrosoft SQL Server80ToolsClientSetup”) If regKey Is Nothing Then Return

‘ Execute an array of sql script files with batch statements,’ by using the OSQL utility’ – dbName is the name of the destination database’ – isWinAuth, login and pwd

‘ Register an Enterprise Service in the COM+ Catalog’ Note: requires a reference to the System.EnterpriseServices.dll assembly’ This version identify the enterprise service with its path’ Example: RegisterEnterpriseService(“C:TempTestService.dll”)Sub RegisterEnterpriseService(ByVal servicePath

‘ Get the path of the Oracle’s SqlPlus.exe utilityFunction GetSqlPlusPath() As String Dim regKey As Microsoft.Win32.RegistryKey = _ Microsoft.Win32.Registry.LocalMachine.OpenSubKey(“SOFTWAREORACLE”) If regKey Is Nothing Then Return “” End If Dim sqlplusPath