Click here to Skip to main content
16,005,552 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Excel to DatGrid Problem Pin
alexfromto8-Nov-06 3:06
alexfromto8-Nov-06 3:06 
QuestionHelp Convert C# Threading Code to Vb.net Pin
eatwork7-Nov-06 9:46
eatwork7-Nov-06 9:46 
QuestionVB .NET Interoperability Pin
dpagka7-Nov-06 6:37
dpagka7-Nov-06 6:37 
AnswerRe: VB .NET Interoperability Pin
nlarson117-Nov-06 7:58
nlarson117-Nov-06 7:58 
QuestionNetwork Programming Pin
Nakul Sharma7-Nov-06 3:02
Nakul Sharma7-Nov-06 3:02 
AnswerRe: Network Programming Pin
coolestCoder7-Nov-06 3:42
coolestCoder7-Nov-06 3:42 
AnswerRe: Network Programming Pin
Yona Low7-Nov-06 4:37
Yona Low7-Nov-06 4:37 
GeneralRe: Network Programming Pin
Nakul Sharma8-Nov-06 0:56
Nakul Sharma8-Nov-06 0:56 
try this
Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TreeView1.AfterSelect
txtcomputer.Text = TreeView1.SelectedNode.Text
TextBox1.Text = GetIPAddress(txtcomputer.Text)
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdSend.Click
If txtcomputer.Text <> "" And txtmessage.Text <> "" Then
Shell("net send " & txtcomputer.Text & " " & txtmessage.Text)
txtmessage.Text = ""
txtmessage.Focus()
End If
End Sub

Function GetIPAddress(ByVal CompName As String) As String
Dim oAddr As System.Net.IPAddress
Dim sAddr As String
Try
With System.Net.Dns.GetHostByName(CompName)
oAddr = New System.Net.IPAddress(.AddressList(0).Address)
sAddr = oAddr.ToString
End With
GetIPAddress = sAddr
Catch Excep As Exception
MsgBox(Excep.Message, MsgBoxStyle.OKOnly, "Lan Messenger")
Finally

End Try
End Function

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim childEntry As DirectoryEntry
Dim ParentEntry As New DirectoryEntry()
Try
ParentEntry.Path = "WinNT:"
For Each childEntry In ParentEntry.Children
Dim newNode As New TreeNode(childEntry.Name)
Select Case childEntry.SchemaClassName
Case "Domain"
Dim ParentDomain As New TreeNode(childEntry.Name)
TreeView1.Nodes.AddRange(New TreeNode() {ParentDomain})

Dim SubChildEntry As DirectoryEntry
Dim SubParentEntry As New DirectoryEntry()
SubParentEntry.Path = "WinNT://" & childEntry.Name
For Each SubChildEntry In SubParentEntry.Children
Dim newNode1 As New TreeNode(SubChildEntry.Name)
Select Case SubChildEntry.SchemaClassName
Case "Computer"
ParentDomain.Nodes.Add(newNode1)
End Select
Next
End Select
Next
Catch Excep As Exception
MsgBox("Error While Reading Directories")
Finally
ParentEntry = Nothing
End Try

End Sub

Private Sub CmdPing_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdPing.Click
Shell("PING " & TextBox1.Text)
End Sub

Private Sub CmdSendAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdSendAll.Click
Shell("net send ALL " & txtmessage.Text)
End Sub

Private Sub CmdSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdSend.Click
If txtcomputer.Text <> "" And txtmessage.Text <> "" Then
Shell("net send GUI" & txtcomputer.Text & " " & txtmessage.Text)
txtmessage.Text = ""
txtmessage.Focus()
End If
End Sub
GeneralRe: Network Programming Pin
Yona Low8-Nov-06 16:34
Yona Low8-Nov-06 16:34 
AnswerRe: Network Programming Pin
MyAccountDied7-Nov-06 19:14
MyAccountDied7-Nov-06 19:14 
QuestionIs this possible Pin
Pete Newman7-Nov-06 2:49
Pete Newman7-Nov-06 2:49 
Questionchange permission in registry Pin
ingsgr01@gmail.com7-Nov-06 2:16
ingsgr01@gmail.com7-Nov-06 2:16 
AnswerRe: change permission in registry Pin
Yona Low7-Nov-06 4:32
Yona Low7-Nov-06 4:32 
QuestionSystem.InvalidCastException was unhandled by user code Pin
binujeesman7-Nov-06 0:21
binujeesman7-Nov-06 0:21 
Questionadding schema table in treeview Pin
nbulut6-Nov-06 23:34
nbulut6-Nov-06 23:34 
Questionvb 6.0 Pin
sukhchain singh6-Nov-06 22:40
sukhchain singh6-Nov-06 22:40 
AnswerRe: vb 6.0 Pin
Christian Graus6-Nov-06 22:49
protectorChristian Graus6-Nov-06 22:49 
AnswerRe: vb 6.0 Pin
ChandraRam7-Nov-06 0:54
ChandraRam7-Nov-06 0:54 
AnswerHOMEWORK Pin
leckey7-Nov-06 2:32
leckey7-Nov-06 2:32 
Questionnvb6.0 Pin
sukhchain singh6-Nov-06 22:37
sukhchain singh6-Nov-06 22:37 
AnswerRe: nvb6.0 Pin
Christian Graus6-Nov-06 22:46
protectorChristian Graus6-Nov-06 22:46 
GeneralRe: nvb6.0 Pin
Paul Conrad7-Nov-06 6:57
professionalPaul Conrad7-Nov-06 6:57 
AnswerHOMEWORK Pin
leckey7-Nov-06 2:32
leckey7-Nov-06 2:32 
Question,filling a grid at run time in windows application Pin
samerh6-Nov-06 21:53
samerh6-Nov-06 21:53 
AnswerRe: ,filling a grid at run time in windows application Pin
Christian Graus6-Nov-06 21:57
protectorChristian Graus6-Nov-06 21:57 

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.