tarekmomtaz
Programmer
hello everyone
how i can disabled/enabled NetworkAdapter using vfp code
thank's for help
how i can disabled/enabled NetworkAdapter using vfp code
thank's for help
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Array aconnections[1]
aconnections[1]=''
LOCAL singleconnection
i = 1
o = Createobject("Shell.Application")
ns=o.NameSpace (3)
For Each oItems In ns.Items
If oItems.Name ="Network Connections" && Windows Anglais
colNetwork = oItems.getfolder
If Vartype(colNetwork) = "O"
For Each colConn In colNetwork.Items
If Alen(aconnections)= 1 And Empty(aconnections[1])
Else
Dimension aconnections[ALEN(aconnections)+1]
Endif
aconnections[i]=colConn.Name
i = i +1
Next
Endif
Endif
Next
For i = 1 To Alen(aconnections)
If "Titan" $ aconnections[i] &&Un example
Connect(aconnections[i])
Endif
Next
Function Connect(lcConnexion)
For Each colConn In colNetwork.Items
If colConn.Name = lcConnexion
singleconnection = colConn
Exit
Endif
Next
For Each clsVerb In singleconnection.Verbs
If "C&onnect" = clsVerb.Name Or "En&able" = clsVerb.Name
Try
singleconnection.InvokeVerb("C&onnect")
Catch
singleconnection.InvokeVerb("En&able")
ENDTRY
Endif
Next
Endfunc