Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

VB graphics

  • 02-08-2006 8:31am
    #1
    Registered Users, Registered Users 2 Posts: 1,368 ✭✭✭


    Hey Guys,

    I'm working on this project at the moment in college which requires me to measure the temperature at different points on a persons hand (don't ask!)

    Anyway, I've set up the sensors, coded the microcontroller, and now I'm trying to create a gui in VB to display the data.

    I've setup the mscomm serial interface and I'm acquiring the data correctly.

    Now, what I'd like to do is display a hand on my vb form, and have the colour of the different regions of the hand change with temperature; so the hottest part of the hand would be white and the coldest would be black.

    The hand would be divided into three defined regions, and a different colour defiining the temperature in that region.

    Would anyone know the best way to implement this in VB6?

    Thanks,
    Martin


Comments

  • Closed Accounts Posts: 79 ✭✭iascanmore


    Martin,

    I've only ever used the API fucntions within GDI32 when it comes to doing any serious graphics in VB.

    I suspect you'll need to do the same.

    There's a set of polygon functions which you could use - draw 4 of them, the hand and then 3 regions within, thus you'll be able to colour the regions seperately.

    This is merely the first solution I thought of - there are loads of approaches to such a issue, give that a try and let us know how you get on.

    Edit:
    Starting point: http://www.developer.com/net/vb/article.php/610261


  • Registered Users, Registered Users 2 Posts: 2,781 ✭✭✭amen


    our just create some bitmaps in different colours and load the relevant one to screen
    might be easier then messing with GDI


  • Closed Accounts Posts: 79 ✭✭iascanmore


    Would be a pain to create each region of the hand in each colour though - possibly 20+ bitmaps. Would be a pain to change/enhance the colour range aswell. Eg Start out with with 6 colours from white to black - slotting a 7th in would be a right pain.

    Added to the issues with re-sizing such a form and the pain of distributing all those bitmaps aswell.

    The GDI functions are not that difficult to use...no resizing issues. Use an INI file/table/even the registry to hold your temp ranges and colours and you can chop and change at will.


Advertisement