|
|
|
|
|
Dicas
|
|
Visual Basic (Monitores)
|
|
|
Título da Dica: Acesso as Propriedades de Vídeo
|
|
|
|
Postada em 6/4/2005 por screech
+---------+ | DLL's | +---------+ User32.dll Shell32.dll
+----------+ | MÓDULO | +----------+
Option Explicit
'API calls Public Declare Function GetDesktopWindow Lib "user32.dll" () As Long Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long 'API constants Public Const SW_SHOWNORMAL = 1
Public Function StartCPLApp(AppName As String) As Long ' AppName with ending Dim Scr_hDC As Long
Scr_hDC = GetDesktopWindow() StartCPLApp = ShellExecute(Scr_hDC, "Open", "Control", AppName, "C:", SW_SHOWNORMAL) End Function
+-------------+ | COMO USAR | +-------------+ Private Sub Command1_Click() StartCPLApp "DESK.CPL" End Sub
|
|
|
|
|