Click here to Skip to main content
15,917,608 members
Home / Discussions / C#
   

C#

 
AnswerRe: RichTextBoxControl cursor position Pin
mav.northwind7-Jul-06 1:07
mav.northwind7-Jul-06 1:07 
AnswerRe: RichTextBoxControl cursor position Pin
BoneSoft7-Jul-06 3:48
BoneSoft7-Jul-06 3:48 
QuestionData Access Application Block AddInParameter method Pin
Brendan Vogt7-Jul-06 0:12
Brendan Vogt7-Jul-06 0:12 
AnswerRe: Data Access Application Block AddInParameter method Pin
Not Active7-Jul-06 2:56
mentorNot Active7-Jul-06 2:56 
QuestionData Access Application Block Pin
Brendan Vogt7-Jul-06 0:04
Brendan Vogt7-Jul-06 0:04 
AnswerRe: Data Access Application Block Pin
Not Active7-Jul-06 2:49
mentorNot Active7-Jul-06 2:49 
QuestionWebbrowser control - opening link in new window Pin
Oohmesh6-Jul-06 23:59
Oohmesh6-Jul-06 23:59 
AnswerRe: Webbrowser control - opening link in new window Pin
Anh_Tuan7-Jul-06 1:34
Anh_Tuan7-Jul-06 1:34 
You need to add event handlers to handle "NewWindow" event when the user clicks on a link with the target not on the current webbrowser

1. For Pre Windows XP SP2

axWebBrowser.NewWindow2

2. For Windows XP2 and later there is another event named

axWebBrowser.NewWindow3


The whole code for this would look

axWebBrowser.NewWindow2 += new AxSHDocVw.DWebBrowserEvents2_NewWindow2EventHandler(axWebBrowser_NewWindow2);<br />
<br />
try<br />
{<br />
	axWebBrowser.NewWindow3 += new AxSHDocVw.DWebBrowserEvents2_NewWindow3EventHandler(axWebBrowser_NewWindow3);<br />
}<br />
catch ( Exception )<br />
{<br />
	// Not XP SP2 - just ignore<br />
}


Now in the event handlers all you have to do is block the new window from opening by putting

e.Cancel = true;

and redirect the current webbrowser to the new URL sent by the event.

See more at NewWindow3[^]

Jup
GeneralRe: Webbrowser control - opening link in new window Pin
Jax_qqq12-Jul-06 5:27
Jax_qqq12-Jul-06 5:27 
GeneralRe: Webbrowser control - opening link in new window Pin
Anh_Tuan12-Jul-06 18:10
Anh_Tuan12-Jul-06 18:10 
QuestionWant code to Extract Table of content from a pdf file [modified] Pin
Prathi.V6-Jul-06 23:31
Prathi.V6-Jul-06 23:31 
QuestionCrystal Reports - Runtime Pin
SysJey6-Jul-06 23:00
SysJey6-Jul-06 23:00 
QuestionFOP it Pin
Support1236-Jul-06 23:00
Support1236-Jul-06 23:00 
QuestionHow to find the Server IP using .net Pin
rajkasa6-Jul-06 22:38
rajkasa6-Jul-06 22:38 
AnswerRe: How to find the Server IP using .net Pin
stancrm6-Jul-06 22:49
stancrm6-Jul-06 22:49 
Questionstring problem ? help please ¿ Pin
cmpeng346-Jul-06 22:37
cmpeng346-Jul-06 22:37 
AnswerRe: string problem ? help please ¿ Pin
stancrm6-Jul-06 22:58
stancrm6-Jul-06 22:58 
AnswerRe: string problem ? help please ¿ Pin
Guffa6-Jul-06 22:59
Guffa6-Jul-06 22:59 
AnswerRe: string problem ? help please ¿ Pin
Nader Elshehabi6-Jul-06 23:15
Nader Elshehabi6-Jul-06 23:15 
GeneralRe: string problem ? help please ¿ Pin
Anh_Tuan7-Jul-06 2:18
Anh_Tuan7-Jul-06 2:18 
AnswerRe: string problem ? help please ¿ Pin
V.7-Jul-06 1:10
professionalV.7-Jul-06 1:10 
Questioninstance of a crystal report Pin
cellardoor07166-Jul-06 22:25
cellardoor07166-Jul-06 22:25 
AnswerRe: instance of a crystal report Pin
V.7-Jul-06 1:14
professionalV.7-Jul-06 1:14 
QuestionMarshaling Object Pin
Anh_Tuan6-Jul-06 22:22
Anh_Tuan6-Jul-06 22:22 
AnswerRe: Marshaling Object Pin
mav.northwind7-Jul-06 1:14
mav.northwind7-Jul-06 1:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.