I created a blank new window with two text gadgets ("The hostname is:" and "The IP-Adress is: ") and two string gadgets (containing hostname and IP-adress). After that the code is displayed in the PB editor: 'GeneratedMainFile.pb' and 'GeneratedIncludeFile.pb'. The project itself is stored as 'Test.pbv'.
GeneratedMainFile.pb:
Code: Select all
; PureBasic Visual Designer v3.95 build 1485 (PB4Code)
IncludeFile "GeneratedIncludeFile.pb"
Code: Select all
; PureBasic Visual Designer v3.95 build 1485 (PB4Code)
;- Window Constants
;
Enumeration
#Window_0
EndEnumeration
;- Gadget Constants
;
Enumeration
#Text_0
#String_0
#Text_1
#String_1
EndEnumeration
Global Dim Language$(1)
Procedure BalloonTip(WindowID, Gadget, Text$ , Title$, Icon)
ToolTip=CreateWindowEx_(0,"ToolTips_Class32","",#WS_POPUP | #TTS_NOPREFIX | #TTS_BALLOON,0,0,0,0,WindowID,0,GetModuleHandle_(0),0)
SendMessage_(ToolTip,#TTM_SETTIPTEXTCOLOR,GetSysColor_(#COLOR_INFOTEXT),0)
SendMessage_(ToolTip,#TTM_SETTIPBKCOLOR,GetSysColor_(#COLOR_INFOBK),0)
SendMessage_(ToolTip,#TTM_SETMAXTIPWIDTH,0,180)
Balloon.TOOLINFO\cbSize=SizeOf(TOOLINFO)
Balloon\uFlags=#TTF_IDISHWND | #TTF_SUBCLASS
Balloon\hWnd=GadgetID(Gadget)
Balloon\uId=GadgetID(Gadget)
Balloon\lpszText=@Text$
SendMessage_(ToolTip, #TTM_ADDTOOL, 0, Balloon)
If Title$ > ""
SendMessage_(ToolTip, #TTM_SETTITLE, Icon, @Title$)
EndIf
EndProcedure
Procedure Open_Window_0()
If OpenWindow(#Window_0, 216, 0, 600, 300, "New window ( 0 )", #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar )
If CreateGadgetList(WindowID(#Window_0))
TextGadget(#Text_0, 20, 30, 90, 20, Language$(0))
StringGadget(#String_0, 140, 30, 190, 20, "")
TextGadget(#Text_1, 20, 70, 80, 20, Language$(1))
StringGadget(#String_1, 140, 70, 190, 20, "")
EndIf
EndIf
EndProcedure
Procedure ReadCatalog(Filename$)
If ReadFile(0, Filename$)
If ReadString(0) = "Catalog"
For k=0 To 1
Language$(k) = ReadString(0)
Next
EndIf
CloseFile(0)
EndIf
EndProcedure
Restore BaseLanguage
For k=0 To 1
Read Language$(k)
Next
DataSection
BaseLanguage:
Data$ "The hostname is:"
Data$ "The IP-Adress is:"
EndDataSection
Thanks for your answer
Roland