Imports System.Runtime.InteropServices Public Class Form1 Friend Const SPI_GETOEMINFO As Integer = 258 <DllImport("coredll.dll")> _ Friend Shared Function SystemParametersInfo _ (ByVal uiAction As System.UInt32, _ ByVal uiParam As System.Int32, _ ByVal pvParam As System.Text.StringBuilder, _ ByVal fWinIni As System.UInt32 _ ) As Boolean End Function Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles Button1.Click Dim buffer As New System.Text.StringBuilder If SystemParametersInfo(SPI_GETOEMINFO, buffer.Capacity, buffer, 0) Then MessageBox.Show(buffer.ToString) Else Messagebox.show("取得失敗") End If End Sub End Class
Willcom W-ZERO3[es](WS007SH)の場合「SHARP WS007SH」が表示されます。
SoftBank X04HTの場合「X04HT」が表示されます。
CASIO DT-5200の場合「PY021]が表示されます。
0 件のコメント:
コメントを投稿