Free Power Tools Brochure
Get Mark Minasi's
17-page guide today!



      

advertisement

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

May 01, 1997 02:01 PM

Build a Network Message Utility

Rating: (0)
Windows IT Pro
InstantDoc ID #559
Create a graphical alternative to NET SEND using the Win32 network API
\[Editor's Note: VB Solutions is about using Visual Basic (VB) to build a variety of solutions to specific business problems. This column doesn't teach you how to write VB, but how to use VB as a tool to provide quick, easy-to-implement solutions that you can use right away.\]

Window...

ARTICLE TOOLS

You must be a paid Professional Member to access this entire article.

Already a Professional Member? Please log in now:

NOT A PROFESSIONAL MEMBER? YOU CHOOSE:

Monthly or Annual

Professional Membership

VIP Membership

Compare Member Benefits

Add a Comment

Hi all,
This program is well. But I have to change the title name in Screen3, instead of Messenger service, our own title will be present in title bar. Could it passible? if possible, please can you let me know?

Awaiting for your reply.

Thankyou,

GaneshKumar4/29/2008 2:14:05 AM


Hello,

My question is the same someone asked before.


>>>
It would be interesting to know how to intercept the receive message before it pops up into a message box.

nhu chung - October 17, 2003
>>>

Regards,

ulambayar 12/7/2005 1:49:38 AM


To recieve messages, use this code.

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function BringWindowToTop Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Const BM_CLICK = &HF5
Const WM_GETTEXTLENGTH = &HE
Private Const WM_GETTEXT = &HD

Private Sub Timer1_Timer()
Dim lWin As Long
Dim Control As Long
Dim text As String
Dim textlen As Long
lWin = FindWindow(vbNullString, "Messenger Service ")
If lWin <> 0 Then
Control = FindWindowEx(lWin, 0, "Static", vbNullString)
textlen = SendMessage(Control, WM_GETTEXTLENGTH, vbNull, vbNull)
textlen = textlen + 1
text = Space$(textlen)
Call SendMessage(Control&, WM_GETTEXT, textlen, ByVal text)

Control = FindWindowEx(lWin, 0, "Button", vbNullString)
SendMessage Control, BM_CLICK, 0, 0
List1.AddItem text
End If
End Sub

Anonymous User 5/10/2005 12:56:10 PM


hey if u have multiple domains in ur network, then this code wont run. for an updated code, please write back to me at kumar754@gmail.com

Anonymous User 3/21/2005 9:17:28 PM


>>then the entire program locks up until it
>>returns an error message. Is there any way I
>>can prevent this ?

Just and idea but perhaps you could move the NetMessageBufferSend call out of the click event and into its own function in the standard module and then use the CreateThread API.

Anonymous User 1/8/2005 10:17:43 AM


is there a way of changing the name that comes up when you send the message (screen 3) to anthing you want, like adding another textbox?

computer_man 5/19/2004 5:27:22 PM


I want to Access Network Machine's Drive through Dialup Connection and copy files and folder. How can it be possible? If any one knows please help me.

Prakash Adhikari 5/16/2004 4:53:04 AM


How do you intercept the incoming messages? If there is a send function, shouldn't there be a receive function? It would be interesting to know how to intercept the receive message before it pops up into a message box. Thanks,

hamid Sajadi 4/15/2004 10:26:31 PM


Does this have the same limitation as net send in that it cannot route across VLANs/subnets?

Lili Gustavson 4/8/2004 6:49:15 AM


Works well on NT+ O/S's, but where you have Win 95/98, and there are still many around, it is not supported. A solution I came up with was to re-invent the process to include all Microsoft O/S's and Port aware O/S's, have messages colour coded, fixed/Variable text messages, full log support and carry out any coporate workstation maintenance. Like netsend this can be specific grouped or the entire Domain.

Neil Bailey 3/22/2004 6:25:27 AM


You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

windows 7 profile removal

Does anyone know of a script that will delete all domain profiles or all if easier upon reboot? With XP I used to do this with Delprof. I know there i...222-96223

advertisement

GOOGLE LINKS
SPONSORED LINKS
FEATURED LINKS

Podcasts

To successfully implement virtual desktops, IT administrators must carefully match user requirements to specific desktop technologies. Listen to this podcast to learn what you need to keep in mind when formulating your approach to desktop virtualization.

Downloads

PacketTrap IT is a comprehensive and affordable network management and application monitoring solution that solves problems associated with bandwidth, network and application performance, and connectivity. Gain insight into your network - try PacketTrapIT free for 21 days!

Web Seminars

Aside from its employees, data is an organization’s most important resource. Join Windows technical specialist and 11-time MVP John Savill to learn the best practices for managing data using features in Windows Server.
View this web seminar on demand!

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.