DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Clyde Guest

    Graphics and storage


    Hi all...

    Is it possible with VB to store shapes and colours (e.g a red circle, a blue
    triangle...)in a database (preferably on access)and make an interface with
    VB to read this data and represent the corresponding shape and colour graphically?

    If so. In what direction do I have to search for more info.?

    Thankx

  2. #2
    Mike D Sutton Guest

    Re: Graphics and storage

    > Is it possible with VB to store shapes and colours (e.g a red circle, a
    blue
    > triangle...)in a database (preferably on access)and make an interface with
    > VB to read this data and represent the corresponding shape and colour

    graphically?
    >
    > If so. In what direction do I have to search for more info.?


    Sure, all vector shapes can be represented as a series of coordinates then
    their fill/line styles and colours as a series of other fields. You could
    quite easily take an array of points and CopyMemory() then into a string or
    something to store in a database (If you're worried about storage size) If
    not then simply make a 1 to many relationship from each shape to a table of
    coordinates, how you store it is really up to you.
    Then to draw it you simply use the API graphics routines such as
    MoveToEx()/LineTo() for lines, Rectangle() for rectangles Ellipse() for
    circles/ellipses, Polygon() for polygons, triangles, hexagons etc. Colours
    and styles are changed through using the API pen and brush objects and
    there's a library on my page that encapsulates their usage called APIDraw.
    Hope this helps,

    Mike


    -- EDais --

    WWW: Http://EDais.earlsoft.co.uk/
    Work E-Mail: EDais@btclick.com
    Other E-Mail: Mike.Sutton@btclick.com



  3. #3
    alejandro Lapeyre Guest

    Re: Graphics and storage

    You may give a chance to the enhanced metafile format files...
    (Which is some kind of "interpreted" GDI instructions)

    regards,
    Alejandro Lapeyre.

    "Clyde" <clydelo@intnet.mu> escribió en el mensaje
    news:3bcc94cf$1@news.devx.com...
    >
    > Hi all...
    >
    > Is it possible with VB to store shapes and colours (e.g a red circle, a

    blue
    > triangle...)in a database (preferably on access)and make an interface with
    > VB to read this data and represent the corresponding shape and colour

    graphically?
    >
    > If so. In what direction do I have to search for more info.?
    >
    > Thankx




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links