Link to home
Start Free TrialLog in
Avatar of clear100-com
clear100-com

asked on

Structures instead of types....

Hello, i use to use types in vb6, but now i use structures, thoght i didn't use types very well, i knew what they did and i knew what to do when i needed them.  Now i need them, but im playing around in vb.net trying to get myself ready to convert some major things to it.  Can you see what im trying to do here, and help me fix it?

Module Module1
    Public Structure Colors
        Public Red As String = "12121G1"
        Public Blue As String = "465C434"
        Public Green As String = "871X032"
        Public Yellow As String = "5B46873"
        Public Black As String = "A465468"
    End Structure
    Public Function NewFunction(ByVal Stuff As String, ByVal Colorx As Colors) As String
        MsgBox(Colorx)
        Colorx.Red = Stuff
    End Function
End Module

Im trying to set it up so when i type under a form1.button1 the function like this: NewFunction("MyStringHere",colors.red)  I want the user to see the list of colors after typing in the "colors." and then i want it to have that value when it executes the function.
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

VB.NET has a Color structure, and supporting color classes, so how are you trying to do something different.  What do the color values represent?

Bob
Avatar of clear100-com
clear100-com

ASKER

Actually, i was just using the names of colors just to use somthing, basicly let me explain this, you know when your typing msgbox("stuff"... and you hit the comma button on your keyboard and because this function "msgbox" has a list of items that you can choose like vbcancle etc... i want my function to have that list.
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perfect!! That is what i wanted..