Hi,
Found this code to move a borderless form, but gives me an error:
VB Code:
using Microsoft.Win32; private const int WM_NCLBUTTONDOWN = 0xA1; private const int HTCAPTION = 0x2; [DllImport("user32.dll")] public static extern bool ReleaseCapture(); [ DllImport( "user32.dll" ) ] public static extern int SendMessage( IntPtr hWnd, int Msg, int wParam, int lParam ); private System.Windows.Forms.Button cmdExit; private System.ComponentModel.Container components = null; private void Form1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { if ( e.Button == MouseButtons.Left ) { ReleaseCapture(); SendMessage( Handle, WM_NCLBUTTONDOWN, HTCAPTION, 0 ); } }
The error says:
"The type or namespace DLLImport could not be found..."


Reply With Quote
