Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/Win/WindowsPowerState
Function:
Required plugins for this example: MBS Win Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Win/WindowsPowerState
This example is the version from Sun, 17th Mar 2012.
Project "WindowsPowerState.rbp"
FileTypes
Filetype text
End FileTypes
Class Window1 Inherits Window
Control ListBox1 Inherits Listbox
ControlInstance ListBox1 Inherits Listbox
End Control
EventHandler Sub Open() c=new MyWindowsPowerState End EventHandler
Property Protected c As MyWindowsPowerState
End Class
MenuBar MenuBar1
MenuItem UntitledMenu1 = ""
MenuItem FileMenu = "&File"
MenuItem FileQuit = "Quit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu0 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
Class MyWindowsPowerState Inherits WindowsPowerStateMBS
EventHandler Sub BatteryLow() w "BatteryLow" End EventHandler
EventHandler Sub OEMEvent(eventcode as integer) w "OEMEvent "+hex(eventcode) End EventHandler
EventHandler Sub PowerStatusChange() w "PowerStatusChange" End EventHandler
EventHandler Function QueryStandby(PromptUser as boolean) As boolean w "QueryStandby" End EventHandler
EventHandler Sub QueryStandbyFailed() w "QueryStandbyFailed" End EventHandler
EventHandler Function QuerySuspend(PromptUser as boolean) As boolean w "QuerySuspend" End EventHandler
EventHandler Sub QuerySuspendFailed() w "QuerySuspendFailed" End EventHandler
EventHandler Sub ResumeAutomatic() w "ResumeAutomatic" End EventHandler
EventHandler Sub ResumeCritical() w "ResumeCritical" End EventHandler
EventHandler Sub ResumeStandby() w "ResumeStandby" End EventHandler
EventHandler Sub ResumeSuspend() w "ResumeSuspend" End EventHandler
EventHandler Sub Standby() w "Standby" End EventHandler
EventHandler Sub Suspend() w "Suspend" End EventHandler
Private Sub w(w as string) dim s as string dim d as date d=new date s=d.LongTime+": "+w Window1.ListBox1.AddRow s End Sub
End Class
End Project

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Win Plugin.




Links
MBS Xojo Chart Plugins