Determine if only one instance is running: Difference between revisions

m
Line 802:
end function
 
IupOpen("../pGUI/")
IupSetGlobal("SINGLEINSTANCE", "Single") -- (must [partially] match the main window title)
if IupGetGlobal("SINGLEINSTANCE")!="" then
Ihandle dlg = IupDialog(IupVbox({IupLabel("hello")},"MARGIN=200x200"))
IupSetAttribute(dlg,"TITLE","Single Instance")
IupSetCallback(dlg, "K_ANY", Icallback("esc_close"))
IupSetCallback(dlg, "COPYDATA_CB", Icallback("copydata_cb"));
IupShow(dlg)
IupMainLoop()
end if
IupClose()</lang>
 
=={{header|PicoLisp}}==
7,794

edits