Code : Tout sélectionner
;
; ------------------------------------------------------------
;
; PureBasic - Window example file
;
; (c) 2001 - Fantaisie Software
;
; ------------------------------------------------------------
;
;
; Open a window, and do some stuff with it...
;
If OpenWindow(0, 100, 200, 195, 260, "Programme Vincent", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
; This is the 'event loop'. All the user actions are processed here.
; It's very easy to understand: when an action occurs, the EventID
; isn't 0 and we just have to see what have happened...
ButtonGadget(1,10,10,50,50,"chercher")
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_CloseWindow ; If the user has pressed on the close button
Quit = 1
EndIf
If Event = #PB_Event_Gadget ; If the user has pressed on the button
If EventGadget() = 1
OpenConsole()
InitNetwork()
ExamineIPAddresses()
Repeat
ip=NextIPAddress()
If IPString(ip)<>"0.0.0.0"
CloseConsole()
TextGadget(2,70,2,100,50, IPString(ip) )
EndIf
Until ip=0
EndIf
EndIf
Until Quit = 1
EndIf
End ; All the opened windows are closed automatically by PureBasic
Mais j'aimerai avancer. Je voudrais savoir comment mettre l'adresse ip dans une case et pas dans l'espace comme ça.
Et comment je pourrai modifier l'adresse IP?
Merci pour vos prochaine réponse et cordialement.