vb.net - How can i describe buttons in matrix? -


i have 16*16 matrix , i'm trying define them matrix series in vb.net. make visual shows matrix led shows.


    dim n integer = 16     dim l integer = 16     dim x(n - 1, l - 1) integer     dim i, j, k integer     = 0 n - 1         j = 0 l - 1             k = 1 256                 if j= k mod16                 buton(k) = x(i, j)                end if              next          next     next*** 

i try apply algorithm. doesn't work. how can accomplish this? interests..

ok wrote while ago - i've adapted needs , runs ok on pc. need create array x this

dim x(15,15) button 

to fill array buttons, use method..

private sub initializearray()      dim btnslist new list(of button)     dim btnnum integer     dim btnname string     dim splitbuttonname() string     'add buttons list     each btncontrol object in controls         dim btn button         'get button number , add list if >0 , <=256         if typeof btncontrol button             btn = ctype(btncontrol, button)             'get button number             splitbuttonname = split(btn.name, "n")             if cint(splitbuttonname(1)) > 0 , cint(splitbuttonname(1)) <= 256                 btnslist.add(btn)             end if         end if     next     'add buttons matrix in right order     integer = 0 15         j integer = 0 15             k integer = 0 255                 btnnum = * 16 + j + 1                 btnname = "button" & btnnum.tostring                 if btnslist(k).name = btnname                     x(i, j) = btnslist(k)                     exit                 end if              next         next     next end sub 

Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -