Re: Mike D Sutton please need help....



Now that I have the graphical part arranged (thanks to Mike) I need to
load some stuff
on my page from a recordset.
I have been trying to get things in a function but I can't seem to get
my fingers behind it.
It is rather complex with six entities and so many linked tables.

What I'm trying to do is the following.
I want to display a record from an entity (can by a Person, Event,
Vehicle and so on...)
The entity is related to other entities. For example a Person is
related to several Events and a Vehicle.

So I need to load the Person on the page with:

Private Sub Form_Load()

Dim theName As String
Dim B As Box

Set rs = dbfASIC.OpenRecordset(SearchStr, dbOpenDynaset)
theName = rs.Fields("BID")

Font.Size = 24
Boxes.Add NewBox(Me.ImageList1.ListImages(1).Picture, _
LinkAnalysis.ScaleWidth \ 2, LinkAnalysis.ScaleHeight \ 2, _
UCase(rs.Fields("family_name")) & ", " & rs.Fields("first_name"))

End Sub

And then with the id-field (BID) I need to get all the records that the
person is linked to:
for example to other people:

strBio = "SELECT Biographies.BID, Biographies.family_name,
Biographies.first_name " & _
"FROM Biographies AS Biographies_1 INNER JOIN (Biographies
INNER JOIN " & _
"BiographiesPerBiographies " & _
"ON Biographies.BID = BiographiesPerBiographies.BID) " & _
"ON Biographies_1.BID = BiographiesPerBiographies.Bio " & _
"WHERE Biographies_1.BID = " & sID & " ORDER BY
Biographies.family_name"

CircPts = GetCirclePoints(rs2.RecordCount, CircleHeight, Me.ScaleWidth
\ 2, Me.ScaleHeight \ 2)

rs2.MoveFirst
Do While rs2.EOF = False
For LoopPts = 0 To rs2.RecordCount - 1
With CircPts(LoopPts)
Font.Size = 24
Boxes.Add NewBox(Me.ImageList1.ListImages(1).Picture, .x, .y,
rs2.Fields("family_name") & ", " & rs2.Fields("first_name"))
Font.Size = 8
Ropes.Add NewRope(Boxes(1), Boxes(LoopPts + 2), " commander "
& LoopPts + 2, vbBlack)
End With
rs2.MoveNext
Next LoopPts
Loop

The related links will be shown with a Box and a Rope connecting them
with the entity.
So I have to do the above for all the other related entities.
The problem is that I first need the total of related records so I can
define the:
CircPts, otherwise I can do the math thing to make a need circle.

Sounds complicated, and it is I think.

Marco



Mike D Sutton schreef:

great stuff but how do I combine my Form_Paint with your code?
<code snipped>

My code was simply how to find evenly spaced points round a central point, the idea was that you move each of your
'boxes' to these points and use your existing drawing code as-is. The lines/'ropes' use the objects as their end points
and as such draw correctly regardless of where they're put.
Hope this helps,

Mike


- Microsoft Visual Basic MVP -
E-Mail: EDais@xxxxxxxx
WWW: Http://EDais.mvps.org/

.



Relevant Pages

  • Re: Follow-up Note for DavidF and Mike
    ... can see the different image placeholders load along with the ALT tags. ... adjust your layout so that nothing overlaps the navbar text box. ... Post back when you want Mike or I to look at it. ... The Kat wrote: ...
    (microsoft.public.publisher.webdesign)
  • Re: Reading the contents of a zip file
    ... > Mike, this is a great way to search the .zip for a file! ... > file and I want to load it into a picturebox, do I have to extract it first ... You would still need to extract it (unless the .ZIP file is stored using no compression in which case you can just offset to the ... headers but you've got both there should you wish to do some testing. ...
    (microsoft.public.vb.general.discussion)
  • Re: Reading the contents of a zip file
    ... Mike, this is a great way to search the .zip for a file! ... file and I want to load it into a picturebox, do I have to extract it first ... display the icon in a picturebox. ... preferably without third party controls. ...
    (microsoft.public.vb.general.discussion)
  • Re: Load Assembly Type.GetType("Class,Assembly")
    ... Thank you Mike, i tried the fully qualified name but the samething happened ... > Your right - it should load the type correctly if assembly can be found. ... >> command and it it returns null, is there any clues for what i'm missing. ... >> Regards, ...
    (microsoft.public.dotnet.framework)
  • To Mike D Sutton...need help..again
    ... Mike this is a repost from an earlier email I think you didn't see. ... "FROM Biographies AS Biographies_1 INNER JOIN (Biographies ... CircPts = GetCirclePoints(rs2.RecordCount, CircleHeight, Me.ScaleWidth ... CircPts, otherwise I can do the math thing to make a need circle. ...
    (microsoft.public.vb.winapi.graphics)