Works perfect here, version 3457.

The only thing I did was to rename Color() to RndColor(), because Color is a
gambas class name. Maybe that's the reason why?

Regards
Matti


Am 19.01.2011 10:39, schrieb Demosthenes Koptsis:
> 
> Good morning,
> 
> the following example is not working in gambas3-svn3475
> 
> ------------------------------
> ' Gambas class file
> 
> Public Function Color() As Integer
>   
>   Dim Red As Integer
>   Dim Green As Integer
>   Dim Blue As Integer
>   Dim sColor As String
>   Dim iColor As Integer
>   
>   Red = Rnd(0, 256)
>   Green = Rnd(0, 256)
>   Blue = Rnd(0, 256)
>   
>   sColor = "&" & Hex(Red, 2) & Hex(Green, 2) & Hex(Blue, 2) & "&"
>   Print sColor
>   iColor = Val(sColor)
>   Return iColor
>   
> End
> 
> Public Sub Form_MouseDown()
> 
>   Me.Background = Color()
> 
> End
> -----------------------------------
> 
> The code try to change the bgcolor of Form with random colors on mouse
> clicks.
> 
> This example is working in Gambas2.
> 
> I think Form_MouseDown event is not working or i don't know...
> 

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to