Example: /Win/Windows CD Burning

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

/Win/Windows CD Burning


Required plugins for this example: MBS Util Plugin, MBS Win Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Win/Windows CD Burning

This example is the version from Sun, 17th Mar 2012.

Project "Windows CD Burning.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control List Inherits Listbox
ControlInstance List Inherits Listbox
End Control
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() // To add a file/folder copy it to the system burn folder: dim file as FolderItem dim folder as FolderItem folder=WindowsBurnAreaFolderMBS file=GetOpenFolderItem("") if file<>nil then file.CopyFileTo folder List.AddRow file.Name end if End EventHandler
End Control
Control PushButton2 Inherits PushButton
ControlInstance PushButton2 Inherits PushButton
EventHandler Sub Action() // burn with the system GUI. // we pass self to specify the parent window b.CDBurn self // clear items on end list.DeleteAllRows ClearBurnFolder End EventHandler
End Control
EventHandler Sub Open() if TargetWin32 then b=new WindowsBurnMBS if b.HasRecordableDrive=false then MsgBox "No CD Recorder found." end if ClearBurnFolder else MsgBox "This example is only for Windows" quit end if End EventHandler
Sub ClearBurnFolder() dim f as FolderItem f=WindowsBurnAreaFolderMBS if f<>Nil then deleteFolderContent f end if End Sub
Private Sub deleteFolderContent(f as folderitem) dim files(-1) as FolderItem dim i,c as integer dim file as FolderItem c=f.Count for i=1 to c files.Append f.TrueItem(i) next c=UBound(files) for i=0 to c file=files(i) if file.Directory then deleteFolderContent file end if file.Delete next End Sub
Property b As windowsBurnMBS
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
End Project

See also:

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


💬 Ask a question or report a problem