Hi Option Strict gurus,
Because of the so much given advises here to use Option Strict I did try to
use that.
But it gives an error and I don't know how to resolve that.
The message is that Option Strict disallowes late binding. So how to do it
then?
The statement is from an example somewhere on MSDN
(And don't ask why I use the Ax version from SHDOC, that is just because it
has more methods)
\\\\\\\\\\\\\
Private Sub AxWebBrowser1_DocumentComplete(ByVal sender As System.Object,
ByVal e As AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent ) Handles
AxWebBrowser1.DocumentComplete
eDocuments.Add(e.pDisp.Document)
End Sub
/////////////
Cor 13 3233
Hello,
"Cor" <no*@non.com> schrieb: Because of the so much given advises here to use Option Strict I did try to use that. But it gives an error and I don't know how to resolve that. The message is that Option Strict disallowes late binding. So how to do it then? The statement is from an example somewhere on MSDN (And don't ask why I use the Ax version from SHDOC, that is just because it has more methods) \\\\\\\\\\\\\ Private Sub AxWebBrowser1_DocumentComplete(ByVal sender As System.Object, ByVal e As AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent ) Handles AxWebBrowser1.DocumentComplete eDocuments.Add(e.pDisp.Document) End Sub
How is eDocuments defined? Where exactly do you get the error?
Regards,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET http://www.mvps.org/dotnet
Hi,
Thanks all, it did bring me on the route for this nice sunday puzzle.
It is not the eDocuments that gives the error, sorry that I did not say
that(That is a collection, but after all the post I have seen I will change
it in an arraylist).
It is the e.pdisp.Document (that is as far as I can see from the type
mshtml.htmldocument)
If you know the answer please let me know, otherwise I give my results in
the evening OK?
Cor
Charles,
Thanks no gives the same problem.
I think I will look if I can avoid the axwebbrowser which was I thougt in
2002 and removed in 2003,
the pdisp has the object system._ComObject.
I maybe start to understand why.
Don't spend any time anymore on it, it was just my curiosity.
Cor
Hello,
"Cor" <no*@non.com> schrieb: Thanks no gives the same problem. I think I will look if I can avoid the axwebbrowser which was I thougt in 2002 and removed in 2003, the pdisp has the object system._ComObject. I maybe start to understand why. Don't spend any time anymore on it, it was just my curiosity.
That's one of the rare cases where I would turn 'Option Strict' off. I hope
they will introduce Option-blocks in a future release:
\\\
Option Strict On
..
..
..
Option Strict Off
Herfried,
I am glad you wrote that, thanks
(Do you think Armin will read this)
:-)
Cor
In theory, you can have a pseudo-option block, by putting the code into a
module, in a different file, putting Option Strict Off at the top of the
file, and just calling the method that the code is within. Then you don't
need to turn off Option Strict globally, or even for the code-file you are
working with.
--
HTH,
-- Tom Spink, Über Geek
Please respond to the newsgroup,
so all can benefit
"Maybe it's a game called 'Punish the User'"
"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:eu**************@TK2MSFTNGP12.phx.gbl... Hello,
"Cor" <no*@non.com> schrieb: Thanks no gives the same problem. I think I will look if I can avoid the axwebbrowser which was I thougt
in 2002 and removed in 2003, the pdisp has the object system._ComObject. I maybe start to understand why. Don't spend any time anymore on it, it was just my curiosity. That's one of the rare cases where I would turn 'Option Strict' off. I
hope they will introduce Option-blocks in a future release:
\\\ Option Strict On . . . Option Strict Off . . . End Option . . . ///
;-)
Regards, Herfried K. Wagner -- MVP · VB Classic, VB .NET http://www.mvps.org/dotnet
Hello,
"Cor" <no*@non.com> schrieb: I am glad you wrote that, thanks (Do you think Armin will read this)
I didn't see him in the ngs today. Maybe he is on holidays now.
;-)
Regards,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET http://www.mvps.org/dotnet
Charles,
I try it,
It is weekend, I have to make dinner now, now said my wife.
I message you later.
Thanks even if it does not work.
Cor
Charles,
I had dinner and I told often to Herfried what that means, but
My new gallary of Honnor is "Bill Gates, Herfried, Jay B, Charles"
Tomorrow I go examine what you did
Thanks
Charles,
I think I start to understand now what happens, and am not only copying that
part.
This is to what I did bring it back.
Dim wb As SHDocVw.WebBrowser = DirectCast(e.pDisp, SHDocVw.WebBrowser)
eDocuments.Add(wb.Document)
Thanks again of course.
Cor
"Cor" <no*@non.com> schrieb Herfried, I am glad you wrote that, thanks (Do you think Armin will read this) :-) Cor
He does - and he doesn't linke it. ;-))))))
--
Armin
Got a few chins there, Armin.
--
HTH,
-- Tom Spink, Über Geek
Please respond to the newsgroup,
so all can benefit
"Maybe it's a game called 'Punish the User'"
"Armin Zingler" <az*******@freenet.de> wrote in message
news:#2**************@TK2MSFTNGP10.phx.gbl... "Cor" <no*@non.com> schrieb Herfried, I am glad you wrote that, thanks (Do you think Armin will read this) :-) Cor
He does - and he doesn't linke it. ;-))))))
-- Armin
And it is almost done with the help of Charles This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Microsoft News |
last post by:
I have a project that was created all with Option Strict OFF. Works great,
not a problem with it. But if I turn Option Strict ON then I get a LOT of
errors.
My question, should I even care...
|
by: Euphor2 |
last post by:
I'm in school, taking a VB .NET 2003 course, and the
teacher taught us how to use Sender.Focus() to return
focus to the control from which focus was received.
However, when I got home, and tried...
|
by: Bruce W. Darby |
last post by:
This will be my very first VB.Net application and it's pretty simple. But
I've got a snag in my syntax somewhere. Was hoping that someone could point
me in the right direction.
The history:
My...
|
by: C. Moya |
last post by:
I fully expected the lack of a way to set Option Strict globally to be fixed
in SP1. I can't seem to figure out if it has been fixed or not. It still
seems we have to add the declaration at the top...
|
by: Jerad Rose |
last post by:
I believe this issue is specific to ASP.NET. Why does VB.NET (2.0) ignore
the project-level setting for Option Strict?
I have the setting turned on in web.config:
<compilation debug="true"...
|
by: Michael Jenck |
last post by:
Hi All,
I have been playing with the codedom and can't get it to output for
option compare Binary with a CodeCompileUnit. I have searched the web
and Don't now if it's possible. If it's not...
|
by: Lynn |
last post by:
Hello,
I have a website that is working fine. I have just turned on "option strict"
and am getting an error with the parts of my code. I have fixed everything
but this section, which has me...
|
by: Rory Becker |
last post by:
A wise man once said: "Never put off until runtime what you can fix at compile
time."
Actually I think he said it about 10 minutes before I started this post.
I am a firm believer, like the...
|
by: =?Utf-8?B?R3JlZw==?= |
last post by:
We have an application in our office that has the Option Strict option set to
off right now. I do understand it should be set to ON, but right now, I'm
just going to continue with it this way since...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |