Passing a VB6 pictureBox control handle to .Net?

A

Ara Ashikian

Is it possible to pass a VB6 pictureBox window handle to a .Net dll and have
the .Net Dll somehow cast it to the new Windows.Form pictureBox and draw on
it? I want to extend an existing VB6 app with new .net dll's that handle
the drawing on the VB6 form's pict box...

Or is it possible to wrap the .Net picturebox in a VB6 compatible user
control for direct use in VB6?

PS:
I reposted here after having posted to microsoft.public.dotnet.vb.general as
this appears to be a better/busier newsgroup. Sorry for the double posting.
I will use this newsgroup in future postings.
 
A

Armin Zingler

Ara Ashikian said:
Is it possible to pass a VB6 pictureBox window handle to a .Net dll
and have the .Net Dll somehow cast it to the new Windows.Form
pictureBox and draw on it? I want to extend an existing VB6 app with
new .net dll's that handle the drawing on the VB6 form's pict
box...

You could pass the handle to the .Net dll and call graphics.Fromhwnd to
create a graphics object to draw on. (untested)
Or is it possible to wrap the .Net picturebox in a VB6 compatible
user control for direct use in VB6?

I don't think so.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top