Click here to Skip to main content
15,894,405 members
Home / Discussions / C#
   

C#

 
GeneralRe: Property question Pin
Nick Parker17-Mar-05 7:34
protectorNick Parker17-Mar-05 7:34 
GeneralRe: Property question Pin
J4amieC17-Mar-05 23:47
J4amieC17-Mar-05 23:47 
GeneralHexa Converting Pin
WaleedH17-Mar-05 5:48
WaleedH17-Mar-05 5:48 
GeneralRe: Hexa Converting Pin
techieboi17-Mar-05 6:14
techieboi17-Mar-05 6:14 
GeneralRe: Hexa Converting Pin
Robert Rohde17-Mar-05 7:13
Robert Rohde17-Mar-05 7:13 
GeneralRe: Hexa Converting Pin
WaleedH17-Mar-05 12:05
WaleedH17-Mar-05 12:05 
GeneralCalling C# function within Browser Control Pin
Adnan Siddiqi17-Mar-05 5:00
Adnan Siddiqi17-Mar-05 5:00 
GeneralRe: Calling C# function within Browser Control Pin
techieboi17-Mar-05 6:39
techieboi17-Mar-05 6:39 
I can think of two possible solutions to your problem.

The first is to hook-up an event handler for the browser control's BeforeNavigate2 event. You can then use this to parse special commands passed in the SRC attribute and execute particular methods. An example is shown below.

HTML:

Calls Host Form's MyCommand Method

C#:

private void WebBrowser_BeforeNavigate2(object sender, AxSHDocVw.DWebBrowserEvents2_BeforeNavigate2Event e)
{
// Determine if this is a proper url or a command
if (((string)e.uRL).IndexOf("command:") != -1)
{
// Call the appropriate function for the command
switch (((string)e.uRL).Replace("command:", ""))
{
case "mycommand":
this.MyCommand();
break;
}

// Stop the browser from performing the navigation
e.cancel = true;
}
}

The other method is to hook up some event sinks to capture the DHTML events.

Hope this helps.
Aaron
GeneralRe: Calling C# function within Browser Control Pin
Adnan Siddiqi17-Mar-05 7:29
Adnan Siddiqi17-Mar-05 7:29 
General[IPC on WinCE] Send data between applications Pin
Darth.Vader17-Mar-05 3:22
Darth.Vader17-Mar-05 3:22 
GeneralRe: [IPC on WinCE] Send data between applications Pin
Guinness4Strength17-Mar-05 5:17
Guinness4Strength17-Mar-05 5:17 
GeneralRe: [IPC on WinCE] Send data between applications Pin
Guinness4Strength17-Mar-05 5:34
Guinness4Strength17-Mar-05 5:34 
QuestionWhich is better? for or foreach? Pin
GhostsOfOrion17-Mar-05 2:35
GhostsOfOrion17-Mar-05 2:35 
AnswerRe: Which is better? for or foreach? Pin
Roger Alsing17-Mar-05 3:30
Roger Alsing17-Mar-05 3:30 
GeneralRe: Which is better? for or foreach? Pin
GhostsOfOrion17-Mar-05 3:44
GhostsOfOrion17-Mar-05 3:44 
GeneralRe: Which is better? for or foreach? Pin
Colin Angus Mackay17-Mar-05 6:35
Colin Angus Mackay17-Mar-05 6:35 
GeneralRe: Which is better? for or foreach? Pin
Robert Rohde17-Mar-05 7:16
Robert Rohde17-Mar-05 7:16 
GeneralRe: Which is better? for or foreach? Pin
Nick Parker17-Mar-05 7:38
protectorNick Parker17-Mar-05 7:38 
GeneralRe: Which is better? for or foreach? Pin
GhostsOfOrion17-Mar-05 8:18
GhostsOfOrion17-Mar-05 8:18 
QuestionHow would I display unicode characters such as Arabic characters in a text box? Pin
Muhammad Nadir Khan17-Mar-05 2:32
Muhammad Nadir Khan17-Mar-05 2:32 
AnswerRe: How would I display unicode characters such as Arabic characters in a text box? Pin
Nick Parker17-Mar-05 7:39
protectorNick Parker17-Mar-05 7:39 
Generalnull issue before initializing object Pin
spif200117-Mar-05 2:26
spif200117-Mar-05 2:26 
GeneralRe: null issue before initializing object Pin
Colin Angus Mackay17-Mar-05 6:41
Colin Angus Mackay17-Mar-05 6:41 
GeneralRe: null issue before initializing object Pin
Robert Rohde17-Mar-05 7:23
Robert Rohde17-Mar-05 7:23 
GeneralRe: null issue before initializing object Pin
spif200118-Mar-05 2:06
spif200118-Mar-05 2:06 

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.