Click here to Skip to main content
15,916,692 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: What is an XML editor? [modified] Pin
giddy_guitarist15-Jul-06 8:02
giddy_guitarist15-Jul-06 8:02 
AnswerRe: What is an XML editor? Pin
giddy_guitarist15-Jul-06 20:59
giddy_guitarist15-Jul-06 20:59 
QuestionTrouble with combobox in DataGrid Pin
fiaolle14-Jul-06 23:29
fiaolle14-Jul-06 23:29 
QuestionDataGrid Pin
Amarni14-Jul-06 22:40
Amarni14-Jul-06 22:40 
AnswerRe: DataGrid Pin
RookieThomas14-Jul-06 23:30
RookieThomas14-Jul-06 23:30 
QuestionMove Form Pin
Socheat.Net14-Jul-06 15:59
Socheat.Net14-Jul-06 15:59 
AnswerRe: Move Form Pin
Dave Kreskowiak14-Jul-06 16:28
mveDave Kreskowiak14-Jul-06 16:28 
AnswerRe: Move Form Pin
The ANZAC14-Jul-06 16:51
The ANZAC14-Jul-06 16:51 
I have code for that.
Put this at the top of your form class(in the declarations area):

Private Declare Function ReleaseCapture Lib "user32" () As Integer
'UPGRADE_ISSUE: Declaring a parameter 'As Any' is not supported. Click for more: 'ms-help://MS.VSExpressCC.v80/dv_commoner/local/redirect.htm?keyword="FAE78A8D-8978-4FD4-8208-5B7324A8F795"'
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByRef lParam As Integer) As Integer

Private Const HTCAPTION As Short = 2
Private Const WM_NCLBUTTONDOWN As Short = &HA1S

Private Const WM_SYSCOMMAND As Short = &H112S

And put this in the label_mousedown sub:

Dim Button As Short = Button \ &H100000
Dim Shift As Short = System.Windows.Forms.Control.ModifierKeys \ &H10000
Dim X As Single = (X)
Dim Y As Single = (Y)
ReleaseCapture()
SendMessage(Handle.ToInt32, WM_NCLBUTTONDOWN, HTCAPTION, 0)

Now when you hold the mouse down on that label, you will be able to move the form around.

Posted by The ANZAC

-- modified at 22:53 Friday 14th July, 2006
GeneralRe: Move Form Pin
The ANZAC15-Jul-06 18:35
The ANZAC15-Jul-06 18:35 
GeneralRe: Move Form Pin
Dave Kreskowiak16-Jul-06 1:42
mveDave Kreskowiak16-Jul-06 1:42 
QuestionRunning Executables Pin
The ANZAC14-Jul-06 12:47
The ANZAC14-Jul-06 12:47 
AnswerRe: Running Executables Pin
Jun Du14-Jul-06 14:39
Jun Du14-Jul-06 14:39 
GeneralRe: Running Executables Pin
The ANZAC14-Jul-06 16:48
The ANZAC14-Jul-06 16:48 
AnswerRe: Running Executables Pin
Keith Malwitz16-Jul-06 19:18
Keith Malwitz16-Jul-06 19:18 
Questionhow to apply texture Pin
syed imran azmat14-Jul-06 11:23
syed imran azmat14-Jul-06 11:23 
QuestionProblem with DeviceIoControl Pin
gupta_san4114-Jul-06 11:08
gupta_san4114-Jul-06 11:08 
QuestionBulk Insertion into database from asp.net Pin
montu337714-Jul-06 10:45
montu337714-Jul-06 10:45 
AnswerRe: Bulk Insertion into database from asp.net Pin
Kschuler14-Jul-06 11:28
Kschuler14-Jul-06 11:28 
GeneralRe: Bulk Insertion into database from asp.net Pin
montu337718-Jul-06 5:03
montu337718-Jul-06 5:03 
Questionrichtextboxes and .doc files [modified] Pin
giddy_guitarist14-Jul-06 7:24
giddy_guitarist14-Jul-06 7:24 
QuestionFilewatcher VB2005 Pin
RookieThomas14-Jul-06 6:47
RookieThomas14-Jul-06 6:47 
AnswerRe: Filewatcher VB2005 Pin
Kschuler14-Jul-06 8:46
Kschuler14-Jul-06 8:46 
GeneralRe: Filewatcher VB2005 Pin
RookieThomas14-Jul-06 23:23
RookieThomas14-Jul-06 23:23 
GeneralRe: Filewatcher VB2005 Pin
Dave Kreskowiak15-Jul-06 3:49
mveDave Kreskowiak15-Jul-06 3:49 
QuestionApplication.Restart, a better way? Pin
J Liang14-Jul-06 5:37
J Liang14-Jul-06 5:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.