I am replacing an ActiveX OCX that was created in VB6. It is used heavily in
a large VB6 program that I do not have the luxury of upgrading to .NET.
The new control must use a significant amount of code that was written in
C++ .NET for a web service.
In C++ .NET, I have the option of creating an MFC ActiveX Control. That
control loads onto a VB6 form just fine. But when I start including .NET
managed code, I run into compile errors.
I also have the option of creating a Windows Control Library (.NET). But
this doesn't load into the VB6 form, at least in the designer. This link
suggests this approach might work at runtime: http://p2p.wrox.com/topic.asp?TOPIC_ID=5542
This one sounds like what I want to do is completely impossible. http://www.dotnet247.com/247referenc...24/122843.aspx
Can my .NET code be used on by VB6 form? Can you point me to some
information on doing so? On writing a wrapper to do so?
Thanks!
dwilson 3 2122
OK, here are some links for anyone who wants to explore what I'm exploring: http://www.ondotnet.com/pub/a/dotnet...mshosting.html -- an
unsupported method that sometimes works. http://www.dotnet247.com/247referenc...55/276599.aspx -- Maybe works,
but munges the name.
"Daniel Wilson" <d.******@embtr ak.com> wrote in message
news:u5******** ******@TK2MSFTN GP14.phx.gbl... I am replacing an ActiveX OCX that was created in VB6. It is used heavily
in a large VB6 program that I do not have the luxury of upgrading to .NET.
The new control must use a significant amount of code that was written in C++ .NET for a web service.
In C++ .NET, I have the option of creating an MFC ActiveX Control. That control loads onto a VB6 form just fine. But when I start including .NET managed code, I run into compile errors.
I also have the option of creating a Windows Control Library (.NET). But this doesn't load into the VB6 form, at least in the designer. This link suggests this approach might work at runtime: http://p2p.wrox.com/topic.asp?TOPIC_ID=5542
This one sounds like what I want to do is completely impossible. http://www.dotnet247.com/247referenc...24/122843.aspx
Can my .NET code be used on by VB6 form? Can you point me to some information on doing so? On writing a wrapper to do so?
Thanks!
dwilson
http://www.dotnet247.com/247reference/msgs/4/20375.aspx
Long discussions comes to the conclusion that this was SUPPOSED to be
supported, but was cut out. Maybe we'll get it at some point in the
future????
I'm not the only developer who NEEDS to do this ... directly or through some
workaround. I realize MS thought developers would more often need to put
old controls into new projects, but it really DOES go both ways.
For a week now, I've been instantiating a .NET control at runtime from VB6,
but the lousy thing won't show up on the screen. Its Visible property is
true ... but it can't be seen.
Since image display is what I'm working on here, I tried a BitBlt from the
..NET control's Handle to my VB6 PictureBox's hDC. No error, but no luck.
I AM managing to reach over to the .NET control's Image (that I'm exposing)
with a GetPixel call, then paint pixel-by-pixel in VB6. Stinks, but may
work in my case.
dwilson
"Daniel Wilson" <d.******@embtr ak.com> wrote in message
news:ei******** *****@TK2MSFTNG P11.phx.gbl... OK, here are some links for anyone who wants to explore what I'm
exploring: http://www.ondotnet.com/pub/a/dotnet...mshosting.html -- an unsupported method that sometimes works. http://www.dotnet247.com/247referenc...55/276599.aspx -- Maybe works, but munges the name.
"Daniel Wilson" <d.******@embtr ak.com> wrote in message news:u5******** ******@TK2MSFTN GP14.phx.gbl... I am replacing an ActiveX OCX that was created in VB6. It is used
heavily in a large VB6 program that I do not have the luxury of upgrading to .NET.
The new control must use a significant amount of code that was written
in C++ .NET for a web service.
In C++ .NET, I have the option of creating an MFC ActiveX Control. That control loads onto a VB6 form just fine. But when I start including
..NET managed code, I run into compile errors.
I also have the option of creating a Windows Control Library (.NET). But this doesn't load into the VB6 form, at least in the designer. This link suggests this approach might work at runtime: http://p2p.wrox.com/topic.asp?TOPIC_ID=5542
This one sounds like what I want to do is completely impossible. http://www.dotnet247.com/247referenc...24/122843.aspx
Can my .NET code be used on by VB6 form? Can you point me to some information on doing so? On writing a wrapper to do so?
Thanks!
dwilson
For anybody following this ... or digging it up in the future ...
My control is an image-rendering thing. So I have managed to cheat by
running it invisible with an VB6 wrapper OCX that passes all the parameters
through. When it's time to display the image, my wrapper tells the control
to dump the image to a JPEG, then loads it up itself. The cheat is working
well enough to go into production.
I have some other issues ... right now dealing w/ a
WindowsFormsPar kingWindow message that pops up w/ an access violation when
the VB6 form hosting my VB6 wrapper OCX hosting the .NET control closes.
I'll let you know if/when I get a good solution.
dwilson
"Daniel Wilson" <d.******@embtr ak.com> wrote in message
news:ON******** *****@TK2MSFTNG P10.phx.gbl... http://www.dotnet247.com/247reference/msgs/4/20375.aspx
Long discussions comes to the conclusion that this was SUPPOSED to be supported, but was cut out. Maybe we'll get it at some point in the future????
I'm not the only developer who NEEDS to do this ... directly or through
some workaround. I realize MS thought developers would more often need to put old controls into new projects, but it really DOES go both ways.
For a week now, I've been instantiating a .NET control at runtime from
VB6, but the lousy thing won't show up on the screen. Its Visible property is true ... but it can't be seen.
Since image display is what I'm working on here, I tried a BitBlt from the .NET control's Handle to my VB6 PictureBox's hDC. No error, but no luck.
I AM managing to reach over to the .NET control's Image (that I'm
exposing) with a GetPixel call, then paint pixel-by-pixel in VB6. Stinks, but may work in my case.
dwilson
"Daniel Wilson" <d.******@embtr ak.com> wrote in message news:ei******** *****@TK2MSFTNG P11.phx.gbl... OK, here are some links for anyone who wants to explore what I'm exploring: http://www.ondotnet.com/pub/a/dotnet...mshosting.html --
an unsupported method that sometimes works. http://www.dotnet247.com/247referenc...55/276599.aspx -- Maybe
works, but munges the name.
"Daniel Wilson" <d.******@embtr ak.com> wrote in message news:u5******** ******@TK2MSFTN GP14.phx.gbl... I am replacing an ActiveX OCX that was created in VB6. It is used heavily in a large VB6 program that I do not have the luxury of upgrading to
..NET. The new control must use a significant amount of code that was written in C++ .NET for a web service.
In C++ .NET, I have the option of creating an MFC ActiveX Control.
That control loads onto a VB6 form just fine. But when I start including .NET managed code, I run into compile errors.
I also have the option of creating a Windows Control Library (.NET).
But this doesn't load into the VB6 form, at least in the designer. This
link suggests this approach might work at runtime: http://p2p.wrox.com/topic.asp?TOPIC_ID=5542
This one sounds like what I want to do is completely impossible. http://www.dotnet247.com/247referenc...24/122843.aspx
Can my .NET code be used on by VB6 form? Can you point me to some information on doing so? On writing a wrapper to do so?
Thanks!
dwilson
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: bebelino |
last post by:
Hello,
The following is up to now not very clearly to me. What ocxfiles to
use in A2000?
For example: The listview.
Now I use the one given in comctl32.ocx (Microsoft windows common
controls 5.0 (SP2). Earlier I've used the listview in mscomctl32.ocx
(or something like that), which gave me errors all the time.
My question now is: how do I know which ocx-files and so on are good
to use in Access? Is there a newer version of the...
|
by: (Pete Cresswell) |
last post by:
I'm getting nodes into the thing, but when the dust settles, only the root-level
nodes are visible.
I know they're there because .Nodes.Count gives the right number.\
But I don't really understand the significance of the Nodes.Add syntax - I'm
just slavishly plugging in values.
Viz:
---------------------------
|
by: John |
last post by:
Hi
How can I transfer across the tree control to client? Is there a dll which I
can just copy and register using regsvr32?
Thanks
Regards
|
by: Will |
last post by:
I'm working on a C# Windows Service that needs to monitor serial port
communication. Because the .Net framework does not include support for
serial communications, I've decided to use the Microsoft Communication
Control (MSCommLib) that comes with Visual Studio 6. It seems easy to use
and works well enough for me within the context of a Windows Application.
Because I need the serial ports to be monitored 24/7, however, a Windows
Service...
|
by: andy.g.ward |
last post by:
I keep getting this when trying to create an MFC activex control in a
c# windows service - anyone got any ideas what the missing module could
be???
Exception thrown : System.IO.FileNotFoundException: The specified
module could not be found.
at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid&
clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateWithoutLicense()
at...
| |
by: Vinay |
last post by:
Hi all,
Can we create an ActiveX (.OCX) control in ATL project type? Is project type
for creation of .OCX file can only be ActiveX MFC type?
If yes, Could you suggest me some Links?
My Requirement: To create an ActiveX control that could be include in a web
Page. This control has a DataGrid on it. Iam unable to do so in MFC ActiveX
projects.
Im using VS 6.0.
|
by: Lee Newson |
last post by:
Hi,
I have just written my first application using VB.NET. The app works fine
when i am running it within .NET for debugging purposes, however when i try
to run the app from the .exe file that .NET creates i get the following
error message:
"An unhandled exception of type 'System.IO.FileNotFoundException' occurred
in VisioTimeline.exe
|
by: Daniel Wilson |
last post by:
I am replacing an ActiveX OCX that was created in VB6. It is used heavily in
a large VB6 program that I do not have the luxury of upgrading to .NET.
The new control must use a significant amount of code that was written in
C++ .NET for a web service.
In C++ .NET, I have the option of creating an MFC ActiveX Control. That
control loads onto a VB6 form just fine. But when I start including .NET
managed code, I run into compile errors.
|
by: thescriptuser |
last post by:
Hi,
i create an ocx control in vb.6, it's working well but having some problems.
when i create ActiveXObject("Control.UserControl1") through javascript of my control in .aspx page
the error occurs 'Automation Server can't create object.'.
if i call this control and create object in simple html page which placed at other location instead of wwwroot then it works fine.
if i deploy my .net web project on webserver then i can't create...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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 we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |