Converting Applications to .NET

General discussions about GdPicture.NET.
Post Reply
nvprogman
Posts: 6
Joined: Mon Nov 22, 2010 9:55 pm

Converting Applications to .NET

Post by nvprogman » Wed Aug 08, 2012 1:14 am

Loïc,

I have 2 applications written in VB6 using gdPicture ActiveX that I need to get converted to VB.NET. The applications are very large and must continue to be supported during the (probably long) conversion. The best way I believe is to migrate pieces of the application using Com Interop. I would like to not have to reinvent the wheel from scratch and build off (or use as tutorial/starting point) the Com Interop UserControls released as part of GdPicture.NET. Is it possible you can release the code used to build the Com Interop Usercontrols? Or at least provide samples of how the UserControls were created? I can not just use the the GdPicture Com Interop UserControls as that would just continue on the path of VB6.

Thank you for your time and consideration.

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: Converting Applications to .NET

Post by SamiKharma » Wed Aug 08, 2012 4:51 pm

Hi,

It is impossible to convert pieces and keep both applications running, you can probably add using the new COM/Interop, but most probably not replace (even though I have my doubts about that too).
As for conversion, while we do understand that it might be consuming to support a product while developing (converting) another one, it will be harder to track problems and issues integrating two products together.
Finally, we really cannot share any of our code and make it public for any reason.

Best Regards,
Sami

nvprogman
Posts: 6
Joined: Mon Nov 22, 2010 9:55 pm

Re: Converting Applications to .NET

Post by nvprogman » Wed Aug 08, 2012 8:32 pm

I apologize I may not have been clear about what I am attempting to do. The scenario is I have a large application written in VB6 using the GdPicture ActiveX toolkit. I have 2 goals:

1. Migrate to GdPicture.NET.
2. Rewrite the necessary code for GdPicture.NET in VB.NET and wrap the code into 3 COM Interop UserControls (one for the scanning, one for GdViewer, and one for the ThumbnailEx) to allow the UserControls to be used in the VB6 code.

When I complete the conversion of the application above, I would repeat the process for a second application.

Microsoft provides the Interop Forms Toolkit to help accomplish this.

http://msdn.microsoft.com/en-us/vstudio/bb419144.aspx

I understand if GdPicture can not release it's source code. What I would like to ask for is an example on how to create COM Interop UserControls with VB.NET and GdPicture.NET that can be used in a VB6 application. Just simple example, I would like to create a Thumbnail UserControl that can be called by VB6 with the following:

bStat = MyGdThumbnailControl.MyLoadThumbnail(MyGdViewerContol.MyGdViewer)

where

MyLoadThumbnail is a public function in the MyGdThumbnailControl UserControl that does two things, clear the GdPicture.NET ThumbnailEx control then load the thumbnail from the passed GdPicture.NET GdViewer control (MyGdViewerContol.MyGdViewer) where MyGdViewerContol is also a COM Interop UserControl I created to wrap the GdViewer GdPicture.NET control.

I would think your other customers that have VB6 applications using GdPicture ActiveX have this same requirement when they need to upgrade to GdPicture.NET and VB.NET. Completely rewriting the entire application to VB.NET in one shot is likely not doable for large application. And using the included COM Interop UserControls released as part of GdPicture.NET is great if the application is to remain in VB6 only code but at some point in the future, that code is going to have to be converted to .NET.

Thanks again for your time.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests