Results 1 to 7 of 7
  1. #1
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,142

    Editing Images

    This is more of a brainstorming question really. Basically all would want to do is overlay semi-transparent dots on top of schematic drawings anywhere I click on the image. The drawings are bitmaps (png). I'm just highlighting/color coding the schematic drawing.



    Thoughts?

    I'm afraid I might have to build a standalone python gui tool or something but don't want to go down that road if I don't have to.

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    Possible but complicated. Take a look at Stephen Lebans work. Seem to recall he has an example of creating 3d drawings and the ability to rotate them using an image control

    Not saying he has code that does exactly what you want but could show you the way.

    Also seem to recall a demo a few years ago where a user could draw lines to highlight property boundaries on a map. That used the web control

  3. #3
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,142
    Quote Originally Posted by Ajax View Post
    complicated
    That's no joke! I found Stephen's website, thanks for the suggestion. He has some some projects that look promising but will apparently need some updating.

    I thought about the web control too. Some simple SVG manipulation would be just what I need. But anytime I've tried to mess with the access web control in the past it's been junk. I'll give it another look.

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    Sorry couldn't send the link, was on my phone. Yeah - a lot of it is old, but still has relevance for many things

  5. #5
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,142
    No worries.

    Good news is I have a working proof of concept using the web browser control!

    The control source of the web browser control is an SVG file. The svg file has the png linked as background image. On the web browser control's on click event I call GetCursorPos api function to figure out where the mouse click was, then use those coords to build a svg circle element and append that to the svg file, finally "refresh" the browser.

    This appears to work just fine. The problem I have now is that a need a way to get the web browser control's x and y coordinates in pixels in order to calculate relative coords of the mouse click on the web browser control.

  6. #6
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    The problem I have now is that a need a way to get the web browser control's x and y coordinates in pixels in order to calculate relative coords of the mouse click on the web browser control.
    If I remember correctly there are 15 twips per pixel so just divide by 15. google 'vba twips to pixels' and again, Stephen Lebans has done work on this

  7. #7
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    You may find some useful info and code in my article Accurately Move Forms & Controls (isladogs.co.uk)
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 03-22-2020, 02:05 PM
  2. Replies: 4
    Last Post: 04-10-2019, 06:15 PM
  3. Replies: 3
    Last Post: 10-19-2013, 10:21 AM
  4. Images
    By tysheena in forum Forms
    Replies: 1
    Last Post: 06-12-2013, 10:30 PM
  5. Replies: 17
    Last Post: 08-26-2009, 11:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums