Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
What's the best way for me to convert this VB5 ActiveX.exe to VB.2010?
There are two programs;
1. EDMpuntr.exe Standard.exe
2. EDMviewr.exe ActiveX.exe
 
EDMpuntr sends an image path to EDMviewr which displays the image. EDMpuntr gets the path from a DOS database which shells out to EDMpuntr with the path. All I'm trying to accomplish is pass a path from a DOSapp to a WINapp and have the focus return to the DOSapp.
'***********EDMpuntr code**********************
Option Explicit
Private WithEvents weEDMConnector As EDMConnector
Private Sub weEDMConnector_EDMDone()
    Unload frmEDMPunt
End Sub
Private Sub Form_Load()
    Set weEDMConnector = New EDMConnector
    frmEDMPunt.Text1.Text = UCase(Command())
    weEDMConnector.ImageView frmEDMPunt.Text1.Text
End Sub
 ‘************EDMviewr code ****************
'The FORM has a picture box and menus

'CLASS MODULE

Public Sub ImageView(ImagePath As String)
 
    frmMain.Caption = "EDM Main - ImageView " & ImagePath
    frmMain.oleImgAdmin1.Image = ImagePath
    frmMain.oleImgEdit1.Image = ImagePath
    frmMain.oleImgEdit1.FitTo 0, False 'BestFit don't display
    
    frmMain.oleImgEdit1.Display
   RaiseEvent EDMDone
End Sub
Posted 31-Aug-12 10:42am
Edited 31-Aug-12 11:09am
(no name)105.8K
v3
Comments
Kenneth Haugland at 31-Aug-12 16:48pm
   
I'll bet it would be easyer to just start in VB.NET and program it from scratch. Though it does not seems to be very difficult to achive.
RichEcode at 31-Aug-12 17:05pm
   
Can you give me an example? VB.2010 is a bit over my head.
pdoxtader at 1-Sep-12 15:09pm
   
You didn't give us enough here to be able to give you an example. I agree with Kenneth though - just rewrite it in vb.net. I think you'll be surprised how much easier it is then you think. If you have questions along the way, I'm sure you'll find lots of people here willing to help.
RichEcode at 6-Sep-12 10:16am
   
An example of a VB5 ActiveX.exe converted to VB.NET 2010. Just the ActiveX communications is all I need or an simple "Hello World" VB.2010 console app sending a msg to a VB.2010 WinForm app. I've got all the VB5 graphics converted and I'm currently using FileSystemWatcher to notify the VIEWER to display an image. It works, but I was wanting something cleaner.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 31 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100