Develop basic WinAPI drawing capability using Visual Basic

Closed Posted Jun 29, 2004 Paid on delivery
Closed Paid on delivery

**Purpose.**

This project implements WinAPI drawing functions with a commercial OCX product in a Visual Basic environment. The goal of the project is to add a drawing capability using WinAPI by adding a “Layer?? capability where the drawing occurs on the Layer and the resulting drawing can be saved to a Bitmap file.

**Description.**

1. The foundation for this application is the use of a commercial OCX called Apicture ([[login to view URL]][1]). This product provides an extensive set of Methods and Events for creating drawing objects. The attached VB project implements a very basic project using the OCX. In the example provided, a BMP is loaded onto the Form. In Apicture, this is called loading the picture to the Canvas. Other Methods provided allow you to place other BMPs, lines, circles, text, etc onto the Canvas. All of these objects are selectable and can be moved around on the Canvas and saved.

2. The Apicture OCX also provides Methods for WinAPI development. The Methods/Properties provided are: GetDevice, ReleaseDevice, hDCTarget, Target, GetBitmapDC. These give you the ability to fully extend the capabilities of Apicture to implement WinAPI into the product. This project will utilize the APicture methods/properties to create multiple Layers over the basic picture.

## Deliverables

**Task 1**. Develop the capability to draw to a “Layer?? above the Apicture Canvas.

**Subtask A**. Develop a procedure to create the Layer above the Canvas (containing a background BMP). This Layer will be used to draw graphics (lines, circles, rectangles) using the APicture methods/properties. This Layer will can be toggled on/off with a user control.

**Subtask B**. Develop a procedure to draw a Line onto the Layer. The Form will contain Textbox’s which the user enters a pixel length and angle (0 to 360 degrees). When the User clicks on the Form, a line is drawn on the Layer to the desired length and angle.

**Subtask C**. Develop a procedure to draw a Circle of a set radius onto the Layer. The Form will contain a Textbox or other GUI method (listbox, dropdown listbox, scrolling listbox, etc.) which the user enters a circle diameter. When the User clicks on the Form, a circle is drawn on the Layer to the desired pixel diameter. The circle must contain radials at a set interval around the circle. The user will be able to click multiple clicks that draw a circle and the previous circle is cleared from the screen.

** Subtask D**. Develop a procedure to draw a “Rubberband?? like line as the Mouse is moved on the Layer. This should be implemented as follows: (1) User clicks Button “Draw Moveable Line?? (2) User clicks on Layer (3) As Mouse is moved a line is draw from the base point (first click location) and ends at the Mouse current location. Note: The line will disappear and be redrawn as it moves so as to appear to be just one line. (4) Action will be ended when the user double-clicks the Mouse.

**Task 2**. Develop the capability to Save the Layer to a Bitmap file. The Coder can hard code a filename and the file will be saved to that name when the “Save Bitmap?? button is clicked.

**Additional Information.**

1. A Visual Basic project is attached that implements the Apicture OCX in a very basic form. The Demo Installer for this product is contained in the Pic folder. You can also download the product at [[login to view URL]][1]. You should refer to the Apicture Help for a full description of the product Methods/Properties/Events.

2. The Coder can provide additional information that can lead to expanding this project beyond the tasks outlined in this project.

## Platform

Win 2000/XP

C Programming Engineering MySQL PHP Software Architecture Software Testing Visual Basic

Project ID: #3263657

About the project

4 proposals Remote project Active Jul 20, 2004

4 freelancers are bidding on average $119 for this job

illuminesoft

See private message.

$127.5 USD in 30 days
(331 Reviews)
7.5
silkroutesl

See private message.

$127.5 USD in 30 days
(126 Reviews)
6.6
ewizardvw

See private message.

$93.5 USD in 30 days
(1 Review)
0.8
thegreatwall

See private message.

$126.65 USD in 30 days
(1 Review)
0.0