Link to home
Start Free TrialLog in
Avatar of Hosam
HosamFlag for Egypt

asked on

Prevent refresh of webbrowser control

how to prevent refreshing of webbrowser control contenets that occurs when the users press F5.

elzohry
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Hosam

ASKER

dear emoreau,
thanks for your comment but we cannot set the keycode to 0, once the events reach _KeyDown we cannot prevent its proceed, we can stop only _KeyPress event.

and so, webbrowser control always trap F5 key press.

elzohry
I just test it and I found that the KeyDown is not triggered if the WebControl has the focus (but it will work if another control has the focus).
Avatar of Hosam

ASKER

thanks dear emoreau, for your comment
but my forms has no control that can get the focus EXCEPT webbrowser control.

and so, i cannot trigger F5 key.

thanks again