跳轉到內容

Gambas/有用模組

來自維客,面向開放世界的開放書籍

返回 Gambas

有用模組

[編輯 | 編輯原始碼]

所有有用模組都在元件中分組。

在開始時嘗試掌握“設定”元件!

在專案屬性中,啟用 gb.settings

您可以像這樣使用它(例如,在名為 FMain 的“窗體”中,以及名為 Label1 的“標籤”中)。 

' Gambas class file

' FMain

Private $counter As Integer = 0

Public Sub Form_MouseUp()

  Settings.Reload
  Message.Info(Settings["My/Ref", "default"])

End

Public Sub Label1_MouseDown()

  Inc $counter
  Settings["My/Ref"] = CStr($counter)
  Settings.Save

End
華夏公益教科書