Determining when user moves to webcontrol (1 Viewer)

CJ_London

Super Moderator
Staff member
Local time
Today, 17:06
Joined
Feb 19, 2013
Messages
16,605
not sure why you say CF can look messy.
In your continuous form example if the KS2 columns were highlighted - which takes preference? the 'temporary highlight' colour or the CF colour?

I guess you can modify the CF rules to account for it, but I went a different way:)
 

isladogs

MVP / VIP
Local time
Today, 17:06
Joined
Jan 14, 2017
Messages
18,211
Ah I see....
The blue CF shading only applies for the KS2 columns where the score is below expected values. As I want this to be displayed at all times, it takes precedence as shown below for KS2 En
.

And of course I don't have to worry about placement of the semi transparent overlay....

But what would your approach do if CF was used on a column with a highlighted coloured overlay added? Say green overlay highlight over blue CF?

Anyway, this is all a long way from the original subject....:rolleyes:
 

Attachments

  • Capture.PNG
    Capture.PNG
    45.9 KB · Views: 236

CedarTree

Registered User.
Local time
Today, 12:06
Joined
Mar 2, 2018
Messages
404
So I like the idea. But issues include the fact that the user may want to move the primary form around ... but will end up moving the invisible one.
I even tried putting a transparent PNG on top of the webcontrol... and of course Access wants to keep the webcontrol on top even after I send it "to back".
Still thinking how to best implement.
 

isladogs

MVP / VIP
Local time
Today, 17:06
Joined
Jan 14, 2017
Messages
18,211
Why not use a borderless semi transparent form on top so it can't be moved. Also maximise the form containing the web browser.
 

CedarTree

Registered User.
Local time
Today, 12:06
Joined
Mar 2, 2018
Messages
404
Yes, possible. I need to think if that would work with respect to how the typical user interacts with the forms. I'm trying to balance multiple items.

CJ... can we go back to a much earlier post. On the webcontrol, why doesn't the mousemove event fire at all? Even when I click on the PDF in the webcontrol and move the mouse around... nothing. It's as if the PDF overrides EVERYTHING???
 

CedarTree

Registered User.
Local time
Today, 12:06
Joined
Mar 2, 2018
Messages
404
Okay - to be honest... looks promising and the guy says in the post that it works, but I'm getting errors. I'll try a few thing before posting the errors.
 

CedarTree

Registered User.
Local time
Today, 12:06
Joined
Mar 2, 2018
Messages
404
Okay this seems to work... note that it has to be a MS Web Browser ActiveX control, and not the Access Web Browser.

Code:
Dim WithEvents objDocument As HTMLDocument
Private Sub Form_Load()
    WebBrowser2.Navigate2 "http://www.google.com"
End Sub
 Private Sub objDocument_onmousemove()
    Debug.Print "mouse moved: " & objDocument.parentWindow.event.clientX & "x" & objDocument.parentWindow.event.clientY
End Sub
Private Sub WebBrowser2_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
    Set objDocument = WebBrowser2.Document
End Sub
 

CJ_London

Super Moderator
Staff member
Local time
Today, 17:06
Joined
Feb 19, 2013
Messages
16,605
why doesn't the mousemove event fire at all?
regret I don't know - my guess is that the web control is a bit like a subform control which only has limited events in itself, mose of the events are triggered in the subform (or web page) itself - but then why provide an event that doesn't fire?
 

CedarTree

Registered User.
Local time
Today, 12:06
Joined
Mar 2, 2018
Messages
404
Right. Why indeed!

Okay - latest brainstorm. What if I insert a box that is a few pixels bigger than the webcontrol. So the user has to cross their mouse over the box BEFORE they get to webcontrol. I did a basic test and it works UNLESS the user moves the mouse REALLY fast. Is there a way to speed up the timer of the event checking for the box?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 17:06
Joined
Feb 19, 2013
Messages
16,605
and of course Access wants to keep the webcontrol on top even after I send it "to back".
that's more to do with standard access functionality. Simplistically a form does not consist of a series of separate windows - it's displayed as a single image, the layering of controls being part of the design. The magic happens when a control get the focus. At that point it becomes a window in its own right and it's z-order within the form is set to 0

As a simple test have two controls, one partially hidden behind the other. When you click on the partially hidden one it displays on top of the one that is designated 'on top'.

Subforms do not have a gotfocus event so the control does not get the focus - the underlying form does.

issues include the fact that the user may want to move the primary form around ... but will end up moving the invisible one.
not with the right coding. You can have code in the main form move event to move the invisible form to keep it in the same place over the main form and you can set the invisible form to no borders so user cannot move it on its own
 

CedarTree

Registered User.
Local time
Today, 12:06
Joined
Mar 2, 2018
Messages
404
Just reposting because it was a brief line... so it might have been lost. Thoughts? Suggestions? I REALLY appreciate all the ideas and back/forth.

***************

Okay - latest brainstorm. What if I insert a box that is a few pixels bigger than the webcontrol. So the user has to cross their mouse over the box BEFORE they get to webcontrol. I did a basic test and it works UNLESS the user moves the mouse REALLY fast. Is there a way to speed up the timer of the event checking for the box? I'm guessing no, but thought I'd ask.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 17:06
Joined
Feb 19, 2013
Messages
16,605
speeding up the timer? I don't believe so, not for the mousemove event. One of the examples in the link you provided uses 1500

But I think you have a bigger problem. In order to see the web control, the box needs to be transparent - and if it is transparent I think you will find the user can still scroll the web control. That was why I suggested an invisible form
 

CedarTree

Registered User.
Local time
Today, 12:06
Joined
Mar 2, 2018
Messages
404
Right. The problem with the invisible form is if the user wants to scroll down WITHIN a page... he is now prohibited from doing so.
 

isladogs

MVP / VIP
Local time
Today, 17:06
Joined
Jan 14, 2017
Messages
18,211
In that case I think you need to make a decision on a compromise solution.

I suggest you display the PDF as whole page view.
If necessary reduce the content of each page and the page size so the text is still legible.

BTW did you have any success hiding the scrollbars using the ActiveX web browser control?
 

CedarTree

Registered User.
Local time
Today, 12:06
Joined
Mar 2, 2018
Messages
404
Thanks. Yeah, a compromise of some sort is needed. I wish there was more control over PDFs, etc.

I don't recall having success... I think I toyed with it a bit but started going down other paths. Lots of tangents here.

Thanks everyone.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 17:06
Joined
Feb 19, 2013
Messages
16,605
The problem with the invisible form is if the user wants to scroll down WITHIN a page... he is now prohibited from doing so.
My example showed a full page view so there was no need to scroll
 

CedarTree

Registered User.
Local time
Today, 12:06
Joined
Mar 2, 2018
Messages
404
Agreed. The PDFs we have are such that, for the person to practically make decisions, they need to be zoomed in more.
 

Users who are viewing this thread

Top Bottom