Hy, I need help i create this aplication, and i want to associate with cmd:
-On put in textbox (NAME OR IP) write this command in cmd
-On put In MESSAGE BOX (WRITE IN CMD)
CMD COMMAND IS:
net send (IP or NAME) (MESSAGE)
-On press send MESSAGE SENT TO COMPUTER...
MY VISUAL BASIC CODE:
Form1.jsl
Program.jslCode:package WindowsApplication1;
import System.Collections.Generic.*;
import System.Data.*;
import System.Drawing.*;
import System.ComponentModel.*;
import System.Windows.Forms.*;
/**
* Summary description for Form1.
*/
public class Form1 extends System.Windows.Forms.Form
{
private ProgressBar progressBar1;
private Button button1;
private TextBox textBox1;
private TextBox textBox2;
private Label label1;
private Label label2;
private Label label3;
private Label label4;
private Label label5;
/**
* Required designer variable.
*/
private System.ComponentModel.IContainer components;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
#region Windows Form Designer generated code
/**
* Clean up any resources being used.
*/
protected void Dispose(boolean disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
super.Dispose(disposing);
}
/**
* Required method for Designer support - do not modify
* the contents of this method with the code editor.
*/
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(Form1.class.ToType());
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// progressBar1
//
this.progressBar1.set_Location(new System.Drawing.Point(65, 319));
this.progressBar1.set_Name("progressBar1");
this.progressBar1.set_Size(new System.Drawing.Size(159, 21));
this.progressBar1.set_TabIndex(0);
this.progressBar1.add_Click(new System.EventHandler(this.progressBar1_Click));
//
// button1
//
this.button1.set_Location(new System.Drawing.Point(96, 247));
this.button1.set_Name("button1");
this.button1.set_Size(new System.Drawing.Size(94, 25));
this.button1.set_TabIndex(1);
this.button1.set_Text("SEND");
this.button1.set_UseVisualStyleBackColor(true);
//
// textBox1
//
this.textBox1.set_Location(new System.Drawing.Point(0, 0));
this.textBox1.set_Name("textBox1");
this.textBox1.set_Size(new System.Drawing.Size(155, 22));
this.textBox1.set_TabIndex(2);
//
// textBox2
//
this.textBox2.set_Location(new System.Drawing.Point(65, 166));
this.textBox2.set_Multiline(true);
this.textBox2.set_Name("textBox2");
this.textBox2.set_Size(new System.Drawing.Size(177, 64));
this.textBox2.set_TabIndex(3);
//
// label1
//
this.label1.set_AutoSize(true);
this.label1.set_Font(new System.Drawing.Font("Sylfaen", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((ubyte)0)));
this.label1.set_Location(new System.Drawing.Point(93, 290));
this.label1.set_Name("label1");
this.label1.set_Size(new System.Drawing.Size(97, 26));
this.label1.set_TabIndex(4);
this.label1.set_Text("Loading...");
//
// label2
//
this.label2.set_AutoSize(true);
this.label2.set_Font(new System.Drawing.Font("Sylfaen", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((ubyte)0)));
this.label2.set_Location(new System.Drawing.Point(2, 131));
this.label2.set_Name("label2");
this.label2.set_Size(new System.Drawing.Size(79, 14));
this.label2.set_TabIndex(5);
this.label2.set_Text("IP/USERNAME:");
this.label2.add_Click(new System.EventHandler(this.label2_Click));
//
// label3
//
this.label3.set_AutoSize(true);
this.label3.set_Location(new System.Drawing.Point(2, 190));
this.label3.set_Name("label3");
this.label3.set_Size(new System.Drawing.Size(57, 14));
this.label3.set_TabIndex(6);
this.label3.set_Text("MESSAGE:");
//
// label4
//
this.label4.set_AutoSize(true);
this.label4.set_Location(new System.Drawing.Point(12, 43));
this.label4.set_Name("label4");
this.label4.set_Size(new System.Drawing.Size(295, 70));
this.label4.set_TabIndex(7);
this.label4.set_Text(resources.GetString("label4.Text"));
//
// label5
//
this.label5.set_AutoSize(true);
this.label5.set_Font(new System.Drawing.Font("Sylfaen", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((ubyte)0)));
this.label5.set_ForeColor(System.Drawing.SystemColors.get_ActiveCaptionText());
this.label5.set_Location(new System.Drawing.Point(2, 9));
this.label5.set_Name("label5");
this.label5.set_Size(new System.Drawing.Size(296, 22));
this.label5.set_TabIndex(8);
this.label5.set_Text("Welcome To Net Sender Beta Version 1.01");
this.label5.add_Click(new System.EventHandler(this.label5_Click));
//
// Form1
//
this.set_AccessibleDescription("Net Sender");
this.set_AccessibleName("Net Sender");
this.set_AutoScaleDimensions(new System.Drawing.SizeF(6F, 14F));
this.set_AutoScaleMode(System.Windows.Forms.AutoScaleMode.Font);
this.set_BackColor(System.Drawing.Color.get_DodgerBlue());
this.set_ClientSize(new System.Drawing.Size(310, 352));
this.get_Controls().Add(this.button1);
this.get_Controls().Add(this.label5);
this.get_Controls().Add(this.label4);
this.get_Controls().Add(this.label3);
this.get_Controls().Add(this.label2);
this.get_Controls().Add(this.label1);
this.get_Controls().Add(this.textBox2);
this.get_Controls().Add(this.textBox1);
this.get_Controls().Add(this.progressBar1);
this.set_Font(new System.Drawing.Font("Sylfaen", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((ubyte)0)));
this.set_FormBorderStyle(System.Windows.Forms.FormBorderStyle.Fixed3D);
this.set_Icon(((System.Drawing.Icon)(resources.GetObject("$this.Icon"))));
this.set_Name("Form1");
this.set_Opacity(0.95);
this.set_RightToLeft(System.Windows.Forms.RightToLeft.No);
this.set_Tag("Index");
this.set_Text("Net Sender v.1.01");
this.set_TransparencyKey(System.Drawing.Color.get_Gainsboro());
this.add_Load(new System.EventHandler(this.Form1_Load));
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private void Form1_Load(Object sender, System.EventArgs e)
{
}
private void label2_Click(Object sender, System.EventArgs e)
{
}
private void label5_Click(Object sender, System.EventArgs e)
{
}
private void contextMenuStrip1_Opening(Object sender, CancelEventArgs e)
{
}
private void notifyIcon1_MouseDoubleClick(Object sender, MouseEventArgs e)
{
}
private void progressBar1_Click(Object sender, System.EventArgs e)
{
}
}
Form1.resxCode:package WindowsApplication1;
import System.Collections.Generic.*;
import System.Windows.Forms.*;
/**
* Summary description for Program
*/
public class Program
{
/**
* The main entry point for the application.
*/
/** @attribute System.STAThread() */
public static void main(String[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
Form1.jsl [DESIGN]
SORRY FOR BAD ENGLISH THX FOR READ AND HELP
THANKS AGAIN.

