Home > Software engineering >  VB6.0 by use in xp development how to compile software to Windows 7 cannot be used.
VB6.0 by use in xp development how to compile software to Windows 7 cannot be used.

Time:10-13

In the run time error 6 overflow,
Windows 7 is a 32-bit system,
 Private Type SYSTEM_INFO 
DwOemID As Long
DwPageSize As Long
LpMinimumApplicationAddress As Long
LpMaximumApplicationAddress As Long
DwActiveProcessorMask As Long
DwNumberOrfProcessors As Long
DwProcessorType As Long
DwAllocationGranularity As Long
DwReserved As Long
End Type

Private Type MEMORYSTATUS
DwLength As Long
DwMemoryLoad As Long
DwTotalPhys As Long
DwAvailPhys As Long
DwTotalPageFile As Long
DwAvailPageFile As Long
DwTotalVirtual As Long
DwAvailVirtual As Long
End Type

Const SM_CXSCREEN=0
Const SM_CYSCREEN=1

Private Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (ByVal nDrive As String) As Long
Private Declare Function GetDiskFreeSpace Lib "kernel32" Alias "GetDiskFreeSpaceA" (ByVal lpRootPathName As String, lpSectorsPerCluster As Long, lpBytesPerSector As Long, lpNumberOfFreeClusters As Long, lpTtoalNumberOfClusters As Long) As Long
Private Declare Sub GlobalMemoryStatus Lib "kernel32" (lpBuffer As MEMORYSTATUS)
Private Declare Sub GetSystemInfo Lib "kernel32" (lpSystemInfo As SYSTEM_INFO)
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Private Declare Function WNetGetConnection Lib "MPR. DLL" Alias "WNetGetConnectionA" (ByVal lpszLocalName As String, ByVal lpszRemoteName As String, cbRemoteName As Long) As Long

Dim sinfo As SYSTEM_INFO
Dim minfo As MEMORYSTATUS


Private Sub Form_Load ()
Dim aa As String
Dim strLocalIP As String
Dim winIP As Object
Aa=aa & amp; Environ (" username ") & amp; VbCrLf
The Set winIP=CreateObject (" MSWinsock. Winsock ")
StrLocalIP=winIP. Localip
Label18=aa & amp; "" & amp; StrLocalIP
SkinH_Attach
SkinH_SetAero 1


The Set wmi=GetObject (winmgmts: \ \ \ "root \ CIMV2")
The Set w=wmi. ExecQuery (" select * from win32_processor ")
For Each I In w

Label12=vbCrLf & amp; I.N ame
Next

End Sub
The Public Function GetCPUTemp () As a Double
Dim As Long I
Dim the -mcpu As the Variant
The Dim u As the Variant
Dim s As String

Set the -mcpu=GetObject (" WINMGMTS: {impersonationLevel=impersonate}! Root \ wmi "). ExecQuery (" SELECT CurrentTemperature From MSAcpi_ThermalZoneTemperature ")
For Each of u In the -mcpu
S=s & amp; The u.c. urrentTemperature
Next

Set the -mcpu=Nothing

GetCPUTemp=(s - 2732)/10

End the Function


Private Sub Label29_Click ()
The Shell "explorer" & amp; "Http://news.sohu.com/"
End Sub

Private Sub Label30_Click ()
The Shell "explorer" & amp; "Http://news.ifeng.com/"
End Sub

Private Sub Label31_Click ()
The Shell "explorer" & amp; "Http://taobao.com/"
End Sub

Private Sub Label32_Click ()
The Shell "explorer" & amp; "Http://123.sogou.com/xinwen/"
End Sub

Private Sub Label33_Click ()
The Shell "explorer" & amp; "Http://fanxing.kugou.com/"
End Sub

Private Sub Label34_Click ()
The Shell "explorer" & amp; "Http://www.xiami.com/"
End Sub

Private Sub Label35_Click ()
The Shell "explorer" & amp; "Http://paipai.com/"
End Sub

Private Sub Label36_Click ()
The Shell "explorer" & amp; "Http://youku.com/"
End Sub

Private Sub Label37_Click ()
The Shell "explorer" & amp; "Http://www.kankan.com/"
End Sub

Private Sub Label38_Click ()
The Shell "explorer" & amp; "Http://www.12306.cn/"
End Sub

Private Sub Label39_Click ()
The Shell "explorer" & amp; "Http://123.sogou.com/ting/"
End Sub

Private Sub Label40_Click ()
The Shell "explorer" & amp; "Http://kan.sogou.com/"
End Sub

Private Sub Label41_Click ()
The Shell "explorer" & amp; "Http://vip.etao.com/"
End Sub

Private Sub Timer1_Timer ()
Label10. Caption=GetCPUTemp ()
Label21. Caption=Format (Now, "on DD MM YYYY years hh: nn: ss")


End Sub



Private Sub Toolbar1_ButtonClick (ByVal Button As ComctlLib. Button)
Select a Case Button. The Index
Case 1
MsgBox "function temporarily undeveloped
"Case 3
MsgBox "function temporarily undeveloped
"Case 5
MsgBox "function temporarily undeveloped
"Case 7
MsgBox "function temporarily undeveloped
"Case 9
MsgBox "function temporarily undeveloped
"Case 11
MsgBox "function temporarily undeveloped
"Case 13
MsgBox "function temporarily undeveloped
"Case 15
MsgBox "function temporarily undeveloped
"End the Select
End Sub


Can run on Windows xp, onto the Windows 7 in the

Ask Daniel to help solve the problem, thank you,

CodePudding user response:

Dozens of label...
You put the form all of the code (including control configuration) are posted...

CodePudding user response:

This saved my life,
  • Related