|
I'm vary interested to know how you're able to display a msgbox on a remote machine, but not a form.
(If possible please explain, or provide a small code snippet)
From my point of view it sounds like you need to develop a Client/Server Application that communicate through a common protocol, and have predefined commands.
|
|
|
|
|
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
|
|
|
|
|
Its pretty obvious why you cant display anything else.
What you are doing is sending a message through the NET SEND commend, your not even using VB to display the message you can do the exact same thing from the command line.
I think my previous post clarifies what you need.
|
|
|
|
|
What you need to look at is Remoting[^]. It's a fairly advanced subject though.
|
|
|
|
|
Running vs2005 ( vb.net )
im trying to write an intranet app and one of the problems im comming up against is displaying data retrieved from a SQl Select query and displaying one record in text boxes much the same style as the old VB6.
I welcome any suggestion and examples please.
current pageload code
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim sqlConn As New SqlClient.SqlConnection
Dim sqlCommand As New SqlClient.SqlCommand
Dim SqlReader As SqlClient.SqlDataReader
Try
sqlConn = New SqlClient.SqlConnection(System.Configuration.ConfigurationManager.AppSettings("SQLConnectStr"))
sqlCommand = New SqlClient.SqlCommand("Select * from Bossdata.dbo.clientadmin")
SqlReader = sqlCommand.ExecuteReader
Catch ex As Exception
' Code for error trapping goes here
End Try
End Sub
thanks in advance
I really do need help..... all this computer stuff is way over my head !!
|
|
|
|
|
Hello All,
How can i do in order to change a permission for an user in a registry key.
How to do it programatically.
Thanks in advance...
Regards,
|
|
|
|
|
You'll probably have to do it through WMI Registry Classes
|
|
|
|
|
Hi
I added a datetimepicker to one column of datagrid. i got this by downloading generic datgrid user control from web. after i download that control, i got the 'calendercolumn' also as columntype. it is working. but when i am trying to insert one row thru datagridview to sql table' s datetime column, when i am clicking on the calender cell value itself it is giving me the following error. when i click continue it goes back to the cell and i can select the date the date and proceed. the data(including date) is saving properly. hw can i avoid (what eception to handle) to prevent from this error msg to come?
"to replace this default dialogue please handle the data error event...............
System.InvalidCastException was unhandled by user code
Message="Specified cast is not valid."
Source="GenericDataGridView"
StackTrace:
at GenericDataGridView.GenericDataGridView.CalendarCell.InitializeEditingControl(Int32 rowIndex, Object initialFormattedValue, DataGridViewCellStyle dataGridViewCellStyle) in C:\Documents and Settings\c0001014\Desktop\vs2005Projeler\GenericDataGridView\GenericDataGridView\GenericDataGridView.cs:line 504
at System.Windows.Forms.DataGridView.InitializeEditingControlValue(DataGridViewCellStyle& dataGridViewCellStyle, DataGridViewCell dataGridViewCell)
--- C:\Documents and Settings\c0001014\Desktop\vs2005Projeler\GenericDataGridView\GenericDataGridView\GenericDataGridView.cs
00000000 push ebp
00000001 mov ebp,esp
00000003 push edi
00000004 push esi
00000005 push ebx
00000006 sub esp,38h
00000009 xor eax,eax
0000000b mov dword ptr [ebp-10h],eax
0000000e xor eax,eax
00000010 mov dword ptr [ebp-1Ch],eax
00000013 mov dword ptr [ebp-40h],edx
00000016 mov edi,ecx
00000018 cmp dword ptr ds:[0371289Ch],0
0000001f je 00000026
00000021 call 7932D6AE
00000026 xor edx,edx
00000028 mov dword ptr [ebp-44h],edx
0000002b nop
0000002c push dword ptr [ebp+0Ch]
0000002f push dword ptr [ebp+8]
00000032 mov edx,dword ptr [ebp-40h]
00000035 mov ecx,edi
00000037 call 7A4A1A1C
0000003c nop
0000003d mov ecx,edi
0000003f call 7A45FF60
00000044 mov esi,eax
00000046 mov ecx,esi
00000048 cmp dword ptr [ecx],ecx
0000004a call 7A900AF8
0000004f mov esi,eax
00000051 mov edx,esi
00000053 mov ecx,3714BDCh
00000058 call 79125572
0000005d mov dword ptr [ebp-44h],eax
00000060 mov ebx,dword ptr [ebp-44h]
00000063 mov ecx,edi
00000065 call 7A462DF4
0000006a mov esi,eax
0000006c cmp dword ptr [esi],79105EF0h
00000072 je 00000080
00000074 mov edx,esi
00000076 mov ecx,79105EF0h
0000007b call 791F1CE6
00000080 add esi,4 ------------------------------------error
00000083 sub esp,8
00000086 movq xmm0,mmword ptr [esi]
0000008a movq mmword ptr [esp],xmm0
0000008f mov ecx,ebx
00000091 cmp dword ptr [ecx],ecx
00000093 call 7A8FCDF4
00000098 nop
00000099 nop
0000009a lea esp,[ebp-0Ch]
0000009d pop ebx
0000009e pop esi
0000009f pop edi
000000a0 pop ebp
000000a1 ret 8
|
|
|
|
|
i want to add a schema table in a treeview which contains the tables that the user selected from afiledialog's file table names
|
|
|
|
|
Write a procedure that changes all text styled in Heading 1 to Heading 3 in a Word doc
sukh
|
|
|
|
|
Why are you even doing a course in VB6 ? It's totally unsupported.
In any case, what you are doing is rude, self centred, and evidence that you're wasting your time with this course. I recommend dropping out and applying at McDonalds.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
You want to look up and learn VBA for MS Word. There are tons of stuff out there. Just google for it...
Chandra
|
|
|
|
|
Based on your last couple of questions plus past questions you are obviously looking for homework answers.
|
|
|
|
|
Most lists in VBA are 1 based. There is at least 1 case where 0 based indexing is used. What is this case?
sukhchain
|
|
|
|
|
This is pathetic. Do your own homework.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: This is pathetic. Do your own homework.
I've almost spilled my coffee :->
|
|
|
|
|
Based on your last few questions you are obviously looking for homework answers.
|
|
|
|
|
|
Hi. Did you have a question ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
what is boxing in Concept in .net?
Pavan Pareta
|
|
|
|
|
When a value type needs to be passed as a reference type ( typically as an object ), for example, in the non generic .NET containers, it needs to be put inside an object, hence 'boxing'.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I think this link on Microsoft's website will be halpful to you
http://msdn2.microsoft.com/en-us/library/25z57t8s.aspx
|
|
|
|
|
Thanks
its halpful for me...
Pavan Pareta
|
|
|
|
|
Hello,
I am developing a application where in I am calling a web page from vb6 application, now from vb6 i want to send that page by email.
I want to use IE - File/Send/page by email, functionality from vb6.
Please can anyone tell me how to capture IE - File/Send/page by email from vb6.
Regards
Raj
|
|
|
|