Share this topic on Del.icio.usShare this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on SlashdotShare this topic on StumbleUponShare this topic on TechnoratiShare this topic on TwitterShare this topic on YahooShare this topic on Google buzz

Author Topic: Control Array di VB  (Read 2396 times)

0 Members and 1 Guest are viewing this topic.

Offline 3LACKC0DE

  • Bibit IF
  • *
  • Posts: 20
  • Reputasi: 1

  • Aktivitas bulan ini
    0%
Control Array di VB
« on: 17 December 2007, 16:47:06 »
Masih bawaan juga dari site lama... :P :P :P

Untuk membuat control array dalam Visual Basic, jangan lupa set property (isi) index dengan sebuah nilai (integer)

Cara membuat control array di Visual Basic :
1.Pasang sebuah control, set property index dengan value 0.
2.Deklarasi untuk membuat control baru dari control yang sudah ada
Syntax :
Load nama_control(no_index_array_baru)
nama_control(no_index_array_baru).Visible=True
(karena control baru default nilai property Visible -nya False)

Cara menghitung total control (collection) yang ada di suatu form :
Syntax :
Msgbox Me.Controls.Count

Cara menghitung total suatu jenis control di suatu form :
Syntax :
Code: [Select]
Dim ctl As Control, total As Integer
   total = 0
   For Each ctl In Me.Controls
      If TypeName(ctl) = "CommandButton" Then
         total = total + 1
      End If
   Next
   MsgBox "Total CommandButton = " & total


Download :
Code: [Select]
http://www.box.net/shared/1iu08ugmno
« Last Edit: 17 December 2007, 16:54:14 by 3LACKC0DE »
Observe...Analyse... & Build it PERFECT

Forum Informatika

Control Array di VB
« on: 17 December 2007, 16:47:06 »
Sponsored Links:


Offline patrasmartinus

  • Numpang Lewat
  • *
  • Posts: 1
  • Reputasi: 0

  • Aktivitas bulan ini
    0%
Re: Control Array di VB
« Reply #1 on: 12 January 2009, 21:19:56 »
kalau bahasa C# gimana?trus di input lalu di cari rata2nya itu gimana?

Offline lumine

  • Developer IF
  • *
  • Posts: 519
  • Reputasi: 9

  • Aktivitas bulan ini
    0%
Re: Control Array di VB
« Reply #2 on: 13 January 2009, 09:02:09 »
sips...mari kita sama-sama pelajari