Click here to Skip to main content
15,922,894 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralPage subtotal in MS Access 2003 Report Pin
steff kamush12-Jan-05 2:35
steff kamush12-Jan-05 2:35 
GeneralRe: Page subtotal in MS Access 2003 Report Pin
Dave Kreskowiak12-Jan-05 3:59
mveDave Kreskowiak12-Jan-05 3:59 
GeneralUpdateLayeredWindow - My great pain :) Pin
Axonn Echysttas11-Jan-05 21:46
Axonn Echysttas11-Jan-05 21:46 
GeneralRe: UpdateLayeredWindow - My great pain :) Pin
Dave Kreskowiak12-Jan-05 4:56
mveDave Kreskowiak12-Jan-05 4:56 
GeneralRe: UpdateLayeredWindow - My great pain :) Pin
Axonn Echysttas12-Jan-05 21:39
Axonn Echysttas12-Jan-05 21:39 
GeneralRe: UpdateLayeredWindow - My great pain :) Pin
Dave Kreskowiak13-Jan-05 2:10
mveDave Kreskowiak13-Jan-05 2:10 
GeneralRe: UpdateLayeredWindow - My great pain :) Pin
Axonn Echysttas13-Jan-05 9:33
Axonn Echysttas13-Jan-05 9:33 
Generalbuttons location while Drag and Drop Pin
Greeky11-Jan-05 21:24
Greeky11-Jan-05 21:24 
In a form i have a button(btnCaption) and a panel(pnlTemplate).Button's Location can be changed with mouse and ctrl key.If i press at button's left top corner then change its location, there is no problem, but When i press any other side of button; while i drop button, mouse pointer(X,Y)location is set to button left top corner. Probably i have to change pnlTemplate_DragDrop sub, but i couldnt yet. please help me.

-CODE-----------------------------------------------------------
Dim m_MouseIsDown As Boolean = False
Dim LastClickedButton As String
Private Sub btnCaption_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles btnCaption.MouseDown
If e.Button = MouseButtons.Left And m_ControlKeyPressed Then
m_MouseIsDown = True
End If
End Sub
Private Sub btnCaption_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles btnCaption.MouseMove
If m_MouseIsDown Then
btnCaption.DoDragDrop(btnCaption, DragDropEffects.Move)
End If
End Sub
Dim m_ControlKeyPressed As Boolean = False
Private Sub btnCaption_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles btnCaption.KeyUp
Select Case e.KeyCode
Case Keys.Escape : m_MouseIsDown = False : m_ControlKeyPressed = False
Case Keys.ControlKey : m_ControlKeyPressed = False
End Select
End Sub
Private Sub btnCaption_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles btnCaption.KeyDown
Select Case e.KeyCode
Case Keys.ControlKey : m_ControlKeyPressed = True
End Select
End Sub
Private Sub pnlTemplate_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles pnlTemplate.DragEnter
If m_MouseIsDown Then
If e.Data.GetDataPresent(GetType(Button)) Then
e.Effect = DragDropEffects.Move
Else
e.Effect = DragDropEffects.None
m_MouseIsDown = False
m_ControlKeyPressed = False
End If
End If
End Sub

Private Sub pnlTemplate_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles pnlTemplate.DragDrop
If m_MouseIsDown Then
If e.Effect = DragDropEffects.Move Then
Dim btn As Button = DirectCast(e.Data.GetData(GetType(Button)), Button)
Dim clientpoint As Point
clientpoint = PointToClient(New Point(e.X, e.Y))
If Not (clientpoint.X < 0 Or clientpoint.Y < 0) Then
btn.Left = clientpoint.X - pnlTemplate.Left
btn.Top = clientpoint.Y - pnlTemplate.Top
End If
m_MouseIsDown = False
m_ControlKeyPressed = False
End If
End If
End Sub
GeneralVB and C++ dll Pin
Tomaz Rotovnik11-Jan-05 20:23
Tomaz Rotovnik11-Jan-05 20:23 
GeneralRe: VB and C++ dll Pin
[DK]KiloDunse11-Jan-05 23:50
[DK]KiloDunse11-Jan-05 23:50 
GeneralRe: VB and C++ dll Pin
Tomaz Rotovnik12-Jan-05 4:30
Tomaz Rotovnik12-Jan-05 4:30 
GeneralRe: VB and C++ dll Pin
[DK]KiloDunse12-Jan-05 4:49
[DK]KiloDunse12-Jan-05 4:49 
GeneralRe: VB and C++ dll Pin
Tomaz Rotovnik12-Jan-05 5:47
Tomaz Rotovnik12-Jan-05 5:47 
GeneralPhone Answer Pin
nitin_ion11-Jan-05 20:13
nitin_ion11-Jan-05 20:13 
GeneralConversion of float to hexadecimal value Pin
phijophlip11-Jan-05 19:56
phijophlip11-Jan-05 19:56 
GeneralRe: Conversion of float to hexadecimal value Pin
Dave Kreskowiak12-Jan-05 3:54
mveDave Kreskowiak12-Jan-05 3:54 
Generaldata connection to ms excel Pin
abdulla hamid11-Jan-05 18:16
abdulla hamid11-Jan-05 18:16 
GeneralRe: data connection to ms excel Pin
Ritesh123411-Jan-05 21:15
Ritesh123411-Jan-05 21:15 
GeneralRe: data connection to ms excel Pin
Britnt712-Jan-05 9:14
Britnt712-Jan-05 9:14 
GeneralRe: ReadFile not working in VB.NET Pin
Dave Kreskowiak11-Jan-05 15:49
mveDave Kreskowiak11-Jan-05 15:49 
GeneralRe: ReadFile not working in VB.NET Pin
Roman Nurik11-Jan-05 18:17
Roman Nurik11-Jan-05 18:17 
GeneralRe: ReadFile not working in VB.NET Pin
Dave Kreskowiak12-Jan-05 1:06
mveDave Kreskowiak12-Jan-05 1:06 
Generalproblem with visual studio .net and the oledb namespace Pin
Anonymous11-Jan-05 14:57
Anonymous11-Jan-05 14:57 
GeneralRe: problem with visual studio .net and the oledb namespace Pin
Dave Kreskowiak12-Jan-05 1:01
mveDave Kreskowiak12-Jan-05 1:01 
GeneralRe: problem with visual studio .net and the oledb namespace Pin
Anonymous12-Jan-05 4:21
Anonymous12-Jan-05 4:21 

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.