· 这个问题在很多论坛里边都有问到。但是一直没找到满意的答案。下边写出一个解决办法Dim sql As StringDim rstLiuShui As New ADODB.RecordsetDim Rpt As New CRAXDDRT.ReportDim PrintApp As New CRAXDDRT.ApplicationIf Option2.Value = True Thensql = "select * from n_ihbill where dated...
· 1. 新建一个module,先写一下API的声明:Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal idHook As HookType, ByVal lpfn As HOOKPROC, ByVal hmod As Integer, ByVal dwThreadId As Integer) As IntegerDeclare Function Unhook...
· 类文件:(Class1)
Imports System
Imports System.Reflection
<AttributeUsage(AttributeTargets.All, AllowMultiple:=True, Inherited:=True)> _
Public Class Class1Inherits System.AttributePrivate FamilyName As StringPrivate GivenName As StringPublic Sub New(ByVal FamilyName As...
· 我的方法是重写MenuItem类,在写的过程中发现用GDI+实际测量出来的文本的大小不是很准确,还有文本也不能很好对齐,固在代码里可以时常看到很多多加上去的数字.我想原理就不用我讲了吧,下面的代码注释的很
清楚了:
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using Syste...
· #region Using directivesusing System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;#endregionnamespace p_polygon
{partial class Form1 : Form{public Form1(){InitializeComponent();}public int ...
· C#没有提供播放MP3等音频文件的类,要编写播放MP3等音频文件程序,必须使用第三方控件或类。本文使用API函数mciSendString,编写一个播放MP3等音频文件的类。 具体源码如下:一、使用API函数mciSendString构成的媒体播放类。
using System;
using System.Runtime.InteropServices;
using System....
· Check Your Internet Connection With C#
By Simohamed Attahri 用C#检测你的网络连接How to check if your computer is connected to the internet with C#. It's much more easier that other tutorials I've seen in other sites. In deed, we're going to use a simple API function InternetG...