INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

how to disabled network adapter !!!!?

how to disabled network adapter !!!!?

(OP)
hello everyone
how i can disabled/enabled NetworkAdapter using vfp code
thank's for help

RE: how to disabled network adapter !!!!?

Hi,

Maybe this article will be of help to you?

Jockey2

RE: how to disabled network adapter !!!!?

Jockey2,

There is no article linked in your reply.

sad shades

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

RE: how to disabled network adapter !!!!?

Hi,

This article : Link

should help you.

Regards,

Jockey2

RE: how to disabled network adapter !!!!?

Depending on the version of windows you have, this may work (This example enables the network connection, just reverse the action)

CODE --> foxpro

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 

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483: How to get the best response from the forum first.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close