Hi all,
I just made the mistake of posting this question in the
Microsoft.Public.VB.General.Discussion group. I was told that VB 2005
Express is NOT VB. Oh, well, must have touched a nerve. Anyway, here's the
situation.
I am using VB 2005 Express to build a program and I have found that the
easiest way to generate a 'text page' (for viewing and/or printing) for my
app is to create an HTML page using the IE document object. I know, it's
crude, but serves my purpose well (I use this technique extensively in VB
Script). Here's my problem: I can get it to work by using 'late' binding
as such:
Dim oIE As Object
' instantiate Internet Explorer
oIE = CreateObject("InternetExplorer.Application")
oIE.left = 225
oIE.top = 75
oIE.width = 680 ' width of dialog...
oIE.height = 600
oIE.menubar = True
oIE.toolbar = True
oIE.statusbar = False
oIE.addressbar = False
oIE.Resizable = True
oIE.navigate("about:blank")
etc...
However, as you can see, I'm employing late binding. As such,VB 2005
Express requires me to turn off "Strict". I want to use 'early' binding,
but I can't find a reference for it. I guess I don't know what I'm looking
for.
Does anyone have the solution for me?
Thanks in advance...
Dick 3 2490
Throw a webbrowser control on a form and you are ready
see on the left in the toolbox
drag and drop
regards
Michel Posseth
"Dick Sutton" wrote: Hi all,
I just made the mistake of posting this question in the Microsoft.Public.VB.General.Discussion group. I was told that VB 2005 Express is NOT VB. Oh, well, must have touched a nerve. Anyway, here's the situation.
I am using VB 2005 Express to build a program and I have found that the easiest way to generate a 'text page' (for viewing and/or printing) for my app is to create an HTML page using the IE document object. I know, it's crude, but serves my purpose well (I use this technique extensively in VB Script). Here's my problem: I can get it to work by using 'late' binding as such:
Dim oIE As Object ' instantiate Internet Explorer oIE = CreateObject("InternetExplorer.Application") oIE.left = 225 oIE.top = 75 oIE.width = 680 ' width of dialog... oIE.height = 600 oIE.menubar = True oIE.toolbar = True oIE.statusbar = False oIE.addressbar = False oIE.Resizable = True oIE.navigate("about:blank")
etc...
However, as you can see, I'm employing late binding. As such,VB 2005 Express requires me to turn off "Strict". I want to use 'early' binding, but I can't find a reference for it. I guess I don't know what I'm looking for.
Does anyone have the solution for me?
Thanks in advance...
Dick
Dick,
In addition to Michel because you have everything almost ready probably is
this easier (not tested)
Dim oIE As New Webbrowser
' instantiate Internet Explorer
'oIE = CreateObject("InternetExplorer.Application")
And than you have to use probably some other names of properties.
oIE.left = 225 oIE.top = 75 oIE.width = 680 ' width of dialog... oIE.height = 600 oIE.menubar = True oIE.toolbar = True oIE.statusbar = False oIE.addressbar = False oIE.Resizable = True oIE.navigate("about:blank")
etc...
As general hint try to avoid forever the raw "object" in your program.
If you want to use really Internet Explorer than you have to set a reference
to SHDOCVW (Microsoft Internet Controls) and than tell to use that as
dim oIE as new ShDocVW.Interenetexplorer
I hope this helps,
Cor
Cor,
Thanks for the insight. I'll give it a try...
Dick
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:Oj****************@TK2MSFTNGP05.phx.gbl... Dick,
In addition to Michel because you have everything almost ready probably is this easier (not tested) Dim oIE As New Webbrowser
' instantiate Internet Explorer 'oIE = CreateObject("InternetExplorer.Application")
And than you have to use probably some other names of properties.
oIE.left = 225 oIE.top = 75 oIE.width = 680 ' width of dialog... oIE.height = 600 oIE.menubar = True oIE.toolbar = True oIE.statusbar = False oIE.addressbar = False oIE.Resizable = True oIE.navigate("about:blank")
etc... As general hint try to avoid forever the raw "object" in your program.
If you want to use really Internet Explorer than you have to set a reference to SHDOCVW (Microsoft Internet Controls) and than tell to use that as
dim oIE as new ShDocVW.Interenetexplorer
I hope this helps,
Cor
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: JD Kronicz |
last post by:
Hi .. I have an issue I have been beating my head against
the wall on for some time. I am trying to use late
binding for MS graph so that my end users don't have to
worry about having the right...
|
by: Zlatko Matić |
last post by:
I was reading about late binding, but I'm not completely sure what is to be
done in order to adjust code to late binding...
For example, I'm not sure if this is correct:
early binding:
Dim ws...
|
by: Chris |
last post by:
Greetings,
I'm trying to late bind a ActiveX DLL that was made with VB6 in C#. Can
you give me an example or URL of this? I've been trying to google it, just
cant find a straight answer. Thanks!
|
by: Martin Eyles |
last post by:
I have just turned on option strict in ASP/VB.net. I started by happily
going through and setting up all of the Dim statements with As clauses, and
making my cast explicit. However, I have now got...
|
by: Chris |
last post by:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim AESobj As Object
Dim boolResult As Boolean
Const HKEY_CURRENT_USER As Integer =...
| |
by: Jim Hubbard |
last post by:
http://www.eweek.com/article2/0,1759,1774642,00.asp
|
by: A_PK |
last post by:
I have problem databinding the DataGrid with DataView/DataSet after the
filter...
I create the following proceudre in order for user to filter as many as they
want, but the following code is only...
|
by: Toby Bradshaw |
last post by:
Hi,
Consider the following:
class A
{
public:
virtual bool foo() = 0;
};
|
by: =?Utf-8?B?cGJsYWNrYnVybg==?= |
last post by:
Summary
Getting the error message Run time error 424 Object Required when attempting
to assign a value to a C# COM visible property of type object.
I have created a COM visible class as below
...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |