· 做了一个控件,这样就可以告别图片按钮了:)效果:程序源代码:using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
using System.Drawing.Text;namespace WindowsControlL...
· [C#]
public static Process RunningInstance()
{ Process current = Process.GetCurrentProcess(); Process[] processes = Process.GetProcessesByName (current.ProcessName); //Loop through the running processes in with the same name foreach (Process process in processes) { /...
· This is an article on Constructors in C#, for the beginner level programmers. It covers simple constructors, constructors overloading, behaviour of constructors in inheritance, constructor chaining and static constructors. At the end, it contains the general FAQs about constr...
· 初学VB.Net ,总结一下ByVal和ByRef1 通过ByVal传递的变量,VB.Net会复制与源值相等的一个新的变量。而ByRef则相当于引用。
例如我们学习C的时候得Swap()函数Imports System
'Test that Can't Swap A and B
Class MyAppPublic Shared Sub Main()Dim A As Integer = 0Dim B As Integer = 1Console.w...
· '获得硬盘序列号Dim cmicWmi As New System.Management.ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive")Dim Uint32 As UInt32For Each cmicWmiObj As ManagementObject In cmicWmi.GetUint32 = cmicWmiObj("signature")NextTextBox1.Text = Uint32.ToString'获得C...
· 开始时引用
Imports System.IO按钮的Click事件
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click'打开目标文件(文件流)Dim myFs As New FileStream(Application.StartupPath & "\a.txt", FileMode.Open, FileAccess.R...