vb.net function Use

Source: Internet
Author: User

Public Function Colour (ByVal Code as Int16) as color ' color
Select Case Code
Case 1
Colour = Color.White ' White
Case 2
Colour = Color.yellow ' yellow color
Case 3
Colour = Color.Red ' Red
Case 4
Colour = Color.silver ' Grey
End Select
End Function

Private Sub A1 ()

Textbox1.backcolor = Colour (1) ' L Background color white

Textbox1.backcolor = Colour (2) ' L Background color yellow

Textbox1.backcolor = Colour (3) ' L background red

Textbox1.backcolor = Colour (4) ' L Background color gray

End Sub

vb.net function Use

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.