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

  • Home
  • SEARCH
  • 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 896737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:46:36+00:00 2026-05-15T14:46:36+00:00

i have this code Bitmap bmp1, bmp2, bmp3,bmp4; Graphics gp2,gp3; if (bmp2 == null)

  • 0

i have this code

Bitmap bmp1, bmp2, bmp3,bmp4;

        Graphics gp2,gp3;



if (bmp2 == null)
                {
                    bmp2 = new Bitmap(pictureBox1.Height, pictureBox1.Width); 
                }
                    gp2 = Graphics.FromImage(bmp2);

                   // Rectangle rect = new Rectangle((float)(pictureBox1.Width / 2),(float)(pictureBox1.Height / 2),width, height);
                    gp2.DrawImageUnscaled(bmp1,0,0);
                    gp2.FillEllipse(Brushes.Red, (float)(pictureBox1.Width / 2), (float)(pictureBox1.Height / 2), width, height);


                    gp2.Dispose();

but i am unable to release the control of gp2 as i want to give its control to gp3;

help required???

  • 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-15T14:46:37+00:00Added an answer on May 15, 2026 at 2:46 pm

    I think you should just be able to dispose of the Graphics and then call Graphics.FromImage again. I don’t believe disposing of the Graphics will dispose of the underlying Bitmap. Have you tried it?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 499k
  • Answers 500k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This is not pretty but it works: rm -R $(ls… May 16, 2026 at 12:45 pm
  • Editorial Team
    Editorial Team added an answer Yes. Override the base1 and base2 methods in Derived to… May 16, 2026 at 12:45 pm
  • Editorial Team
    Editorial Team added an answer No, you can't. Unfortunately, UIEvent doesn't expose any public way… May 16, 2026 at 12:45 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have this code: if (archivoBinario != null) { MemoryStream ms = new MemoryStream(archivoBinario);
I have some code that does something like this (Irrelevant bits snipped): void foo(Bitmap
I have this code that draws a Rectangle ( Im trying to remake the
i have this code snippet private List<string> FolderOne(string Folder) { string filena; DirectoryInfo dir
Problem Hello all! I have this code which takes my jpg image loops through
I have this code: if (PsionTeklogix.Keyboard.Keyboard.GetModifierKeyState(Key.Orange) == KeyState.Lock) PsionTeklogix.Keyboard.Keyboard.InjectKeyboardCommand(Function.Orange, 0, 0); if (PsionTeklogix.Keyboard.Keyboard.GetModifierKeyState(Key.Blue) ==
I have this code in my controller for Index view.. public ActionResult Index(int? id)
i have this code where you can select the date you like to attend
This may have been answered elsewhere but I could not find a suitable response.
I have this method for shrinking down an image for a website that I'm

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.