File Association

  • Thread starter Thread starter Charles A. Lackman
  • Start date Start date
C

Charles A. Lackman

Hello,

I have an app that allows me to Open a file, by right clicking it and
opening it with my program.

Public Sub New (Byval AFile as String)

The problem is that when you open the file this way, it does not allow me to
release the resources of the file so that I can save back to the opened file
(Actualy it is a bitmap).

When I use an OpenFileDialog box to open the file, I am easily disposing the
resources and have no problem saveing back to the file. The problem only
happens when I open the file using the
Public Sub New (Byval AFile as String).

Any Suggestions?

Chuck
 
Charles A. Lackman said:
Hello,

I have an app that allows me to Open a file, by right clicking it and
opening it with my program.

Public Sub New (Byval AFile as String)

The problem is that when you open the file this way, it does not allow me
to
release the resources of the file so that I can save back to the opened
file
(Actualy it is a bitmap).

When I use an OpenFileDialog box to open the file, I am easily disposing
the
resources and have no problem saveing back to the file. The problem only
happens when I open the file using the
Public Sub New (Byval AFile as String).

Any Suggestions?

Chuck

Not a dot'netty here (for a while anyway) but that just sounds wrong <g>....
in VB6, "strange" problems like this can be cured by placing the code in a
timer event and having that sub just enable the timer and return. btw...
'New' is a valid name for a sub? Looks a bit scary using reserved words for
method names... but, then again, I'm just visiting from another world <g>
 
Well, what I know about the .NET framework could be written around the
edge of a stamp with a blunt pencil. But I'll bet you can not execute
the following /single line of code/ to open a file:

Public Sub New (Byval AFile as String)

Is that sub really called "New"? What is the rest of the code in that
sub?

TC
 
Back
Top