nwhan
asked on
inform user that only Internet Explorer can be used to access system
My system requires only Internet Explorer to be used, other browsers like Mozilla/Opera cannot be supported.
I need to check if user uses IE browser. Else, i need to popup a message to inform user that only Internet Explorer can be used to access the system. How can I do the checkings ?
Please help on the codes. Thanks.
I need to check if user uses IE browser. Else, i need to popup a message to inform user that only Internet Explorer can be used to access the system. How can I do the checkings ?
Please help on the codes. Thanks.
for code to check on ie installed
add these 2 in the top of your form
---------
Imports Microsoft.Win32.Registry
Imports Microsoft.Win32
---------
and this is the button code i used
---------
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim regKey As RegistryKey
Try
regKey = Registry.LocalMachine.Open SubKey("So ftware\Mic rosoft\Int ernet Explorer", True)
regKey.Close()
Catch ex As Exception
MessageBox.Show("Internet Explorer was not found on this machine")
Finally
End Try
End Sub
---------
hope this helps a bit
bruintje
add these 2 in the top of your form
---------
Imports Microsoft.Win32.Registry
Imports Microsoft.Win32
---------
and this is the button code i used
---------
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim regKey As RegistryKey
Try
regKey = Registry.LocalMachine.Open
regKey.Close()
Catch ex As Exception
MessageBox.Show("Internet Explorer was not found on this machine")
Finally
End Try
End Sub
---------
hope this helps a bit
bruintje
ASKER
Sorry if my question is abit blur or incomplete.
I have a web-based system that supports only Internet Explorer.
Therefore, if a user accesses the system using other browser like Firefox or Opera, the page should display a message telling user that "Other browser has been detected other than IE. Please use only IE to access the system."
Please help. Thanks.
I have a web-based system that supports only Internet Explorer.
Therefore, if a user accesses the system using other browser like Firefox or Opera, the page should display a message telling user that "Other browser has been detected other than IE. Please use only IE to access the system."
Please help. Thanks.
this is ASP.NET?
ASKER
Really ?
Anyway I am using Microsoft Visual Studio (VB.NET)
So is this VB.NET or ASP.NET ? Whats the difference ?
Anyway I am using Microsoft Visual Studio (VB.NET)
So is this VB.NET or ASP.NET ? Whats the difference ?
no i was asking :)
the code i gave checked if IE was installed or not in VB
but then you said:
>>the page should display a message telling user that "Other browser has been detected other than IE. Please use only IE to access the system."
so i assumed the page was a webpage and you used ASP for the webpage and i used a windows form to prepare the code
the code i gave checked if IE was installed or not in VB
but then you said:
>>the page should display a message telling user that "Other browser has been detected other than IE. Please use only IE to access the system."
so i assumed the page was a webpage and you used ASP for the webpage and i used a windows form to prepare the code
ASKER
Sorry for not mentioning that it's a web-based system. So how can i perform the checkings and notify user to use only IE ? Help please. Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1. You could look it up in the registry at the HKEY_CURRENT_USER\Software
2. If the key exists, IE is installed on the computer. To see if it is the default handler you can check the HKEY_CLASSES_ROOT\htmlfile
3. If the key contains "iexplore.exe" you know that IE is also the default browser.
if 1 or 3 is negative then you can show a message
hope this helps a bit
bruintje