Solved

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

Posted on 2000-03-15
2
481 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 50 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Validating VB6 Function 19 68
Computer crashes, following error message in event manager 5 280
Hide vba in gp 7 118
Visual Studio 2005 text editor 10 49
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

726 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