Public Class Form1 <Runtime.InteropServices.DllImport("dwmapi.dll", PreserveSig:=False)> _ Private Shared Function DwmIsCompositionEnabled() As Boolean End Function Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click If DwmIsCompositionEnabled() Then MsgBox("Aeroは有効です。") Else MsgBox("Aeroは無効です。") End If End Sub End Class