Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How do I detect a picture in MSFlexGrid's CellPicture?

Posted on 2000-03-15
2
Medium Priority
?
508 Views
Last Modified: 2012-05-04
How do I detect a picture in MSFlexGrid's CellPicture property. I have picture A and picture B that I put in a MSFlexgrid's cellpicture property. I would like to do :

if MSFlexgrid.CellPicture = Picture A ...

Can this be done?
0
Comment
Question by:mfarid1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 32

Accepted Solution

by:
Erick37 earned 200 total points
ID: 2620112
The one unique value you can test is the CellPicture.Handle value. The handles will be the same for the picture object and the CellPicture.  Remember that the value of the handle will change each time a new picture is loaded.

Ex:

Option Explicit

Private picA As StdPicture

Private Sub Command1_Click()
    If (picA.Handle = MSFlexGrid1.CellPicture.Handle) Then
        'It's picA
        Debug.Print picA.Handle
    End If
End Sub

Private Sub Form_Load()
    Set picA = LoadPicture("c:\test.bmp")
    Set MSFlexGrid1.CellPicture = picA
End Sub
0
 

Author Comment

by:mfarid1
ID: 2629527
Thanks
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question