need help: trying to get forecolor value from button...

dec21st

Active member
Joined
May 14, 2005
Messages
43
Programming Experience
3-5
i'm trying to get the value of my button's forecolor
this is wat i did

VB.NET:
[size=2][color=#0000ff]Dim[/color][/size][size=2] btnColor [/size][size=2][color=#0000ff]As[/color][/size][size=2] Color = [/size][size=2][color=#0000ff]CType[/color][/size][size=2](sender, Button).ForeColor
MsgBox(btnColor)

but it returned an error saying

An unhandled exception of type 'System.ArgumentException' occurred in microsoft.visualbasic.dll
Additional information: Argument 'Prompt' cannot be converted to type 'String'.


how do i fix this??
i just wanna get the value for my button's forecolor


[/size]
 
Back
Top