HighTechTalks DotNet Forums  

LoadPicture, SavePicture, StdPicture support in VB .NET ??

VB.net Upgrade microsoft.public.dotnet.languages.vb.upgrade


Discuss LoadPicture, SavePicture, StdPicture support in VB .NET ?? in the VB.net Upgrade forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
MarkB
 
Posts: n/a

Default LoadPicture, SavePicture, StdPicture support in VB .NET ?? - 10-12-2005 , 01:59 PM






Hi,

I'm trying to move some VB6 data and algorithms dealing with pictures and
images to VB.NET.

Is there a .NET equivalent of these VB6 commands (LoadPicture, SavePicture)?

I think StdPicture is defined in stdole ... so does that mean that VB.NET
can deal with such objects via Interop? I am writing a VB.NET app that has
to use a COM object that returns a StdPicture.

I am trying to see what's available in .NET VB6 compatibility but I can't
seem to add this library as a reference to my VB.NET project.

Thankful for any help ...

Blaise





Reply With Quote
  #2  
Old   
MarkB
 
Posts: n/a

Default Re: LoadPicture, SavePicture, StdPicture support in VB .NET ?? - 10-12-2005 , 02:25 PM






Oh, forgot to ask ... is there a way to convert a StdPicture to a .NET Image
??

thx



Reply With Quote
  #3  
Old   
Ole Nielsby
 
Posts: n/a

Default Re: LoadPicture, SavePicture, StdPicture support in VB .NET ?? - 10-13-2005 , 04:54 AM




MarkB <markb (AT) blaisesoftXXX (DOT) com> wrote:

Quote:
Oh, forgot to ask ... is there a way to convert a StdPicture to a .NET
Image
This might not be the simplest way, but if all else fails, go via GDI+.
The flat GDI+ API has methods that will turn handle/hpal into GDI+
images - you need to select the method according to the StdPicture type.
I don't know how to go from GDI+ to .NET but I think it is simple
since the .NET graphics are AFAIK based on GDI+.

HTH/ON/remove the slow slimy aniaml from my reply address




Reply With Quote
  #4  
Old   
Patrick Steele [MVP]
 
Posts: n/a

Default Re: LoadPicture, SavePicture, StdPicture support in VB .NET ?? - 10-20-2005 , 09:02 PM



In article <uOy$e81zFHA.2212 (AT) TK2MSFTNGP15 (DOT) phx.gbl>,
markb (AT) blaisesoftXXX (DOT) com says...
Quote:
Hi,

I'm trying to move some VB6 data and algorithms dealing with pictures and
images to VB.NET.

Is there a .NET equivalent of these VB6 commands (LoadPicture, SavePicture)?

I think StdPicture is defined in stdole ... so does that mean that VB.NET
can deal with such objects via Interop? I am writing a VB.NET app that has
to use a COM object that returns a StdPicture.
Add a reference to "Microsoft Visual Basic .NET Compatibility Runtime".
Then look at the Microsoft.VisualBasic.Compatibility.VB6.Support class.
It has a few methods that might help you out (i.e. "IPictureToImage" and
"IPictureDispToImage").

If you're just looking to load an image from disk, check out .NET's
System.Drawing.Image.FromFile() method.

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.