Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5956783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:18:25+00:00 2026-05-22T18:18:25+00:00

I have a System.Drawing.Bitmap currently and I need to convert it into an stdole.StdPicture.

  • 0

I have a System.Drawing.Bitmap currently and I need to convert it into an stdole.StdPicture.
Currently I’m using:

var pic = (stdole.StdPicture)Microsoft.VisualBasic.Compatibility.VB6.Support.ImageToIPicture
                   (MyDLL.Properties.Resources.Img); // this is a System.Drawing.Bitmap

but I get a Compiler Warning:

Warning ‘Microsoft.VisualBasic.Compatibility.VB6.Support.ImageToIPicture(System.Drawing.Image)’ is obsolete: ‘”Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862

So what to use instead? I couldn’t find another solution yet…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T18:18:25+00:00Added an answer on May 22, 2026 at 6:18 pm

    taken from NetOffice http://netoffice.codeplex.com Office Addin Example

    public class IconConverter : System.Windows.Forms.AxHost
    {
       private IconConverter(): base(string.Empty)
       {
       }
    
       public static stdole.IPictureDisp GetIPictureDispFromImage(System.Drawing.Image image)
       {
    
          return (stdole.IPictureDisp)GetIPictureDispFromPicture(image);
       }
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a black and white System.Drawing.Bitmap I need to auto-crop it so that
I have a program that draws some vector graphics using System.Drawing and the Graphics
If I have a System.Drawing.Bitmap with equal dimensions e.g. 100x100, 50x50 and I wanted
When I try to save an image using either System.Drawing.Image.Save(String) or System.Drawing.Bitmap.Save(String) an exception
I have around 10 System.Drawing.Bitmap elements, which I want to dump to PDF. When
I have a drawing application developed in winforms C# which uses many System.Drawing.Bitmap object
I have a System.Drawing.Image in my program. The file is not on the file
I have an object of the type System.Drawing.Image and want to make every pixel
I have written the following IronPython code: import clr clr.AddReference(System.Drawing) from System import *
I'm trying to get a System.Drawing.Image (generated in a .NET dll) into a picture

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.