please excuse me for this lenghty post
i am an orthodontic surgeon and i am working on a small
project in VB6 to help me make some studies on scanned
x-ray films of human head taken in side pose, where i will
be making measurements between some standard anatomic
points, some times drawing lines connecting predefined points
and most of the times finding the angles between such lines
connecting 3 points.
i intend to put a dot on the image when i click the mouse.
the dot should be movable on the screen, since i might
have to repoition the dot to make it accurate.
then there will be options to connect these lines as particular
study reqires.
i have succeded only to some extent with out using any 3rd party tools.
GRAPHICSMILL looks very clever and resourceful.
i decided to learn using this by exploring the help documentation
to understand the options i need and that this particular tool is giving
(since the hospital where i work and live is remote village and feasibility of
procuring a VB expert is just next to impossible)
the problem is that i donot know how to start using the objects
that this particular tool gives.
for example i tried to test how the bezier curve is generated by the
code that the help documentation shows :
=================================
[Visual Basic 6]
Code:BitmapViewer1.AutoUpdate = False
With BitmapViewer1.Bitmap
.CreateNew 185, 145, Format24bppRgb
.Graphics.Engine = DrawingEngineGdiplus
'Draw line
.Graphics.Pen.ForeColor = ColorRed
.Graphics.Pen.Weight = 5
.Graphics.DrawLine 10, 10, 100, 60
'Draw polyline
.Graphics.Pen.ForeColor = _
.Color.ModifyAlpha(ColorGreen, 150)
.Graphics.Pen.Style = PenStyleDash
.Graphics.Pen.Weight = 2
.Graphics.DrawPolyline Array(20, 30, 50, 2, 180, 30, 80, 140)
'Draw beizer
.Graphics.Pen.ForeColor = ColorBlue
.Graphics.Pen.Style = PenStyleSolid
.Graphics.Pen.Weight = 2
.Graphics.DrawBezier 5, 5, 20, 150, 165, 80, 175, 10
End With
BitmapViewer1.AutoUpdate = True
========================================
as i understand, i have to select the 2 aurigma components from
the project menu, then place a BitmapViewer1 on the form and
initiate the execution of the above code with an event.
but i get the following error:
Method CreateNew failed. Argument 'pixelFormat' has an
unappropriate value (given pixelFormat is not a member of
pixelFormat enumeration)
what i think is that i am unable to instantiate the class "Graphics"
in this test project.
how do i do it?
can any body kindly help me with this thing?
i am not that much good at programming.
kindly answer my question with all the points needed
keeping in focus that i might not be knowing some
points that you might think are trivial (silly)
(and if possible please drop a small project with source code
in which
1. i can add a colored point on the control with the
mouseclick,
2. can reposition it as needed
3. a text box which holds the x and y coordinates of the dot. i can use these coordinates
to draw lines on the image,
4. ability to draw lines between 2 points by selecting 2 points one after the other
if that much help is given to me, then i can work out my self and find distance, find angles)
please.... :S
Edited by user Monday, December 24, 2007 4:27:11 PM(UTC)
| Reason: Not specified