Click here to Skip to main content
15,925,255 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How can I adjust the size of picture according to cell's width and height? Pin
Guffa25-Apr-06 12:19
Guffa25-Apr-06 12:19 
Questionhow can i transfer files using TCPClient Pin
Hari Om Prakash Sharma25-Apr-06 7:50
Hari Om Prakash Sharma25-Apr-06 7:50 
AnswerRe: how can i transfer files using TCPClient Pin
CWIZO25-Apr-06 21:41
CWIZO25-Apr-06 21:41 
QuestionHow can I place a picture behind a cell of table Pin
JUNEYT25-Apr-06 7:07
JUNEYT25-Apr-06 7:07 
AnswerRe: How can I place a picture behind a cell of table Pin
Guffa25-Apr-06 7:21
Guffa25-Apr-06 7:21 
Questionhow to change IP address? Pin
cybercoaster25-Apr-06 5:28
cybercoaster25-Apr-06 5:28 
AnswerRe: how to change IP address? Pin
Joshua Quick25-Apr-06 8:09
Joshua Quick25-Apr-06 8:09 
AnswerRe: how to change IP address? Pin
Hari Om Prakash Sharma25-Apr-06 8:10
Hari Om Prakash Sharma25-Apr-06 8:10 
following code uses system.management classes(WMI)
CODE TO SET STATIC IP:
Sub IPchange()
        Try
            Dim inPar, outPar As ManagementBaseObject
            Dim mc As New ManagementClass("Win32_NetworkAdapterConfiguration")
            Dim moc As ManagementObjectCollection = mc.GetInstances()
            For Each mo As ManagementObject In moc
                If DirectCast(mo("IPEnabled"), Boolean) Then
                    inPar = mo.GetMethodParameters("EnableStatic")
                    inPar("IPAddress") = New String() {txtIP.Text}
                    inPar("SubnetMask") = New String() {txtSubnet.Text}
                    outPar = mo.InvokeMethod("EnableStatic", inPar, Nothing)
                    flag = True
                    MsgBox("IP Address successfully changed!!!", MsgBoxStyle.Information, "IP Changed")
                    Exit For
                End If
            Next
        Catch ex As Exception
            MsgBox("Error:" & ex.Message, MsgBoxStyle.Critical, "Error")
            txtIP.Enabled = True
            txtSubnet.Enabled = True
            flag = False
        End Try


CODE TO SET DHCP
Try
            Dim t As Single
            Dim objWMIService, objComputer As Object
            objWMIService = GetObject("Winmgmts:root\cimv2")
            objComputer = objWMIService.InstancesOf("Win32_NetworkAdapterConfiguration")
            ' Call always gets only one Win32_ComputerSystem object.
            For Each objComputer In objWMIService.InstancesOf("Win32_NetworkAdapterConfiguration")

                t = objComputer.EnableDHCP()
                If t <> 0 Then
                    'MsgBox("Error!!! Cann't enable DHCP at this time.", MsgBoxStyle.Critical, "Error")
                Else
                    MsgBox("DHCP Enabled!!!", MsgBoxStyle.Information, "Enable DHCP")
                End If

            Next
        Catch ex As Exception

        End Try


BYE!

Lxcite's Planet
... the ultimate solution

GeneralRe: how to change IP address? Pin
cybercoaster25-Apr-06 9:57
cybercoaster25-Apr-06 9:57 
AnswerRe: how to change IP address? Pin
Hari Om Prakash Sharma26-Apr-06 7:23
Hari Om Prakash Sharma26-Apr-06 7:23 
AnswerRe: how to change IP address? Pin
Sunglow25-Apr-06 14:22
Sunglow25-Apr-06 14:22 
GeneralRe: how to change IP address? Pin
Dave Kreskowiak26-Apr-06 1:12
mveDave Kreskowiak26-Apr-06 1:12 
QuestionHow to lock the Ctrl+alt+Del key and clock screen on computer start, ? Pin
groupitvn25-Apr-06 4:05
groupitvn25-Apr-06 4:05 
AnswerRe: How to lock the Ctrl+alt+Del key and clock screen on computer start, ? Pin
Guffa25-Apr-06 5:05
Guffa25-Apr-06 5:05 
AnswerRe: How to lock the Ctrl+alt+Del key and clock screen on computer start, ? Pin
Eric Dahlvang25-Apr-06 8:19
Eric Dahlvang25-Apr-06 8:19 
GeneralRe: How to lock the Ctrl+alt+Del key and clock screen on computer start, ? Pin
Guffa25-Apr-06 8:33
Guffa25-Apr-06 8:33 
GeneralRe: How to lock the Ctrl+alt+Del key and clock screen on computer start, ? Pin
Dave Kreskowiak25-Apr-06 10:03
mveDave Kreskowiak25-Apr-06 10:03 
GeneralRe: How to lock the Ctrl+alt+Del key and clock screen on computer start, ? Pin
Eric Dahlvang25-Apr-06 11:48
Eric Dahlvang25-Apr-06 11:48 
GeneralRe: How to lock the Ctrl+alt+Del key and clock screen on computer start, ? Pin
Dave Kreskowiak25-Apr-06 15:30
mveDave Kreskowiak25-Apr-06 15:30 
GeneralRe: How to lock the Ctrl+alt+Del key and clock screen on computer start, ? Pin
Eric Dahlvang26-Apr-06 6:06
Eric Dahlvang26-Apr-06 6:06 
GeneralRe: How to lock the Ctrl+alt+Del key and clock screen on computer start, ? Pin
Dave Kreskowiak26-Apr-06 6:18
mveDave Kreskowiak26-Apr-06 6:18 
AnswerRe: How to lock the Ctrl+alt+Del key and clock screen on computer start, ? Pin
Eric Dahlvang25-Apr-06 8:16
Eric Dahlvang25-Apr-06 8:16 
QuestionClosing MDI event cause closing Child Event Pin
Rizwan Bashir25-Apr-06 3:58
Rizwan Bashir25-Apr-06 3:58 
AnswerRe: Closing MDI event cause closing Child Event Pin
paas25-Apr-06 4:14
paas25-Apr-06 4:14 
GeneralRe: Closing MDI event cause closing Child Event Pin
Rizwan Bashir25-Apr-06 21:33
Rizwan Bashir25-Apr-06 21:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.