Tình hình là mình muốn mở Windows Media Player bằng cách click chuột vào 1 button của windows form nhưng làm chưa dk mình làm thế này. ai biết xin chỉ giáo nha.
Mã:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace aa
{
public partial class Form1 : Form
{
[DllImport("Kernel32.dll")]
[DllImport("wmp.dll")]
public static extern uint WinExec(string path, uint uCmdShow);
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
WinExec("wmplayer.exe", 1);
}
}
}
Sao thằng bạn nó mở Remote Desktop Conection dk nhỉ,code của nó.
Mã:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace aa
{
public partial class Form1 : Form
{
[DllImport("Kernel32.dll")]
public static extern uint WinExec(string path, uint uCmdShow);
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
WinExec("mstsc.exe", 1);
}
}
}
View more random threads:
Dưới ánh nắng mặt trời đang lên, những đống pallet nhựa An Giang trải dài mênh mông như những bức tranh tự nhiên đầy sắc màu. Mỗi chiếc pallet nhựa không chỉ là một vật dụng thông thường mà còn là...
Pallet nhựa An Giang giao hàng...