Upgrading code from VB6 to VB.Net

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Casper (casper_2k3_at_msn.com)
Date: 02/14/05


Date: 14 Feb 2005 14:52:44 -0800

Hi there.

I've been searching the internet for weeks now trying to find out the
fix to
my problem (below) but I don't seem to be getting anywhere!

I'm using Visual Basic 2005 2005 Express Edition (Beta) and am having
some
problems upgrading code from VB6 to VB.Net.

I'm pretty much a newb when it comes to VB, but I've completed a lot of
my
program, I'm just having trouble with this part.

The following module changes some of the binary values in the program,
but
VB is coming up with errors:

=START CODE =
Module Patch

Public Sub Patch()

Open "C:\Program Files\My Program\myprog.exe" For Binary As #1

Put #1, &HDFFE2, "¶"

Close #1

End Sub

Public Sub UnPatch()

Open "C:\Program Files\My Program\myprog.exe" For Binary As #1

Put #1, &HDFFE2, "·"

Close #1

End Sub

End Module

=END CODE=

Also, could someone tell me how to call the functions 'Patch' and
'UnPatch'
from the form.

Thanks in advance for your assistance.

Casper.



Relevant Pages

  • Upgrading code from VB6 to VB.Net
    ... update program, I'm just having trouble with this final part. ... Public Sub Patch() ... Public Sub UnPatch() ...
    (microsoft.public.dotnet.languages.vb)
  • Getting Overload error with ASP.NET using VB
    ... with these arguments: 'Public Sub Add(item As ... Public Sub LoadSites() ... Anyone know how to fix this? ... Prev by Date: ...
    (microsoft.public.dotnet.languages.vb)