Welcome Guest! You need to login or register to make posts.



Go to last post Go to first unread
#1 Posted : Friday, November 12, 2004 10:28:00 PM(UTC)

Rank: Member

Groups: Member
Joined: 11/12/2004(UTC)
Posts: 1

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]
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
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

#2 Posted : Tuesday, November 16, 2004 6:17:00 PM(UTC)

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 863

Thanks: 2 times
Was thanked: 25 time(s) in 25 post(s)

Please excuse me for a delay.

Regarding "Method CreateNew failed" problem. It seems you need also add a reference to Graphics Mill 2.0 type library which contains all these constants as FormatXXX, ColorXXX, etc. The problem is that VB do not know what means Format24bppRgb and replaces it by 0. If you add "Option Explicit", compiler will display a error.

Just follow these steps:

1. Open Project -> References menu.
2. Find item "Aurigma Graphics Mill 2.0" and set a checkbox for this item.

Regarding the code sample, please submit case with it. I will send you a simple project which demonstrates how to implement the features you listed.

Edited by user Friday, May 23, 2008 3:48:58 PM(UTC)  | Reason: Not specified

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.