|
Hello
Well, you can get the document of the web borwser using the Webbroser.Document property. Cancel the navigation, get the URL, now either send a webRequest yourself and get the webresponse as a stream, or use the WebBorwser.Document mentioned above.
Regards
|
|
|
|
|
Thank you very much. I'll try to hack something together with your suggestions.
Josiah
|
|
|
|
|
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.
|
|
|
|
|
I´ve a question i want to implemente a class paperA and class paperB only have 2 common attributes , i want to do using uml standards like heredity or agregation what is the best perform and why
thanks
Dios creo un equipo perfecto a los demas los lleno de extranjeros
|
|
|
|
|
It's about relationship, not performance. You should get the relationship right. Inheritance describes that B is an A, but aggregation describes that B has an A. For example, a car is a vehicle, but a car has (is not) an engine.
Best,
Jun
|
|
|
|
|
then how can i develop this class? using what
ink paper is paper and thermic paper is paper or with agregation
thanks
Dios creo un equipo perfecto a los demas los lleno de extranjeros
|
|
|
|
|
It sounds like inheritance.
Best,
Jun
|
|
|
|
|
thanks
Dios creo un equipo perfecto a los demas los lleno de extranjeros
|
|
|
|
|
Iam trying to paint a button to get a shade in a button. Iam using a LinearGradientBrush. The code below Worked but it is taking away the
button1.text also.How do i get the text to show after the button is
painted.
void button1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
Rectangle rcView = this.ClientRectangle;
using (LinearGradientBrush brush = new LinearGradientBrush(rcView, this.ColorStart, this.ColorEnd, this.GradientMode))
{
g.FillRectangle(brush, rcView);
}
base.OnPaint(e);
}
ColorStart and ColorEnd are basically colors. Iam trying shade of the
color from lighter to darker across the button. So my ColorStart is a
little lighter color and ColorEnd is a Darker color.
Thanks
Kal
|
|
|
|
|
Override the OnPaint function
|
|
|
|
|
Reposting your question 3 hours apart in the same forum is consedered very rude!!! Don't do that again, and review my answer to your previous post
|
|
|
|
|
It's happening a lot at the moment. I assume it means 'I don't understand the answer, and am hoping for one I can copy and paste'
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
i have when i click on the button i want to open new form
i know how to open new form (new Form();)
1- but how can just open just one form at the same time (one instance)
2- i want the user cant focus on the old form without close current form
Palestine
|
|
|
|
|
Form.ShowDialog
only two letters away from being an asset
|
|
|
|
|
1- How do you do to open more than one form at a time? Just don't do it that way.
2- Use the ShowDialog method to show the form.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
I am searching for a good WYSIWYG Html control for last 6 months in Google, I did not get a good one. Do anyone know a good Win form .NEt 2.0 Control for Html Editing.
Thanks
|
|
|
|
|
There are *tons*. You can even host the IE control and use its inbuilt editor if you want.
Maybe if you told us what you don't like about the currently available ones we could narrow it down.
|
|
|
|
|
Hello,
I did not find any good one even commercial. Which already has a toolbar and good API. I did not find any way to use IE control as an editor. would you please show me in little more details.
Thanks
Regards
|
|
|
|
|
I've read an article about fast pixel processing[^] posted in codeproject.
As we all know, the GetPixel() and SetPixel() functions have a lot of overhead.
So... The most common solution I've found so far was to lock the pixels in memory and perform calculations using unsafe code and pointers.
If you look at the source code provided with the article mentioned above, you'll see that AndrewVos ,the writer, does lock the pixels in memory, but instead of looping through pixels using unsafe pointers, he marshals them into an array.
I'm sure that the safe and managed code is better.
After all it IS "safe and managed".
But is it slower/faster than unsafe code?
Thanks in advance,
Shy.
|
|
|
|
|
shyagam wrote: But is it slower/faster than unsafe code?
If you are going to manipulate a large amount of pixels, the marshal overhead will be small. For justa few pixels, unsafe will still be the fastest.
|
|
|
|
|
i want to make event after my Form finsh loading all component .....
at any event can put it ?
Palestine
|
|
|
|
|
Hello
You should put your code in the Form.Shown event. Yet, notice that it needs .Net version 2.0
If you don't have version 2.0 you may try the Activated event, yet it will be fired evry time you code is activate it. So if you want to run it once, make a bool and set it to false after the first time.
Regards
|
|
|
|
|
Iam trying to paint a button to get a shade in a button. How do i do it.
Iam using this code below. Iam using a LinearGradientBrush but it doesn't
seem to do anything
void button1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
Rectangle rcView = this.ClientRectangle;
using (LinearGradientBrush brush = new LinearGradientBrush(rcView, this.ColorStart, this.ColorEnd, this.GradientMode))
{
g.FillRectangle(brush, rcView);
}
base.OnPaint(e);
}
ColorStart and ColorEnd are basically colors. Iam just get the shade of the
color from lighter to darker across the button. So my ColorStart is a
little lighter color and ColorEnd is a Darker color.
Thanks
Kal
|
|
|
|
|
Hello
Few points:
1- this.ClientRectangle => Should be => button1.ClientRectangle
2- base.OnPaint(e); => Why this??
3- How do you define: this.ColorStart, this.ColorEnd, this.GradientMode?? Which colors exactly did you use? Very close gradients may fuse together.
Now try this code:
Graphics g = e.Graphics;
Rectangle rcView = button1.ClientRectangle;
using (LinearGradientBrush brush = new LinearGradientBrush(rcView,Color.DarkGreen, Color.DarkMagenta, 50 ))
{
g.FillRectangle(brush, rcView);
}
|
|
|
|
|
Thanks for answering me.
I got it to work.
You are right its button1.ClientRectangle.
I had to again use g.DrawString to draw the name on the button because its
lost after i painted
Thanks
Kal
|
|
|
|