Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/MacCF/Carbon Events/Display current IP
Function:
Required plugins for this example: MBS MacCF Plugin, MBS Main Plugin, MBS Util Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCF/Carbon Events/Display current IP
This example is the version from Sun, 17th Mar 2012.
Project "Display current IP.rbp"
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
EventHandler Sub Open() e=new AppEvents e.Listen DummyWindow.show End EventHandler
Property e As appevents
End Class
Class AppEvents Inherits CarbonApplicationEventsMBS
EventHandler Function ApplicationGetDockTileMenu() As integer dim sock as TCPSocket dim m as MenuMBS sock=new TCPSocket m=new MenuMBS if m.NewMenu(1000,"test") then m.AppendItem "IP "+sock.LocalAddress menu=m // save for later Return m.Handle end if End EventHandler
Property Protected menu As menumBS
End Class
Class DummyWindow Inherits Window
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control Timer1 Inherits Timer
ControlInstance Timer1 Inherits Timer
EventHandler Sub Action() close End EventHandler
End Control
End Class
End Project

See also:

Feedback, Comments & Corrections

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




Links
MBS Xojo Plugins