易截截图软件、单文件、免安装、纯绿色、仅160KB

C#自动关机源码

源码如下:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.IO;
using Microsoft.Win32;
namespace mv
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("请点击确定键关机(点确定下次开机自动关机,点取消下次不运行)", "info", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
            if (result == DialogResult.Yes)
            {
                string path = System.Windows.Forms.Application.ExecutablePath;
                int ab=path.Length;
                int a = path.LastIndexOf(@"\");
                int b = path.LastIndexOf(".");
                string mess = path.Substring(a+1, b - a - 1);
                MessageBox.Show(mess);
      &nb


相关文档:

如何在JavaScript访问C#函数?


1.如何在JavaScript访问C#函数?
问题1答案如下:
javaScript函数中执行C#代码中的函数:
方法一:1、首先建立一个按钮,在后台将调用或处理的内容写入button_click中;
          2、在前台写一个js函数,内容为document.getElementById("btn1").click();
   ......

ASP.NET(C#)常用代码30例

1. 打开新的窗口并传送参数:
  传送参数:
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>")
  接收参数:
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
  2.为按钮添加对话框
Button1 ......

C#开机自动启动应用程序

//命名空间 using Microsoft.Win32;
private void checkBox2_CheckedChanged(object sender, System.EventArgs e)
{
if (checkBox2.Checked) //设置开机自启动
{
//MessageBox.Show ("设置开机自启动需要修改注册表","提示");
string path = Application.ExecutablePath;
RegistryKey rk = Registry.LocalMac ......

c# 操作excel

 OleDbConnection conn = null;
            try
            {
               `string strConn;
  &n ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号