Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
VB
'***********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

VB
 ‘************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
Updated 31-Aug-12 10:09am
v3
Comments
Kenneth Haugland 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 31-Aug-12 17:05pm    
Can you give me an example? VB.2010 is a bit over my head.
pdoxtader 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 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900