diff --git a/AboutBox1.Designer.vb b/AboutBox1.Designer.vb index f8cb119..3a5cbbb 100644 --- a/AboutBox1.Designer.vb +++ b/AboutBox1.Designer.vb @@ -37,7 +37,7 @@ Partial Class AboutBox1 'LogoPictureBox ' Me.LogoPictureBox.Image = CType(resources.GetObject("LogoPictureBox.Image"), System.Drawing.Image) - Me.LogoPictureBox.Location = New System.Drawing.Point(23, 33) + Me.LogoPictureBox.Location = New System.Drawing.Point(36, 33) Me.LogoPictureBox.Name = "LogoPictureBox" Me.LogoPictureBox.Size = New System.Drawing.Size(52, 52) Me.LogoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage @@ -49,15 +49,15 @@ Partial Class AboutBox1 Me.OKButton.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.OKButton.DialogResult = System.Windows.Forms.DialogResult.Cancel - Me.OKButton.Location = New System.Drawing.Point(97, 203) + Me.OKButton.Location = New System.Drawing.Point(97, 327) Me.OKButton.Name = "OKButton" - Me.OKButton.Size = New System.Drawing.Size(75, 19) + Me.OKButton.Size = New System.Drawing.Size(112, 19) Me.OKButton.TabIndex = 0 Me.OKButton.Text = "&OK" ' 'LabelCompanyName ' - Me.LabelCompanyName.Location = New System.Drawing.Point(108, 78) + Me.LabelCompanyName.Location = New System.Drawing.Point(136, 78) Me.LabelCompanyName.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0) Me.LabelCompanyName.MaximumSize = New System.Drawing.Size(152, 17) Me.LabelCompanyName.MinimumSize = New System.Drawing.Size(152, 17) @@ -69,7 +69,7 @@ Partial Class AboutBox1 ' 'LabelCopyright ' - Me.LabelCopyright.Location = New System.Drawing.Point(108, 59) + Me.LabelCopyright.Location = New System.Drawing.Point(136, 59) Me.LabelCopyright.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0) Me.LabelCopyright.MaximumSize = New System.Drawing.Size(152, 17) Me.LabelCopyright.MinimumSize = New System.Drawing.Size(152, 17) @@ -81,7 +81,7 @@ Partial Class AboutBox1 ' 'LabelVersion ' - Me.LabelVersion.Location = New System.Drawing.Point(108, 40) + Me.LabelVersion.Location = New System.Drawing.Point(136, 40) Me.LabelVersion.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0) Me.LabelVersion.MaximumSize = New System.Drawing.Size(152, 17) Me.LabelVersion.MinimumSize = New System.Drawing.Size(152, 17) @@ -93,7 +93,7 @@ Partial Class AboutBox1 ' 'LabelProductName ' - Me.LabelProductName.Location = New System.Drawing.Point(108, 21) + Me.LabelProductName.Location = New System.Drawing.Point(136, 21) Me.LabelProductName.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0) Me.LabelProductName.MaximumSize = New System.Drawing.Size(152, 17) Me.LabelProductName.MinimumSize = New System.Drawing.Size(152, 17) @@ -110,7 +110,7 @@ Partial Class AboutBox1 Me.tbInfo.Multiline = True Me.tbInfo.Name = "tbInfo" Me.tbInfo.ReadOnly = True - Me.tbInfo.Size = New System.Drawing.Size(248, 84) + Me.tbInfo.Size = New System.Drawing.Size(289, 213) Me.tbInfo.TabIndex = 1 Me.tbInfo.WordWrap = False ' @@ -119,7 +119,7 @@ Partial Class AboutBox1 Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.CancelButton = Me.OKButton - Me.ClientSize = New System.Drawing.Size(276, 232) + Me.ClientSize = New System.Drawing.Size(313, 356) Me.Controls.Add(Me.tbInfo) Me.Controls.Add(Me.LogoPictureBox) Me.Controls.Add(Me.OKButton) diff --git a/AboutBox1.vb b/AboutBox1.vb index 4200b35..7af521d 100644 --- a/AboutBox1.vb +++ b/AboutBox1.vb @@ -17,12 +17,20 @@ Public NotInheritable Class AboutBox1 Me.LabelCopyright.Text = My.Application.Info.Copyright Me.LabelCompanyName.Text = My.Application.Info.CompanyName Dim sbInfo As New System.Text.StringBuilder - sbInfo.Append("User " & SystemInformation.UserName & - "\" & SystemInformation.ComputerName & - " (" & Form1.GetInstance() & ")" & vbCrLf) - sbInfo.Append("ExeRoot " & Form1.GetExeRoot() & vbCrLf) - sbInfo.Append("DataRoot " & Form1.GetDataRoot() & vbCrLf) Dim sTemp As String = String.Empty + EgtGetVersionInfo(sTemp) + sbInfo.Append(sTemp & vbCrLf) + sbInfo.Append("ExeRoot " & Form1.GetExeRoot() & vbCrLf) + sbInfo.Append("DataRoot " & Form1.GetDataRoot() & vbCrLf) + EgtGetOsInfo(sTemp) + sbInfo.Append(sTemp & vbCrLf) + sbInfo.Append("User " & SystemInformation.UserName & + "\" & SystemInformation.ComputerName & + " (" & Form1.GetInstance() & ")" & vbCrLf) + EgtGetCpuInfo(sTemp) + sbInfo.Append(sTemp & vbCrLf) + EgtGetMemoryInfo(sTemp) + sbInfo.Append(sTemp & vbCrLf) EgtGetSceneInfo(sTemp) sbInfo.Append(sTemp) Me.tbInfo.Text = sbInfo.ToString() diff --git a/EgtInterface.vb b/EgtInterface.vb index 9fe4e96..3624ae9 100644 --- a/EgtInterface.vb +++ b/EgtInterface.vb @@ -602,6 +602,66 @@ End Sub Public Sub EgtDisableCommandLogger() End Sub + +Private Function EgtGetVersionInfo(ByRef psVerInfo As IntPtr) As Boolean +End Function +Public Function EgtGetVersionInfo(ByRef sVerInfo As String) As Boolean + Dim psVerInfo As IntPtr + Dim bOk As Boolean = EgtGetVersionInfo(psVerInfo) + If bOk Then + sVerInfo = Marshal.PtrToStringUni(psVerInfo) + EgtFreeMemory(psVerInfo) + Else + sVerInfo = String.Empty + End If + Return bOk +End Function + + +Private Function EgtGetOsInfo(ByRef psOsInfo As IntPtr) As Boolean +End Function +Public Function EgtGetOsInfo(ByRef sOsInfo As String) As Boolean + Dim psOsInfo As IntPtr + Dim bOk As Boolean = EgtGetOsInfo(psOsInfo) + If bOk Then + sOsInfo = Marshal.PtrToStringUni(psOsInfo) + EgtFreeMemory(psOsInfo) + Else + sOsInfo = String.Empty + End If + Return bOk +End Function + + +Private Function EgtGetCpuInfo(ByRef psCpuInfo As IntPtr) As Boolean +End Function +Public Function EgtGetCpuInfo(ByRef sCpuInfo As String) As Boolean + Dim psCpuInfo As IntPtr + Dim bOk As Boolean = EgtGetCpuInfo(psCpuInfo) + If bOk Then + sCpuInfo = Marshal.PtrToStringUni(psCpuInfo) + EgtFreeMemory(psCpuInfo) + Else + sCpuInfo = String.Empty + End If + Return bOk +End Function + + +Private Function EgtGetMemoryInfo(ByRef psMemInfo As IntPtr) As Boolean +End Function +Public Function EgtGetMemoryInfo(ByRef sMemInfo As String) As Boolean + Dim psMemInfo As IntPtr + Dim bOk As Boolean = EgtGetMemoryInfo(psMemInfo) + If bOk Then + sMemInfo = Marshal.PtrToStringUni(psMemInfo) + EgtFreeMemory(psMemInfo) + Else + sMemInfo = String.Empty + End If + Return bOk +End Function + Public Function EgtFreeMemory(ByVal sB As IntPtr) As Boolean End Function diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index d4a92ff..3b080cd 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -46,5 +46,5 @@ Imports System.Runtime.InteropServices ' utilizzando l'asterisco (*) come descritto di seguito: ' - - + +