diff --git a/AboutBox1.Designer.vb b/AboutBox1.Designer.vb index c1a1f84..933728f 100644 --- a/AboutBox1.Designer.vb +++ b/AboutBox1.Designer.vb @@ -50,7 +50,7 @@ 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(117, 346) + Me.OKButton.Location = New System.Drawing.Point(117, 356) Me.OKButton.Name = "OKButton" Me.OKButton.Size = New System.Drawing.Size(80, 20) Me.OKButton.TabIndex = 0 @@ -111,18 +111,18 @@ Partial Class AboutBox1 Me.tbInfoProg.Multiline = True Me.tbInfoProg.Name = "tbInfoProg" Me.tbInfoProg.ReadOnly = True - Me.tbInfoProg.Size = New System.Drawing.Size(290, 164) + Me.tbInfoProg.Size = New System.Drawing.Size(290, 176) Me.tbInfoProg.TabIndex = 1 Me.tbInfoProg.WordWrap = False ' 'tbInfoSys ' Me.tbInfoSys.AcceptsReturn = True - Me.tbInfoSys.Location = New System.Drawing.Point(12, 253) + Me.tbInfoSys.Location = New System.Drawing.Point(12, 265) Me.tbInfoSys.Multiline = True Me.tbInfoSys.Name = "tbInfoSys" Me.tbInfoSys.ReadOnly = True - Me.tbInfoSys.Size = New System.Drawing.Size(290, 86) + Me.tbInfoSys.Size = New System.Drawing.Size(290, 84) Me.tbInfoSys.TabIndex = 2 Me.tbInfoSys.WordWrap = False ' @@ -131,7 +131,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(314, 373) + Me.ClientSize = New System.Drawing.Size(314, 383) Me.Controls.Add(Me.tbInfoSys) Me.Controls.Add(Me.tbInfoProg) Me.Controls.Add(Me.LogoPictureBox) diff --git a/AboutBox1.vb b/AboutBox1.vb index b8a2b28..e84ca47 100644 --- a/AboutBox1.vb +++ b/AboutBox1.vb @@ -24,6 +24,8 @@ Public NotInheritable Class AboutBox1 sbInfoProg.Append("ExeRoot " & Form1.GetExeRoot() & vbCrLf) sbInfoProg.Append("DataRoot " & Form1.GetDataRoot() & vbCrLf) sbInfoProg.Append("MachinesRoot " & Form1.GetMachinesRoot() & vbCrLf) + EgtGetKeyInfo(sTemp) + sbInfoProg.Append("Key " & sTemp & vbCrLf) sbInfoProg.Append("User " & SystemInformation.UserName & "\" & SystemInformation.ComputerName & " (" & Form1.GetInstance() & ")") diff --git a/EgtInterface.vb b/EgtInterface.vb index cb48e22..ed09254 100644 --- a/EgtInterface.vb +++ b/EgtInterface.vb @@ -715,6 +715,29 @@ Public Function EgtGetVersionInfo(ByRef sVerInfo As String) As Boolean Return bOk End Function + +Private Function EgtGetKeyInfo_32(ByRef psKeyInfo As IntPtr) As Boolean +End Function + +Private Function EgtGetKeyInfo_64(ByRef psKeyInfo As IntPtr) As Boolean +End Function +Public Function EgtGetKeyInfo(ByRef sKeyInfo As String) As Boolean + Dim psKeyInfo As IntPtr + Dim bOk As Boolean + If IntPtr.Size = 4 Then + bOk = EgtGetKeyInfo_32(psKeyInfo) + Else + bOk = EgtGetKeyInfo_64(psKeyInfo) + End If + If bOk Then + sKeyInfo = Marshal.PtrToStringUni(psKeyInfo) + EgtFreeMemory(psKeyInfo) + Else + sKeyInfo = String.Empty + End If + Return bOk +End Function + Private Function EgtGetOsInfo_32(ByRef psOsInfo As IntPtr) As Boolean End Function diff --git a/Form1.vb b/Form1.vb index 4cb59fc..a635dd5 100644 --- a/Form1.vb +++ b/Form1.vb @@ -387,9 +387,11 @@ Public Class Form1 WritePrivateProfileString(S_GRID, K_SHOWGRID, If(m_bShowGrid, 1, 0), m_sIniFile) ' Salvo stato unità di misura per interfaccia utente WritePrivateProfileString(S_SCENE, K_MMUNITS, If(m_bMmUnits, 1, 0), m_sIniFile) - ' Salvo posizione Form - Dim nFlag As Integer = If(Me.WindowState = FormWindowState.Maximized, 1, 0) - WritePrivateProfileWinPos(S_GENERAL, K_WINPLACE, nFlag, Me.Left, Me.Top, Me.Width, Me.Height, m_sIniFile) + ' Salvo posizione Form (se non minimizzato) + If Me.WindowState <> FormWindowState.Minimized Then + Dim nFlag As Integer = If(Me.WindowState = FormWindowState.Maximized, 1, 0) + WritePrivateProfileWinPos(S_GENERAL, K_WINPLACE, nFlag, Me.Left, Me.Top, Me.Width, Me.Height, m_sIniFile) + End If ' Terminazione generale di EgtInterface EgtExit() ' Rilascio mutex diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index ffac04e..5783fbb 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: ' - - + +