|
visual basic 6
When I use webbrowser control,
I can write
WebBrowser.Document.parentWindow.execScript "window.alert=null;"
on WebBrowser_NavigateComplete2 event
now i use vbMHWB control, how to do it ?
当我在vb中使用webBrowser这个控件的时候,我可以在WebBrowser_NavigateComplete2这个事件
中执行WebBrowser.Document.parentWindow.execScript "window.alert=null;"这个方法,
现在,我使用了vbMHWB这个控件的时候,我怎么使用Js的execScript方法重载js的一些方法,比如window.alert=null;window.focus=null;等等在WebBrowser_NavigateComplete2这个事件中现在好像不支持,一运行会报error.怎么解决?
hi
|
|
|
|
|
<br />
<br />
Private Sub brwWebBrowser_DocumentCompleteWBEx(ByVal wbUID As Integer, URL As Variant, ByVal pDisp As Object, ByVal isTopLevel As Boolean, ByVal sDocSource As String) <br />
<br />
'IE中DHTML的属性和方法可以重写。当然alert,confirm, showModalDialog也不例外。<br />
brwWebBrowser.Document(iCur).parentWindow.execScript "window.alert=null;" '<------error here! access refuse 访问拒绝 <br />
brwWebBrowser.Document(iCur).parentWindow.execScript "window.confirm=null;"<br />
brwWebBrowser.Document(iCur).parentWindow.execScript "window.showModalDialog=null;"<br />
brwWebBrowser.Document(iCur).parentWindow.execScript "window.showModelessDialog=null;"<br />
brwWebBrowser.Document(iCur).parentWindow.execScript "window.open=null;"<br />
brwWebBrowser.Document(iCur).parentWindow.execScript "window.focus=null;"<br />
brwWebBrowser.Document(iCur).parentWindow.execScript "window.onunload=null;"<br />
brwWebBrowser.Document(iCur).parentWindow.execScript "window.attachEvent=null;"<br />
brwWebBrowser.Document(iCur).parentWindow.execScript "window.eval=null;"<br />
brwWebBrowser.Document(iCur).parentWindow.execScript "eval=null;"
hi
|
|
|
|
|
does some man get the code for NavigateError?
when website address error was wrong, there will be link to fixed webpage,,,
regards
henry
henry
|
|
|
|
|
What is it that you want ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
the code is for that , when user input a wrong website address and which address is unavailable or does not exist, the IE will be linked to a fixed website.
not sure it is clean or not, looking for your help,,,
regards
henry
|
|
|
|
|
So, all you should have to do in your NavigateError event handler is call Navigate to a known good page, like a local file or some other site.
|
|
|
|
|
Hi,
How to show a Crystal report without Database using VB6.
Thanks & Regards
Kumaran
|
|
|
|
|
Kumaran21cen wrote: How to show a Crystal report without Database using VB6.
After a quick google search, I don't think it is possible...
|
|
|
|
|
The only thing that's "very urgent" in a forum environment like CP, is the need to pee.
AFAIK, CrystalReports will only work in a database environment.
|
|
|
|
|
Dave Kreskowiak wrote: only thing that's "very urgent" in a forum environment like CP, is the need to pee
|
|
|
|
|
i want vb.net codes for update or change the values and save the changed or updated values in datagrid during runtime of vb.net windows application.
|
|
|
|
|
sathyan_8294 wrote: plz help...very very urgent...
As opposed to all the other questions, that are asked by people who don't care if they get an answer ? Please don't do this, imagine if everyone did, the forum would look like this:
Pease help
I need help !!!!
Urgent - help me !!!
Do you think that's useful ?
sathyan_8294 wrote: i want vb.net codes for update or change the values and save the changed or updated values in datagrid during runtime of vb.net windows application.
Your question is broad enough that it's obvious you've not bothered with google. It's also too broad to answer. Save the changes to where ? Is this ASP.NET or winforms ? What have you tried ? Why doesn't it work ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Looking at previous posts you had another 'plz help' message title in which the rules were explained. Again, please read the rules of the forum.
__________________
Bob is my homeboy.
|
|
|
|
|
And the only thing that's "very very urgent" in a forum environment like CP, is the need to pee. So, please, go to the bathroom first, then come back and explain your question in more detail when you don't need to pee so bad.
|
|
|
|
|
|
okay,
I've looked into using my.settings to change values of text boxes at run time. What I'd really like to do though, allow the user to save the current settings as "whatevername.xml", and then open that setting file whenever they want, changing the values of the text boxes. I'm not sure what to do as everything I've read uses either the app.config, or user.config files. Any ideas?
Thanks
|
|
|
|
|
The settings files have a save method, why don't you want to use them ?
You can use the XmlDocument class to create/load/save/modify any XML file you like.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi and thanks for your reply,
I realise that there is a save function, but doesn't that save them to the same app.config, or user.config files? I want the user to be able to enter a file name, and then later be able to choose which settings they want to open. Can this be done with the method you're mentioning? if so, can you please point me in the right direction?
Thank you
Bosko
|
|
|
|
|
Then create a serializable class to hold all of these values, binding the TextBox to the properties it exposes. Then all you have to do is serialize this object (an instance of your class) to an XML file using the XmlSerializer Class[^].
|
|
|
|
|
Co ai lam ve su kien mousemove ko ? Chi dung voi
|
|
|
|
|
|
Better language than english.......
Regards,
Arun Kumar.A
|
|
|
|
|
Arun.Immanuel wrote: Better language than english.......
You mean Plain English?
|
|
|
|
|
can you write event mousemove on combox ! help me ! thank you
|
|
|
|
|
thanhphuong1703 wrote: can you write event mousemove on combox ! help me ! thank you
Nope, you forgot to say the magic word...
|
|
|
|