システムのプロパティを表示する方法

◆概要

このページは、Visual Basic 6.0のVisual Basicで、APIを使ってシステムのプロパティを表示する方法について記載しています。





◆Sample code

Option Explicit

Private Declare Sub keybd_event Lib "User32.dll" ( _
    ByVal bVk As Byte, _
    ByVal bScan As Byte, _
    ByVal dwFlags As Long, _
    ByVal dwExtraInfo As Long)

Private Const KEYEVENTF_KEYUP = &H2
Private Const VK_LWIN = &H5B
Private Const VK_PAUSE = &H13

Private Sub Command1_Click()
    keybd_event VK_LWIN, 0, 0, 0
    keybd_event VK_PAUSE, 0, 0, 0
    keybd_event VK_LWIN, 0, KEYEVENTF_KEYUP, 0
End Sub
  

▼ページトップへ