Solved

Assistance with netsend via visual studio6 SP5

Posted on 2006-11-21
1
218 Views
Last Modified: 2010-04-23
I have a form that I have one combo box that is populated with several user names, a multiline text box for messages to be typed and a command button labled "send" to send the message.

I want to be able to utilize the net send feature via code for a simple way to communicate a quick message to a user on my network.

Can anyone give me some sample code to get started... ??
0
Comment
Question by:ittechie100
1 Comment
 
LVL 7

Accepted Solution

by:
Mohamed Zedan earned 500 total points
Comment Utility
try this:

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Const SW_SHOWNORMAL = 1
Private Sub Form_Load()
    dim Msg as string
    msg = "Hello All"
    ShellExecute Me.hwnd, vbNullString, "net.exe", "send * " & msg , "C:\", 0
End Sub
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now