Visual Basic Help

Soldato
Joined
17 Jun 2005
Posts
6,508
Location
Near Brighton
Ok got a problem im not sure how to solve. Im doing a program in VB 5. I have to make the contents of a text box do different things. the enabled property of the text box is false through out the program.

Im using both the fore colour and backcolour. I can get the backcolour to change but not the for colour. Im using option buttons to change the colours etc.

the work is at college, but il try and remember the code i used

IF optbackred.Value = True Then (i think its value)
txttextbox1.forecolour = Red (cant remember the code for the colurs)
End IF


that doesnt seem to change the forecolour or anything but when i use the exact same code but for the back colour it works fine.

Any ideas, i hope that made sense
 
Easiest way I know to do it is to set it back to be enabled and set the Locked property to true instead:-

Text1.ForeColor = vbRed
Text1.BackColor = vbGreen
Text1.Locked = True
 
Back
Top Bottom