How to create a function
public function functionname(argument ) returntype
end function
How to create a function
public function functionname(argument ) returntype
end function
?How to Check the instance of an application in VB.Net
''' Check whether the instance of an application is running or notPrivate Function CheckInstanceOfApplication() As Boolean
CheckInstanceOfApplication= False
Public Sub RegisterRJVExtension()
On Error Resume Next
Dim reg As Registry
Set reg = New Registry
Call reg.UpdateKey(REGToolRootTypes.HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.rjv", "Application", "RJVOpener.exe")
Call reg.UpdateKey(REGToolRootTypes.HKEY_CLASSES_ROOT, "Applications\RJVOpener.exe\Shell\open\command", "", App.Path & "\RJVOpener.exe %1")
Set reg = Nothing
End Sub
How to register an extension in vb.net?
Public Sub RegExtension() Dim reg As Microsoft.Win32.Registry Dim regkey As Microsoft.Win32.RegistryKey regkey = Microsoft.Win32.Registry.CurrentUser regkey = Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.lux", Microsoft.Win32.RegistryKeyPermissionCheck.ReadWriteSubTree) regkey.SetValue("Application", "ShowMessage.exe", Microsoft.Win32.RegistryValueKind.String) Dim regkey1 As Microsoft.Win32.RegistryKey regkey1 = Microsoft.Win32.Registry.ClassesRoot regkey1 = Microsoft.Win32.Registry.ClassesRoot.CreateSubKey("Applications\ShowMessage.exe\Shell\open\command", Microsoft.Win32.RegistryKeyPermissionCheck.ReadWriteSubTree) regkey1.SetValue("", Application.StartupPath & "\ShowMessage.exe %1", Microsoft.Win32.RegistryValueKind.String)
End Sub
Public Sub RegisterportandSoftware()
Dim reg As Registry
'''' Register Your Port ( No need to off your firewall)
Set reg = New Registry
Call reg.UpdateKey(REGToolRootTypes.HKEY_LOCAL_MACHINE, "SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List", "3306:TCP", "3306:TCP:*:Enabled:EnterYourText")
Call reg.UpdateKey(REGToolRootTypes.HKEY_LOCAL_MACHINE, "SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List", "1412:TCP", "1412:TCP:*:Enabled:EnteryourPortName")
'''''' Reg ister Your Application
Call reg.UpdateKey(REGToolRootTypes.HKEY_LOCAL_MACHINE, "SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List", App.Path, App.Path & ":*:Enabled:EnteryourApplicationName")
Set reg = Nothing
End Sub
|
|
| Subscribe to Dot Net Professionals - Dot Net, VB.NET, C#, C-sharp, ADO.Net, ASP.NET, XML, WML, Ajax, SharePoint,Visual Basic, VB.6.0 |
| Visit this group |