|
Go into IE's Tools menu, Internet Options, click on Advanced tab, then uncheck 'Display a notification about every script error'.
RageInTheMachine9532
|
|
|
|
|
Thanks - i was trying to have this still turned on for users who like error messages to appear and do it in my program.
I think i have sussed it now by setting the "Silent" proeprty
on the browser object.
Thanks for your answer
|
|
|
|
|
I completely forgot about Silent! Thanks!
RageInTheMachine9532
|
|
|
|
|
Changing a user's preference is BAD idea without their acknowledgement or approval. You should make this an option in your software, or just rely upon their options already configured for IE (recommended). This is an ill practice and will be received as such.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I agree, really i just want javascript errors to not show on the one and only web browser in my application and leave the user settings alone. I can do this with popup windows by handling an event.
Is there an event i can handle that basically says "come here when a javascript error occurs" so i can then kill it off?
Setting the browser property "Silent" seems to work but i don't want to use this if it set globally all IE's to use this.
Thanks
|
|
|
|
|
Silent will tell the browser to show or not show dialog boxes. Critical errors and security alerts will still get shown, according to the docs on MSDN. Silent should NOT change the settings for all browser instances, just the one the Silent property was set to True on.
There is also no event fired when a script error occurs, at least on from the browser object. NavigateError will be fired if there is a server error returned, like 404 - Page not found, but it won't catch scripting errors.
RageInTheMachine9532
|
|
|
|
|
Off the top of my head, I'm not sure. If possible, this will definitely get into the advanced hosting interfaces, which you can read more about in the Advanced Hosting Reference[^] on MSDN. This uses a lot of COM interfaces to override and provide user interfaces for the WebBrowser control (or the MSHTML control, but that's too low-level and you have to implement much more that the WebBrowser provides for you).
To get these interfaces defined in a .NET assembly, there is a good trick that you can read about in the CodeProject article, Using MSHTML Advanced Hosting Interfaces[^], which also discusses how to use these to override behavior.
The MSDN link (and other articles in that parent section) cover a lot of functionality that may allow you to capture errors, but from what I've read and remember (since I've done a lot with hosting interfaces both in COM and .NET) I don't think you can. Good luck, though. It's at the very least a good learning experience to read through all that. Might even give you some ideas about additional functionality you may wish to provide to the WebBrowser control in your application.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
How can I get an image of a window or an application that I got its handle...
I did it by activating this window then capturing the screen and saving this image , but I'm asking about a way to get that image without activating the window .
|
|
|
|
|
You actually don't need to capture the screen to get the window, which would require the window to be active so you see it all. Instead of getting the desktop window (a la GetDesktopWindow or something), get the window handle and basically do the same thing. In C#, you can do this easily by enumerating the processes from Process.GetProcesses , find the right process, and then get the main window handle using Process.MainWindowHandle .
This still doesn't change the fact that the window needs to be active (i.e., in the foreground) to get the entire image. Windows (a window manager) draws a 2D surface and nothing more. While a window appears to be "behind" another, it's actually just that the foreground window is being painted in place of the "hidden" regions. In order to accomplish what you want, you'd have to create a virtual frame buffer of sorts in which the window would be paintined in its entirety instead of to the screen buffer, which is all but trivial and would still pose problems (believe me, it's not an easy thing - especially in higher-level languages like C3 and others that target the CLR).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
[sarcasm: on]
All but trivial? Eh, just write all the window painting routines in DirectX, then peel the image from the surface backbuffer
[sarcasm:off]
As far as I know, there's no way to "get at" the 2d image of a given window without activating it. Windows doesn't store a background image of each running app, it relies on the paint routines to draw them on the fly.
Jeremy Kimball
|
|
|
|
|
I was wonedering if you would mind giving me a C program that convert NFA to DFA.
|
|
|
|
|
Here is C# forum Try this[^] forum.
Mazy
"Man is different from animals in that he speculates, a high risk activity." - Edward Hoagland
|
|
|
|
|
And you probably won't get any help there, either, since this sounds like a homework question and we don't just hand over source for homework. There is a reason you're being asked to solve this kind of problem.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
exaclty. if you don't learn it by yourself, you'd get nothing from the class.
i remember i didn't like those theoretical types of problems from my early classes, but once you get to senior or graduate level, you'll start appreciating the theory you've learnt.
|
|
|
|
|
My brain must not be working quite right today....what are NFA and DFA?
|
|
|
|
|
(Non-)deterministic Finite-state Automaton. A DFA has a possible outgoing transition to the next state for every defined input. An doesn't necessarily have a transition for every defined input.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi, I want to build MDI Application. I got success in 1st level of MDIChild forms now the problem is that if these MDI child form open new forms those forms cannot be included as MDI child becoz those are child forms of the MDI child form. So could u plz tell me how to proceed in this, to build an application in which all forms as child forms of the main MDI form. or is there any other wayout. Thanks for ur support.
Inpreet Singh
|
|
|
|
|
If you want a child form to launch another child form, try this in your child form:
Dim newChild As New ChildForm2
newChild.MdiParent = Me.MdiParent
I haven't tested this method so I couldn't tell you if it works or not. Also, if you have any tracking code in your MDI Parent for tracking various aspects of your children, that code isn't going to work anymore.
RageInTheMachine9532
|
|
|
|
|
Hello Sir,
As MDIChild cannot be again MDI Parent that why i cannot run this code. There must be some other wayout to include 2nd level or further level forms into as main MDI Child form.
Inpreet Singh
|
|
|
|
|
How many times do we have to tell you that WINDOWS DOES NOT SUPPORT THIS! Rethink your design because it's not going to happen! Unless you want to write your own Window Manager and Window Classes! Good Luck!
RageInTheMachine9532
|
|
|
|
|
This is the THIRD time you've asked this, and with the first two times several people told you that the .NET Framework - and the Windows Management APIs that they encapsulate - do not support this. You'll have to create your own window management APIs in .NET in order to do this, so please quit asking how to use the MDI support in .NET because it will not work.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Do u know how to use BPEL4WS through c#
TEST
|
|
|
|
|
Hi. Unless you really want answers like "yes" and "no", you should post more detailed questions, such as "I've tried to do ...., but it doesn't behave as expected. Here is the code ... What did I do wrong?" or "What is the best way of handling client side communication with a web service?" or "What is a good way to write a web service?".
The more detail you provide in your question, the better the answers can be.
John
"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek.
|
|
|
|
|
Hey
I have a listview as a System Controller, that i have implemnted into a client server chat.
this listview is keeping trac of the online users and if thay are blocked or private or Public.
If the user is
private = the bakground on this row is painted blue
Public = the bakground is default(white)
Block = the backgraound is red
Problem:
when i start up the first client and joins it to the server, there is no problem al is woking fine, if i start up a second client and join the server, the first client as adding the user propely with the right background.
But the second client that just loggd on gets a strange update error with the bakgraound colors. It recives the user list and add the users thatwas loggdon before the second client, and in this case its just the first client.
The update error on the ListView in the second client is as following.
The bakground color that shows if the user is private,blockt or public is not painting properly, its only filling half of the rows with the colors, tha only way to get it updated is to move another window over the listvew and then it updates and show the proper colors.
Do you got any ide how i shold update my listview so this problem not accures? its strange that the first client is not getting the update error and only the second client.
Is ther maby a UPDATE funktion that i can use so al in the control will repaint?
//Jimmy
|
|
|
|
|
The funktion Control.Invalidate() can tell the ListView that it is time to repaint itself.
|
|
|
|