[Gambas-user] Question Rnd vb to gambas

Dmxa dmxa69 at ...626...
Thu Nov 5 22:51:54 CET 2009


Thx all for help XD


Dmxa wrote:
> 
> I have a doubt, not long ago I started with the gambas2 and I am proving
> of passing 1 program Rnd of VB08 to gambas2 but when doing the function
> Rnd from a listbox to a textbox I do not obtain to leave.
> in VB08 use: 
> Dim i2 As Integer
> i2 = Int(Rnd() * (lbDatos2.Items.Count - 1))
> lis.lisx.Text = lis.lisx.Text & lbDatos2.Items.Item(i2) & vbCrLf & vbCrLf 
> exampe: list items : a, b, c and d. -> use this command and select randon
> 1 item of list and print en textbox -> b 
> but, i have read manual but follow tied up, using the:
> DIM y AS Integer 
>         y = Int(Rnd() * (ListBox2.List.Count - 1))
>         TextArea1.Text = TextArea1.Text & ListBox2.List.Join(y) & "\n" 
> following numbers go out me the contents of the the ready: list items: a,
> b, c and d, use the command -> a2b2c2d
> I have varied formulates her but the same always comes out:
>  ListBox2.List.Join((y), "-") ---> -a-3-b-3-c-3-d-
> does anybody know as it can be made?
> 
> PD: the equivalent link label in gambas who are?
> 

-- 
View this message in context: http://old.nabble.com/Question-Rnd-vb-to-gambas-tp26160471p26222790.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list