'Check for .NET Framework 4.0
Dim msg As String
Dim title As String
Dim style As MsgBoxStyle
Dim response As MsgBoxResult
Dim WebDOTNet As Process = New Process
Dim WebXNA As Process = New Process
Dim readValue As String
readValue = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client", "Install", Nothing)
If readValue = Nothing Then
msg = "Pokémon3D requires Microsoft .NET Framework 4.0. Please visit" & vbcrlf & "http://www.microsoft.com/en-us/download/details.aspx?id=17851" & vbcrlf & "to download." & vbcrlf & "Would you like to open the webpage now?" 'Or something along those lines.
style = MsgBoxStyle.YesNo
title = "Microsoft .NET Framework 4.0 Required!"
response = MsgBox(msg, style, title)
If response = MsgBoxResult.Yes Then
WebDOTNet.StartInfo.FileName = "http://www.microsoft.com/en-us/download/details.aspx?id=17851"
WebDOTNet.StartInfo.WindowStyle = ProcessWindowStyle.Normal
WebDOTNet.Start()
Else
Close()
End If
End If
'Check for XNA Framework 4.0
readValue = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\XNA\Framework\v4.0", "Installed", Nothing)
If readValue = Nothing Then
msg = "Pokémon3D requires Microsoft XNA Framework 4.0. Please visit" & vbcrlf & "http://www.microsoft.com/en-us/download/details.aspx?id=20914" & vbcrlf & "to download." & vbcrlf & "Would you like to open the webpage now?" 'Or something along those lines.
style = MsgBoxStyle.YesNo
title = "Microsoft XNA Framework 4.0 Required!"
response = MsgBox(msg, style, title)
If response = MsgBoxResult.Yes Then
WebXNA.StartInfo.FileName = "http://www.microsoft.com/en-us/download/details.aspx?id=20914"
WebXNA.StartInfo.WindowStyle = ProcessWindowStyle.Normal
WebXNA.Start()
Else
Close()
End If
End If