Platforms to show: All Mac Windows Linux Cross-Platform

/Win/Windows DDE/AddItem


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/Windows DDE/AddItem

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

Project "AddItem.xojo_binary_project"
Class Window1 Inherits Window
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control groupname Inherits TextField
ControlInstance groupname Inherits TextField
End Control
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() run End EventHandler
End Control
Control StaticText2 Inherits Label
ControlInstance StaticText2 Inherits Label
End Control
Control path Inherits TextField
ControlInstance path Inherits TextField
End Control
Control StaticText3 Inherits Label
ControlInstance StaticText3 Inherits Label
End Control
Control name Inherits TextField
ControlInstance name Inherits TextField
End Control
Control StaticText4 Inherits Label
ControlInstance StaticText4 Inherits Label
End Control
Control icon Inherits TextField
ControlInstance icon Inherits TextField
End Control
Sub progman(s as string) dim d as DDEMBS dim ps as DDEStringMBS dim pd as DDEBinaryDataMBS dim b as boolean d=new DDEMBS if d.initClient then ps=d.newDDEString("PROGMAN") if ps<>Nil then if d.ConnectToServer(ps,ps) then d.timeout=10000 pd=d.newDDEBinaryData(nil,s) if pd<>Nil then b=d.clientTransactionBoolean(d.XTYP_EXECUTE,nil,pd) if b then msgBox "ok." else msgBox "failed." end if else msgBox "Failed newDDEBinaryData" end if else msgBox "Failed Connect." end if else msgBox "Failed newDDEString" end if d.Close else msgBox "Failed InitClient" end if End Sub
Sub run() ' AddItem(CommandLine,Name,IconPath,IconIndex,XPos,YPos) progman "[ShowGroup("+groupname.text+",3)]" progman "[AddItem("""+path.text+""","""+name.text+""","""+icon.text+""")]" End Sub
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
End Project

See also:

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


The biggest plugin in space...