| | |
TreeView HitTest not working
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jan 2008
Posts: 56
Reputation:
Solved Threads: 0
(I'm using VBA with Excel 2003, have references to OLE Automation and Microsoft Common Controls 6.0). The Hittest with my Treeview control does not seem to be working. I'm using it in a MouseDown event. The X and Y coordinates are being passed properly and are the correct values, but every time the node is always set to the top one, regardless of where I click on the Treeview window (yes I have more than one node). Code Below:
No matter where I click, even though X and Y change, dragNode always set to first node.
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub TreeView1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As stdole.OLE_XPOS_PIXELS, ByVal Y As stdole.OLE_YPOS_PIXELS) Set dragNode = TreeView1.HitTest(X, Y) End Sub
No matter where I click, even though X and Y change, dragNode always set to first node.
Last edited by Tekito; Oct 14th, 2008 at 12:19 pm.
![]() |
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Faster way to pick a option than Select Case in VB 6?
- Next Thread: Getting computer name or IP
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





