IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası

IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası (https://www.ircforumlari.net/)
-   Delphi (https://www.ircforumlari.net/delphi/)
-   -   Basit network Mesaj programı (https://www.ircforumlari.net/delphi/688272-basit-network-mesaj-programi.html)

Kaf_Dağı 11 Mart 2015 13:29

Basit network Mesaj programı
 
Basit network Mesaj programı

Kod:

//sadece edit1 ve memo1 ve button1 ekleyiniz...
unit Unit1;
 
interface
 
uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ShellApi,StdCtrls;
 
type
  TForm1 = class(TForm)
    Button1: TButton;
    Edit1: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    memo1: TMemo;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
  procedure ExecuteShellCommand(cmdline: string; hidden: Boolean);
    { Public declarations }
  end;
 
var
 a,b:string;
  Form1: TForm1;
 
implementation
 
{$R *.DFM}
 
procedure Tform1.ExecuteShellCommand(cmdline: string; hidden: Boolean);
const
flags: array [Boolean] of Integer = (SW_SHOWNORMAL, SW_HIDE);
var
cmdbuffer: array [0..MAX_PATH] of Char;
begin
GetEnvironmentVariable('COMSPEC', cmdBUffer, SizeOf(cmdBuffer));
StrCat(cmdbuffer, ' /C ');
StrPCopy(StrEnd(cmdbuffer), cmdline);
WinExec(cmdbuffer, flags[hidden]);
end;
 
procedure TForm1.Button1Click(Sender: TObject);
 
begin
 a:= edit1.text;
 b:=memo1.text;
 //c:= 'net send ' +a + ' ' +
ExecuteShellCommand('net send  ' + a+ ' ' + b , True);
 
end;
 
procedure TForm1.FormCreate(Sender: TObject);
begin
memo1.text:='';
end;



Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 21:53.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
Copyright ©2004 - 2025 IRCForumlari.Net Sparhawk