Upload
darwin-sihaloho
View
216
Download
0
Embed Size (px)
DESCRIPTION
membuat warna
Citation preview
7/18/2019 Membuat Warna Visual Basic
http://slidepdf.com/reader/full/membuat-warna-visual-basic 1/3
Example 18.1
The Code:
Dim strColor As String
Private Sub RadioButton8_CheckedChanged(ByVal sender As System!b"ect# ByVal e AsSystem$ventArgs% &andles RadioButton8CheckedChangedstrColor ' Red$nd Sub
Private Sub RadioButton)_CheckedChanged(ByVal sender As System!b"ect# ByVal e AsSystem$ventArgs% &andles RadioButton)CheckedChangedstrColor ' *reen$nd Sub
Private Sub Radio+ello,_CheckedChanged(ByVal sender As System!b"ect# ByVal e AsSystem$ventArgs% &andles Radio+ello,CheckedChangedstrColor ' +ello,$nd Sub
Private Sub Button-_Click(ByVal sender As System!b"ect# ByVal e As System$ventArgs%&andles Button-Click.abel/0e1t ' strColor $nd Sub
Although the user may only select one item at a time# he may make more than one selection i2those items belong to di22erent categories 3or e1am4le# the user ,ish to choose 05shirt si6e andcolor# he needs to select one color and one si6e# ,hich means one selection in each category0his is easily achieved in VB/778 by using the *rou4bo1 control under the containers categories
A2ter inserting the *rou4bo1 into the 2orm# you can 4roceed to insert the radio buttons into the*rou4bo1 !nly the radio buttons inside the *rou4bo1 are mutually e1clusive# they are notmutually e1clusive ,ith the radio buttons outside the *rou4bo1 n $1am4le -8/# the users canselect one color and one si6e o2 the 05shirt
7/18/2019 Membuat Warna Visual Basic
http://slidepdf.com/reader/full/membuat-warna-visual-basic 2/3
Example 18.2
Dim strColor As String
Dim strSi6e As String
Private Sub RadioButton8_CheckedChanged(ByVal sender As System!b"ect# ByVal e As
System$ventArgs% &andles RadioButton8CheckedChanged
strColor ' Red
$nd Sub
Private Sub RadioButton)_CheckedChanged(ByVal sender As System!b"ect# ByVal e As
System$ventArgs% &andles RadioButton)CheckedChanged
strColor ' *reen
$nd Sub
Private Sub Radio+ello,_CheckedChanged(ByVal sender As System!b"ect# ByVal e As
System$ventArgs% &andles Radio+ello,CheckedChanged
strColor ' +ello,
$nd Sub
Private Sub Button-_Click(ByVal sender As System!b"ect# ByVal e As System$ventArgs%
&andles Button-Click
.abel/0e1t ' strColor
7/18/2019 Membuat Warna Visual Basic
http://slidepdf.com/reader/full/membuat-warna-visual-basic 3/3
.abel90e1t ' strSi6e
$nd Sub
Private Sub Radio:._CheckedChanged(ByVal sender As System!b"ect# ByVal e As
System$ventArgs% &andles Radio:.CheckedChanged
strSi6e ' :.
$nd Sub
Private Sub Radio._CheckedChanged(ByVal sender As System!b"ect# ByVal e As
System$ventArgs% &andles Radio.CheckedChanged
strSi6e ' .
$nd Sub
Private Sub Radio;_CheckedChanged(ByVal sender As System!b"ect# ByVal e As
System$ventArgs% &andles Radio;CheckedChanged
strSi6e ' ;
$nd Sub
Private Sub RadioS_CheckedChanged(ByVal sender As System!b"ect# ByVal e As
System$ventArgs% &andles RadioSCheckedChanged
strSi6e ' S
$nd Sub