UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> FlexGrid/MouseDown works in VB 6.0, but does not work in Access    
 
   
titus1429
post Oct 8 2004, 01:53 PM
Post #1

UtterAccess Member
Posts: 28



I am working with FlexGrid control. I have a code snippet that works fine on Visual Basic 6.0, but doesn't work in MS Access 2000. I can't figure out the problem or solution. Can someone clarify for me and if there is a solution to this functionality for Access 2000.

The basic function is to click on any cell in the FlexGrid and a message box will appear with current row and column position. The Mouse Down is the function that is in contorl of the mouse. Which is the very essense of this problem.

Thanks
code snippet attached.
Go to the top of the page
 
+
Girn13
post Oct 8 2004, 02:32 PM
Post #2

UtterAccess Guru
Posts: 700
From: Long Island NY, USA



I'm using 2002 sp-2 and when I added mousedown to my flexgrid it produced this

Private Sub InvGrid_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Long, ByVal y As Long)

I copied your code, changed where appropriate and it ran fine. I'd suggest commenting out your code from VB 6.0 and let Access generate the MouseDown Sub and see if it differs from VB.
Go to the top of the page
 
+
titus1429
post Oct 8 2004, 03:08 PM
Post #3

UtterAccess Member
Posts: 28



It worked fine for me too!Awesome...thanks man!!!
Go to the top of the page
 
+
titus1429
post Oct 8 2004, 10:19 PM
Post #4

UtterAccess Member
Posts: 28



I thought I had this thing figured out, but the following function is blowing up on the Icon and Drag portion of the code. The purpose of this function is to move, but it is not recognizing the dragIcon and drag commands. It works fine with VB6.0, but is blowing up in Access. Any insight here?


Private Sub MSFlexGrid1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Long, ByVal y As Long)


Dim strPath As String
strPath = "C:\Projects\Proj\box.ico"


If Button = 1 Then
DragText = MSFlexGrid1.TextMatrix(MSFlexGrid1.row, MSFlexGrid1.col)
MSFlexGrid1.DragIcon = LoadPicture(Pic) ' load picture.
MSFlexGrid1.Drag

End If
End Sub
Go to the top of the page
 
+
Girn13
post Oct 11 2004, 08:39 AM
Post #5

UtterAccess Guru
Posts: 700
From: Long Island NY, USA



I looked in the object browser and my version of Flexgrid has no Drag or DragIcon members. They might be specific to VB.
Go to the top of the page
 
+
titus1429
post Oct 11 2004, 12:32 PM
Post #6

UtterAccess Member
Posts: 28



http://msdn.microsoft.com/library/default....idControl_M.asp

This article says that there is the Drag method and DragIcon. But they are not working at all. Do you know if this is version specific for the MSFlexGrid?

thanks
Go to the top of the page
 
+
Girn13
post Oct 13 2004, 07:40 AM
Post #7

UtterAccess Guru
Posts: 700
From: Long Island NY, USA



I still find no reference to Drag and DragIcon. All I can assume is that the versions I'm working with are not up to date. If you have them in VB then I'd suggest adding a refeerence to the VB MSFlexGrid.ocx to your Access app and see if that does it.
Sorry, that's my best shot at this point.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 18th June 2013 - 04:19 PM