Top selection of php scripts and tools for your site:


Blog System
Multilanguage blog hosting software

Cars Portal v1.3
Auto classifieds solution

Pharmacy System
Specialized solution for online pharmacies

iBoutique.MALL
Powerful multi vendors software

Jobs Portal v1.2
Powerful jobs board software

WSCreator 1.0
Multi user / multi website CMS

Real Estate Portal v1.2
RE portal solution

Vlog System 1.1
Video blog system based on BS

 
   Professional website templates | CREATE YOUR OWN BLOG FOR FREE!!! | Websites marketplace | SEO | YOU HAVE A DOMAIN FOR SALE?
 
  Free Examples
   ASP.NET
   C#
   DATABASES
   DHTML
   JAVA
   JAVASCRIPT
   PERL
   PHP
   SMIL
   VML
   WAP
 
 
  Developer on focus

Anton Zamov is a dipl. engineer with more than 6 years of active professional experience and many awards ...
read more>>
 
 
 
How to send \" NET SEND \" messages ( Windows 2000 & Windows XP only )?

Have you ever send messages to the local network using the command promt and the well known command "net send"?.<br>
The 2 methods listed below allows you to make exactly the same thing from your C# application.


protected string name="";
protected string sysname="";

public void NetSend(string mname,string strMessage)
{
/*
This method is created by Anton Zamov.
web site: http://zamov.online.fr

Feel free to use and redistribute this method
in condition that you keep this message intact.
*/
this.sysname=mname;
this.strMessage = strMessage;
ThreadStart tStart = new ThreadStart(this.SendMessageThread);
Thread senderThread = new Thread(tStart);
senderThread.Start();
}


public void SendMessageThread()
{
/*
This method is created by Anton Zamov.
web site: http://zamov.online.fr

Feel free to use and redistribute this method
in condition that you keep this message intact.
*/
try
{


string strLine = "net send " + sysname + " " +
this.strMessage + " > C:\\\\netsend.log";
FileStream fs = new FileStream("c:\\\\netsend.bat" ,
FileMode.Create,
FileAccess.Write);
StreamWriter streamWriter = new StreamWriter(fs);
streamWriter.BaseStream.Seek(0, SeekOrigin.End);
streamWriter.Write(strLine);
streamWriter.Flush();
streamWriter.Close();
fs.Close();

Process p = new Process();
p.StartInfo.FileName = "C:\\\\netsend.bat";
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
p.Start();
p.WaitForExit();
p.Close();

FileStream fsOutput = new FileStream("C:\\\\netsend.log",
FileMode.Open ,
FileAccess.Read);
StreamReader reader = new StreamReader(fsOutput);
reader.BaseStream.Seek(0,SeekOrigin.Begin);
string strOut = reader.ReadLine();
reader.Close();
fsOutput.Close();


}
catch(Exception)
{

// TODO

}

}

About the author of this programming example or tutorial:
Anton Zamov is a software engineer with more than6 years of active experience in web and software development and design.
Anton Zamov has extensive experience and broad knowledgebase in C# and JAVA programming and has created a lot of running e-commerce systems, portals and content management systems using PHP and other web development technologies.
For more information about Anton Zamov, you may visit the personal web site of Anton Zamov.



 
 
 
NETART MEDIA is one of the fast growing IT companies striving to offer quality web and e-commerce products, like for example:
 
 
 
Copyright 2002-2005 NetArt Media, this website is created and maintained with WebSiteAdmin | Submit an example | Contact us