You've told us a few things that don't work.
Could you tell us in simple term sWHAT you are trying to accomplish? And what constraints are involved? Perhaps an example (mock up) would clarify things (for me at least).
The web page below has dynamic values on the web page such as pressure, temperature, etc. I have attached a picture that you can see below to give you an idea of what it would look like...
Right now I just have a screenshot image of the web page that I click on a valve or piece of equipment and it brings up a form. This works great but I would ultimately like to do an overlay of command buttons over a live web version.
The web page below has dynamic values on the web page such as pressure, temperature, etc. I have attached a picture that you can see below to give you an idea of what it would look like...
Right now I just have a screenshot image of the web page that I click on a valve or piece of equipment and it brings up a form. This works great but I would ultimately like to do an overlay of command buttons over a live web version.
Hi. Sorry for the delay... While testing it out, I discovered that the buttons show up if the web browser control is disabled. So, all I did was use a Timer event to disable the web browser control and then turn off the timer. Hope that helps...
OK - sorry - that doies work but of course, it defeats the whole point of using a web browser control as its no longer active.
In which case, you may just as well use an image control or ...as I previously suggested, place the command button near the web browser but not 'over' it.
OK - sorry - that doies work but of course, it defeats the whole point of using a web browser control as its no longer active.
In which case, you may just as well use an image control or ...as I previously suggested, place the command button near the web browser but not 'over' it.
Understood about the drawbacks. However, from what I understand, the OP can't use a static image because the web page could have dynamic content. For instance, perhaps each time the form opens, the web page could be displaying a different diagram. So, I guess the other option is to somehow dynamically capture an image of the website and then use an image control instead. Maybe one of those "screen capture" routines for taking a snapshot of an error message could work for this. Either way, I think the intent was not to use a "live" web page because the user won't be "clicking" on its content. Rather, the OP wants the user to click on the buttons placed on the Access Form instead.
Watching with interest and wondering why the mouse down suggestion just seemed to fall off the table in favour of a 'sometimes disabled, maybe no longer relevant to the page' buttons thingy...
Watching with interest and wondering why the mouse down suggestion just seemed to fall off the table in favour of a 'sometimes disabled, maybe no longer relevant to the page' buttons thingy...
Hi @Micron. I would like to know the answer to that question as well. I only had time to test my own idea for a suggestion I made earlier. If somebody else has the time to try the MouseDown solution, please let us know what you find out.
Hi @Micron. I would like to know the answer to that question as well. I only had time to test my own idea for a suggestion I made earlier. If somebody else has the time to try the MouseDown solution, please let us know what you find out
I looked at it and doubt it would work because of scrolling. If and only if, there was no scrolling it could it work. If that was the case then you could basically grid it out into a key pad. Lets say a 3x3, and the grids would be. So you could build a function to return what grid was clicked based on x and y.
1 2 3
4 5 6
7 8 9
In a table you could store what action to take if they clicked in grid 6 for an image. This way if the image changed you could add actions and update. I did this and it worked fine, but find it unlikely. If you want more functionality you can make more keys to the grid.
What you've done sounds great, smart idea! Is it possible you could post a copy of the test db you tried this on so I can see how you put it all together?
theDBguy good simple idea and it could work maybe as an alternative to capture the image and values when they load but more interested in MajP solution.
What you've done sounds great, smart idea! Is it possible you could post a copy of the test db you tried this on so I can see how you put it all together?
theDBguy good simple idea and it could work maybe as an alternative to capture the image and values when they load but more interested in MajP solution.
Here is a generic function that allows you to grid any control. Just define the number rows and columns
Code:
Public Type GridCell
Row As Integer
Column As Integer
End Type
Public Function GetCell(Ctrl As Access.Control, numberRows As Long, NumberColumns As Long, x As Single, Y As Single) As GridCell
Dim cellWidth As Single
Dim cellHeight As Single
Dim i As Integer
Dim j As Integer
cellWidth = Ctrl.Width / NumberColumns
cellHeight = Ctrl.Height / numberRows
Y = Y - Ctrl.Top
x = x - Ctrl.Left
For i = 0 To numberRows - 1
If Y > i * cellHeight And Y <= (i + 1) * cellHeight Then
i = i + 1
Exit For
End If
Next i
For j = 0 To NumberColumns - 1
If x > j * cellWidth And x <= (j + 1) * cellWidth Then
j = j + 1
Exit For
End If
Next j
GetCell.Row = i
GetCell.Column = j
End Function
So for each image you could have a table with what to do when a grid is clicked
TblImageGrids
-- imageID
-- gridCell ( I would store it like "3,9")
-- gridAction 'likely open a specific form
You may have to use application.run if your action is a procedure. I have never used it.
I am not real confident this is real feasible, but at least you can play with this.
However, like I said this does not make any sense once the image is scrolled. This idea could work with an image contrl, but then you would not need to do this with an image control.
Thanks for all the help and time... it's great!!
Just strugging a bit with the table to make it open a form based on the gridCell but I'll figure it out.