logo CodeStepByStep logo

MickeyBox

Language/Type: VB Graphics Bitmap

Assuming that a Bitmap named bmp has been declared and initialized, write code that draws the following figure onto the bitmap:

expected output
 

The image is 220 pixels wide and 150 pixels tall. The background is yellow. There are two blue ovals of size 40 x 40 pixels. The left oval's top-left corner is located at position (50, 25), and the two ovals' top-left corners are 80 pixels apart horizontally. There is a red square whose top two corners exactly intersect the centers of the two ovals. Lastly, there is a black horizontal line through the center of the square.

Bare code: Write a fragment of VB code as described, without any class or function/method heading around your code.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.