Putting the Color of a form into a string

Jay1b

Contributor
Joined
Aug 3, 2003
Messages
640
Location
Kent, Uk.
I have warning come up that changes the color of the form to red, when the user resolves the problem - i want to change the color back to what it was previously.

Visual Basic:
...........
dim stroldColor as string
...........

if strError = true then
    strOldColor = me.backcolor
    me.backcolor = color.red
else
   me.backcolor = strOldColor
endif

My problem is i dont the code to find out what the backcolor actually was to begin with, as what i have there throws up a type mismatch error. I dont want to just set the color back to gray, as the user may have personalised colors on there computer.

Can anybody point me in the right direction please?
 
Back
Top