上个示例是C#调用windows api 在原来代码上加入窗体透明,控件不透明代码: using System; using System.Runtime.InteropServices; using System.Windows.Forms; namespace HoverTreeWinForm { public partial class FormHewenqi : Form { /// <summary> /// 使窗体透明 by 何问起 /// </summary> pro
#define WINVER 0x0501 #include <windows.h> /* Declare Windows procedure */ LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM); /* Make the class name into a global variable */ char szClassName[ ] = "WindowsApp"; int WINAPI WinMa
Option Explicit ' ******************** 窗体透明 ******************** '***Module.bas '**** Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long Public Declare Function
代码 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim B As New Bitmap(Me.Width, Me.Height) Using G As Graphics = Graphics.FromImage(B) G.TextRenderingHint = Drawing.Text.TextRenderingHint.AntiAliasGridFit G.Clip = New Re