Gambas 3 Tips & Tricks
He sacado una lista de "Tips and Tricks" de varios libros de GAMBAS, no son los únicos y puede que no sean los mejores, son los que me interesaron para mi proyecto.
para tener una version mas nueva de Gambas3,
agregar fichero en /etc/apt/sources.list.d
gambas3.list
Con este contenido.
deb http://ppa.launchpad.net/gambas-team/gambas3/ubuntu vivid main (en el caso de que tengan VIVID, sino Willy o otros.)
me.Caption = "TITULO DE VENTANA"
me.center
btnAdd.SetFocus
btnClear.Enabled = False
Message.Question("Did you like this?", "Yes", "No", "Don't know")
CASE 1
TextLabel1.Text = "Deleted it"
CASE 2
TextLabel1.Text = "Not Deleted"
CASE 3
TextLabel1.Text = "Canceled!"
PRINT sTestString & String(24,".") & "z"
Bin$(counter,4)
WAIT 1.0
CDate(Now)
picCircle.Load("circle.png")
Select iSwitch
Case 0
vbxResult.Value = vbxNum1.Value + vbxNum2.Value
Case 1
vbxResult.Value = vbxNum1.Value – vbxNum2.Value
Case 2
vbxResult.Value = vbxNum1.Value * vbxNum2.Value
Case 3
vbxResult.Value = vbxNum1.Value / vbxNum2.Value
Case 4
vbxResult.Value = vbxNum1.Value ^ vbxNum2.Value
End Select
Catch
Select Error.Code
Case 26
Message.Warning(“You are not allowed to divide by zero!!”)
vbxNum2.SetFocus
Case Else
Print Error.Code
End Select
Error.Clear
pbxOne.Picture = Picture.Load("Images/MyImage.png")
Private $bLoaded As Boolean = False
Private Function WarningIsCancelled() As Boolean
Dim iAnswer As Integer
iAnswer = Message.Question("File has been changed!\nDo you want to save the project?",
"Yes", "No", "Cancel")
Select iAnswer
Case 1
mnuFileSave_Click
'<-- Yes: Let the code at the FileSave menu handle the saving
Return False
Case 2
Return False
'<-- No: So no saving
Case Else
Return True
'<-- Cancel: So cancelled
End Select
End
If Message.Question("Did you like this?", "Yes", "No", "Don't know") = 2
Quit
Endif
rnd(0,5)
Comentarios
Publicar un comentario