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.

Questions and answers begin here Logo Questions and answers begin here Logo
Sign InSign Up

Questions and answers begin here

Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Blog
  • Contact Us

drawing

Home/drawing

Questions and answers begin here Latest Questions

Asked: 4 years agoIn: Programming

Equivalent of VB6’s PaintPicture method in VB.NET.

smeutatiana Teacher

I am new to VB.net and I am struggling with converting some existing code from VB6 to VB.net. Specifically, I am trying to find the equivalent of the VB6 PaintPicture method in VB.net. I have an image that I need ...Read more

I am new to VB.net and I am struggling with converting some existing code from VB6 to VB.net. Specifically, I am trying to find the equivalent of the VB6 PaintPicture method in VB.net. I have an image that I need to display on a form and I want to be able to paint it so that it fits properly within the form.
My current code is as follows:

Dim MyImage As Image = Image.FromFile("C:MyImage.bmp")
Me.BackgroundImage = MyImage

This code successfully displays the image on the form, but it does not allow me to scale the image or position it within the form. In VB6, I was able to use the PaintPicture method to accomplish this, but I cannot figure out how to do it in VB.net.
I have tried using various combinations of PictureBox and Image controls, but none of them seem to give me the same level of control as the VB6 PaintPicture method. I have also looked online for resources, but I have not been able to find anything that works for me. Can you please help me find a solution to this problem?

Read less
conversiondrawinggraphicsimagesmethodsvbvb.netvb6
  1. Dive into Turkish History
    Added an answer about 7 days ago
    Your answer is awaiting moderation.

    Explore the significant historical events that shaped Turkey on our website. It's a journey into the past.

    Explore the significant historical events that shaped Turkey on our website. It’s a journey into the past.

    See less
    • 0
    • Share
      Share
      • Share onFacebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  • 713
  • 3 Answers
  • 588 Views

Sidebar

Ask A Question

Stats

  • Questions 117
  • Answers 403
  • Best Answers 0
  • Users 5k
  • Popular
  • Answers
  • crisroxz

    Pine Script error: script could not be translated from `null`

    • 1 Answer
  • leguizamon_ailen

    1.7 Lab: Adjust values in a list by normalizing [Python]

    • 1 Answer
  • fabian_mgram

    Python String Class like StringBuilder in C#

    • 3 Answers
  • utxpiv_ added an answer The error "libpng warning iccp known incorrect sRGB profile" usually… March 31, 2023 at 12:34 pm
  • imamreshmahi added an answer One possible way to avoid the warning 'libpng warning iccp… March 18, 2023 at 7:34 pm
  • crazytibet added an answer When dealing with the Libpng warning ‘iCCP: known incorrect sRGB… March 15, 2023 at 3:40 pm

Top Members

bluzbear

bluzbear

  • 0 Questions
  • 101 Points
Pundit
krystianpanczak

krystianpanczak

  • 0 Questions
  • 101 Points
Pundit
idavidt5

idavidt5

  • 0 Questions
  • 101 Points
Pundit

Trending Tags

attributeerror c# command-line configuration debugging error error handling ImportError java javascript json module Node.js pandas programming python swift testing troubleshooting windows
  • Meet The Team
  • Blog
  • About Us
  • Contact Us

© 2017 - All Rights Reserved. Made with ❤️ in RO