Click here to Skip to main content
15,886,110 members
Home / Discussions / C#
   

C#

 
GeneralRe: generating random number in C# Pin
Colin Angus Mackay23-Aug-06 11:37
Colin Angus Mackay23-Aug-06 11:37 
JokeRe: generating random number in C# Pin
Nader Elshehabi23-Aug-06 12:34
Nader Elshehabi23-Aug-06 12:34 
QuestionGenerics in an Attribute? Pin
Ista23-Aug-06 9:17
Ista23-Aug-06 9:17 
AnswerRe: Generics in an Attribute? Pin
Nader Elshehabi23-Aug-06 9:51
Nader Elshehabi23-Aug-06 9:51 
QuestionWeb Browser Control link re-direction Pin
Josiah Smith23-Aug-06 8:57
Josiah Smith23-Aug-06 8:57 
AnswerRe: Web Browser Control link re-direction Pin
Nader Elshehabi23-Aug-06 10:00
Nader Elshehabi23-Aug-06 10:00 
GeneralRe: Web Browser Control link re-direction Pin
Josiah Smith23-Aug-06 13:36
Josiah Smith23-Aug-06 13:36 
GeneralRe: Web Browser Control link re-direction Pin
Josiah Smith31-Oct-06 7:41
Josiah Smith31-Oct-06 7:41 
Greetings,

I've been busy with other things, and just yesterday got around to doing what you suggested. I tried searching the statustext of the link just clicked, and stopping it immediately if it matches a desired string. I put something like this:

if (webbrowser1.statustext ends with ".doc ") /*not what I actually have, but logically similar*/
{
webBrowser1.Stop();
MessageBox.Show("This shouldn't open MS Word after you click 'OK'");
}

But after you click 'OK,' MS Word (the full windows MS Word application) opens the document listed in the link that was clicked, and not in the hosted form control within he custom application I'm developing; programatically, though, I am able to open documents (local and networked) in the hosted form control with ease:i.e. formControl1.Open("C:\test.doc"). I think I must be searching the wrong string? maybe telling the wrong thing to stop???

I did some more searching online, and the closest thing that I can find is a tutorial about using a button, an ActiveX control, and preventing the OS from opening Word, but opening it in your custom ActiveX control. This is similar to what I'm doing, but instead of the button, I'm using a hosted web page (browsing a sharepoint website hosted within our domain) and I'm not using ActiveX. (Here is that link: http://support.microsoft.com/kb/304662)

Thanks for any info you can offer.
If this is still unclear, I'll be more than glad to explain it better.
QuestionAgregation vs Heredity Pin
Legolas_Bilbao23-Aug-06 8:37
Legolas_Bilbao23-Aug-06 8:37 
AnswerRe: Agregation vs Heredity Pin
Jun Du23-Aug-06 8:51
Jun Du23-Aug-06 8:51 
GeneralRe: Agregation vs Heredity Pin
Legolas_Bilbao23-Aug-06 21:12
Legolas_Bilbao23-Aug-06 21:12 
GeneralRe: Agregation vs Heredity Pin
Jun Du24-Aug-06 3:26
Jun Du24-Aug-06 3:26 
GeneralRe: Agregation vs Heredity Pin
Legolas_Bilbao25-Aug-06 8:15
Legolas_Bilbao25-Aug-06 8:15 
QuestionPainting a button Pin
kalyanPaladugu23-Aug-06 8:04
kalyanPaladugu23-Aug-06 8:04 
AnswerRe: Painting a button Pin
BarV23-Aug-06 8:08
BarV23-Aug-06 8:08 
AnswerRe: Painting a button Pin
Nader Elshehabi23-Aug-06 9:39
Nader Elshehabi23-Aug-06 9:39 
GeneralRe: Painting a button Pin
Christian Graus23-Aug-06 12:01
protectorChristian Graus23-Aug-06 12:01 
Questionone instance Pin
TAREQ F ABUZUHRI23-Aug-06 7:07
TAREQ F ABUZUHRI23-Aug-06 7:07 
AnswerRe: one instance Pin
Not Active23-Aug-06 7:59
mentorNot Active23-Aug-06 7:59 
AnswerRe: one instance Pin
Guffa23-Aug-06 8:02
Guffa23-Aug-06 8:02 
QuestionWYSIWYG Html control for Windows Form Pin
Nadia Monalisa23-Aug-06 6:56
Nadia Monalisa23-Aug-06 6:56 
AnswerRe: WYSIWYG Html control for Windows Form Pin
Chris Maunder23-Aug-06 17:06
cofounderChris Maunder23-Aug-06 17:06 
GeneralRe: WYSIWYG Html control for Windows Form Pin
emran83423-Aug-06 18:24
emran83423-Aug-06 18:24 
QuestionSafe Vs. Unsafe Pixel Processing... Pin
Shy Agam23-Aug-06 6:24
Shy Agam23-Aug-06 6:24 
AnswerRe: Safe Vs. Unsafe Pixel Processing... Pin
leppie23-Aug-06 6:51
leppie23-Aug-06 6:51 

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.