Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Ask] cara membuat multy host di vb
#1
misi master dkk
bisa ajarin saya cara buat multy host di vb 6 menggunakan combobox ?
ardisyaputra, proud to be a member of ForNesia Family since Apr 2014.
Reply
#2
kan gampang om..
tinggal ADD ITEM via Jendela Properties
atau
Code:
via Code:
combo1.add item "Bug1"
combo1.add item "Bug2"
combo1.add item "Bug3"

lalu bisa pake if:
Code:
dim payload as string
if trim(combo1.text) = "Bug1" then
    payload = ...
elseif trim(combo1.text) = "Bug2" then
    payload = ...
else
    payload = ...
end if

atau pake case:
Code:
dim strbug as string, payload as string
strbug = trim(combo1.text)
if len(strbug) then
    select case strbug
         case "bug1"
              payload = ....
         case "bug2"
              payload = ...
          case else
              payload = ...
    end select
else
   msgbox "Pilih Host nya dulu Bos!"
end if
Reply