Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/Win/ICM/Windows ICM Setup Dialog
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/ICM/Windows ICM Setup Dialog
This example is the version from Sun, 17th Mar 2012.
Project "Windows ICM Setup Dialog.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control List Inherits Listbox
ControlInstance List Inherits Listbox
End Control
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control tFlags Inherits Label
ControlInstance tFlags Inherits Label
End Control
Control lSourceName Inherits Label
ControlInstance lSourceName Inherits Label
End Control
Control tSourceName Inherits Label
ControlInstance tSourceName Inherits Label
End Control
Control tDisplayName Inherits Label
ControlInstance tDisplayName Inherits Label
End Control
Control lDisplayName Inherits Label
ControlInstance lDisplayName Inherits Label
End Control
Control lRenderIntent Inherits Label
ControlInstance lRenderIntent Inherits Label
End Control
Control tRenderIntent Inherits Label
ControlInstance tRenderIntent Inherits Label
End Control
Control lProofingIntent Inherits Label
ControlInstance lProofingIntent Inherits Label
End Control
Control tProofingIntent Inherits Label
ControlInstance tProofingIntent Inherits Label
End Control
Control lMonitorProfile Inherits Label
ControlInstance lMonitorProfile Inherits Label
End Control
Control tMonitorProfile Inherits Label
ControlInstance tMonitorProfile Inherits Label
End Control
Control tTargetProfile Inherits Label
ControlInstance tTargetProfile Inherits Label
End Control
Control lTargetProfile Inherits Label
ControlInstance lTargetProfile Inherits Label
End Control
Control lPrinterProfile Inherits Label
ControlInstance lPrinterProfile Inherits Label
End Control
Control tPrinterProfile Inherits Label
ControlInstance tPrinterProfile Inherits Label
End Control
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() setup.Parent = self if setup.Setup then window1.List.AddRow "Setup: OK" update else window1.List.AddRow "Setup: Cancel" end if End EventHandler
End Control
Control CheckBox1 Inherits CheckBox
ControlInstance CheckBox1 Inherits CheckBox
EventHandler Sub Action() switch me, WindowsICMSetupMBS.CMS_DISABLEICM End EventHandler
End Control
Control CheckBox2 Inherits CheckBox
ControlInstance CheckBox2 Inherits CheckBox
EventHandler Sub Action() switch me, WindowsICMSetupMBS.CMS_SETPROOFINTENT End EventHandler
End Control
Control CheckBox3 Inherits CheckBox
ControlInstance CheckBox3 Inherits CheckBox
EventHandler Sub Action() switch me, WindowsICMSetupMBS.CMS_ENABLEPROOFING End EventHandler
End Control
Control CheckBox4 Inherits CheckBox
ControlInstance CheckBox4 Inherits CheckBox
EventHandler Sub Action() switch me, WindowsICMSetupMBS.CMS_SETMONITORPROFILE End EventHandler
End Control
Control CheckBox5 Inherits CheckBox
ControlInstance CheckBox5 Inherits CheckBox
EventHandler Sub Action() switch me, WindowsICMSetupMBS.CMS_SETPRINTERPROFILE End EventHandler
End Control
Control CheckBox6 Inherits CheckBox
ControlInstance CheckBox6 Inherits CheckBox
EventHandler Sub Action() switch me, WindowsICMSetupMBS.CMS_SETRENDERINTENT End EventHandler
End Control
Control CheckBox7 Inherits CheckBox
ControlInstance CheckBox7 Inherits CheckBox
EventHandler Sub Action() switch me, WindowsICMSetupMBS.CMS_SETTARGETPROFILE End EventHandler
End Control
Control CheckBox8 Inherits CheckBox
ControlInstance CheckBox8 Inherits CheckBox
EventHandler Sub Action() switch me, WindowsICMSetupMBS.CMS_USEHOOK End EventHandler
End Control
Control CheckBox9 Inherits CheckBox
ControlInstance CheckBox9 Inherits CheckBox
EventHandler Sub Action() switch me, WindowsICMSetupMBS.CMS_USEAPPLYCALLBACK End EventHandler
End Control
Control CheckBox10 Inherits CheckBox
ControlInstance CheckBox10 Inherits CheckBox
EventHandler Sub Action() switch me, WindowsICMSetupMBS.CMS_DISABLERENDERINTENT End EventHandler
End Control
Control CheckBox11 Inherits CheckBox
ControlInstance CheckBox11 Inherits CheckBox
EventHandler Sub Action() switch me, WindowsICMSetupMBS.CMS_DISABLEINTENT End EventHandler
End Control
Control CheckBox12 Inherits CheckBox
ControlInstance CheckBox12 Inherits CheckBox
EventHandler Sub Action() switch me, WindowsICMSetupMBS.CMS_USEDESCRIPTION End EventHandler
End Control
EventHandler Sub Open() setup = new MyWindowsICMSetupMBS End EventHandler
Sub switch(c as CheckBox, n as integer) if c.Value then setup.Flags = BitwiseOr(setup.Flags, n) else setup.Flags = BitwiseAnd(setup.Flags, Bitwise.OnesComplement(n)) end if tFlags.text = str(setup.Flags)+" = "+bin(setup.Flags) End Sub
Sub update() tFlags.text = str(setup.Flags)+" = "+bin(setup.Flags) tSourceName.text = setup.SourceName tDisplayName.text = setup.DisplayName tRenderIntent.text = str(setup.RenderIntent) tProofingIntent.text = str(setup.ProofingIntent) tMonitorProfile.text = setup.MonitorProfile tPrinterProfile.text = setup.PrinterProfile tTargetProfile.text = setup.TargetProfile End Sub
Property setup As MyWindowsICMSetupMBS
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
Class MyWindowsICMSetupMBS Inherits WindowsICMSetupMBS
EventHandler Sub Apply() window1.List.AddRow "Apply" window1.Update End EventHandler
EventHandler Sub Idle() dim l as listbox = window1.List dim c as integer = l.ListCount if c>0 then if l.Cell(c-1,0)="Idle" then Return // ignore duplicates end if end if l.AddRow "Idle" End EventHandler
End Class
End Project

See also:

Feedback, Comments & Corrections

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




Links
MBS Xojo tutorial videos