NetSender
Verfasst: 13.10.2005 02:48
hab schon wieda en problem mit nem neuen programm....
Code: Alles auswählen
; PureBasic Visual Designer v3.90 build 1361
;- Window Constants
;
If InitKeyboard() = 0
MessageRequester("Fehler","Programm läuft bei dir net",16)
EndIf
Enumeration
#Window_0
EndEnumeration
;- Gadget Constants
;
Enumeration
#Frame3D_1
#Frame3D_2
#IPAddress_0
#String_0
#Button_0
#Button_1
#Text_1
#Text_2
#Hyperlink_1
EndEnumeration
;- StatusBar Constants
;
Enumeration
#StatusBar_2
EndEnumeration
If OpenWindow(#Window_0, 216, 0, 1050, 943, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "NetSender ( 0 )")
If CreateStatusBar(#StatusBar_2, WindowID())
EndIf
If CreateGadgetList(WindowID())
Frame3DGadget(#Frame3D_1, 130, 110, 350, 400, "")
Frame3DGadget(#Frame3D_2, 140, 140, 330, 360, "")
IPAddressGadget(#IPAddress_0, 160, 180, 290, 40)
GadgetToolTip(#IPAddress_0, "Gib hier die IP Adresse ein")
StringGadget(#String_0, 160, 250, 290, 180, "")
GadgetToolTip(#String_0, "Gib hier die Nachricht ein die du versenden willst")
ButtonGadget(#Button_0, 160, 450, 140, 30, "Senden")
GadgetToolTip(#Button_0, "Nachricht senden")
ButtonGadget(#Button_1, 320, 450, 130, 30, "Beenden")
GadgetToolTip(#Button_1, "Programm beenden")
TextGadget(#Text_1, 160, 160, 60, 20, "IP Adresse")
TextGadget(#Text_2, 160, 230, 50, 20, "Nachricht")
HyperLinkGadget(#Hyperlink_1, 160, 490, 90, 10, "www.chillers.de.ki", RGB(0, 0, 0))
EndIf
EndIf
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_Event_CloseWindow
quit = 1
EndIf
If EventID=#PB_EventGadget
If EventGadgetID()=#Button_0
ip.s = GetGadgetText(#IPAddress_0)
text.s = GetGadgetText(#String_0)
RunProgram("net", "send" +ip+, +text+, "c:\Windows\System32")
EndIf
EndIf
If EventID=#PB_EventGadget
If EventGadgetID()=#Button_1
quit = 1
EndIf
EndIf
Until quit=1
End