kuzinhy > 05-12-15, 12:28 PM
ongke0711 > 05-12-15, 09:06 PM
Option Compare Database
Option Explicit
Public sRegKey As String
Public sInitiRegKey As String
Public bRegKeyExists As Boolean
Private Sub cmdThoat_Click()
DoCmd.Close
End Sub
Private Sub Command7_Click()
Call sGoogleMap(Me.txtAddress)
End Sub
Sub sGoogleMap(strAddress As String)
Dim strURL As String
strURL = "http://maps.google.com/maps?q="
strURL = strURL & Replace(Me.txtAddress, " ", "+") & "&iwloc=A&hl=en"
Me.wbbWebsite.Navigate URL:=strURL
End Sub
Private Sub Form_Close()
On Error GoTo Error_Handler
'Cleanup our Reg h@ck
If bRegKeyExists = True Then
Call RegKeySave(sRegKey, sInitiRegKey, "REG_DWORD")
Else
Call RegKeyDelete(sRegKey)
End If
Error_Handler_Exit:
On Error Resume Next
Exit Sub
Error_Handler:
MsgBox "The following error has occured." & vbCrLf & vbCrLf & _
"Error Number: " & Err.Number & vbCrLf & _
"Error Source: Form_Close" & vbCrLf & _
"Error Description: " & Err.Description, _
vbCritical, "An Error has Occured!"
Resume Error_Handler_Exit
End Sub
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Error_Handler
Dim IEVersion As String
Dim IEMajorVersion As Long
Dim sRegHackValue As String
'Set Our Reg h@ck
If Is64BitProcessor Then
'64 bit
sRegKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION\msaccess.exe"
Else
'32 bit
sRegKey = "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION\msaccess.exe"
End If
IEVersion = RegKeyRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Version")
IEMajorVersion = Left(IEVersion, InStr(IEVersion, ".") - 1)
Select Case IEMajorVersion
Case Is <= 7
sRegHackValue = CStr(IEMajorVersion * 1000)
Case 8
sRegHackValue = "8888"
Case 9
sRegHackValue = "9999"
Case 9
sRegHackValue = "9999"
Case 10
sRegHackValue = "10001"
Case 11
sRegHackValue = "11001"
End Select
If RegKeyExists(sRegKey) Then
bRegKeyExists = True
sInitiRegKey = RegKeyRead(sRegKey)
Call RegKeySave(sRegKey, sRegHackValue, "REG_DWORD")
Else
bRegKeyExists = False 'not strictly necessary
Call RegKeySave(sRegKey, sRegHackValue, "REG_DWORD")
End If
Error_Handler_Exit:
On Error Resume Next
Exit Sub
Error_Handler:
MsgBox "The following error has occured." & vbCrLf & vbCrLf & _
"Error Number: " & Err.Number & vbCrLf & _
"Error Source: Form_Open" & vbCrLf & _
"Error Description: " & Err.Description, _
vbCritical, "An Error has Occured!"
Resume Error_Handler_Exit
End Sub
kuzinhy > 06-12-15, 11:55 AM
ongke0711 > 06-12-15, 03:29 PM
kuzinhy > 09-12-15, 09:00 PM
ongke0711 > 09-12-15, 09:12 PM
kuzinhy > 09-12-15, 11:32 PM
ongke0711 > 10-12-15, 01:44 PM
kuzinhy > 10-12-15, 02:38 PM