我用Visual Studio 2005 编了一些小程序(C#的)照搬书上的
听说不能直接发给别人用。
那要如何做才能给别人用呢??????
顺便也给出代码吧
不要笑偶 偶刚刚开始学编程=_=U
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Windows9._._
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int start, length;
try
{
start = Convert.ToInt32(textBox2.Text);
length = Convert.ToInt32(textBox3.Text);
textBox1.Select(start, length);
textBox1.Focus();
}
catch (FormatException e1)
{
MessageBox.Show("输入的起点位置和长度应该全是数字!");
}
}
private void button2_Click(object sender, EventArgs e)
{
string sstr, dstr;
int i;
sstr = textBox1.SelectedText;
dstr = "";
for (i = sstr.Length - 1; i >= 0; i--)
dstr = dstr + sstr.Substring(i,1);
textBox4.Text = dstr;
textBox4.SelectAll();
}
}
}