Modernizing The Microsoft Access Interface! (1 Viewer)

Mike Krailo

Well-known member
Local time
Today, 14:09
Joined
Mar 28, 2020
Messages
1,131
The path to html files is fixed and will probably not match the storage location you are using.
Yes I figured that out right after I posted and watched the video on it. I'll update the path and see how it goes. That sure would be a problem when you go to move the database to some other location. It would be better to imbed the files into access attachment field so it never changes.
 

Edgar_

Active member
Local time
Today, 13:09
Joined
Jul 8, 2023
Messages
469
@Mike Krailo
@NauticalGent
Thanks for testing. Please review if adding this registry key helps, I often forget most people do not have it enabled.
https://stackoverflow.com/questions/4456490/how-to-set-feature-browser-emulation-to-ie8-mode
Code:
To run a WebBrowser control in IE11 Standards Mode, use the following new value into the registry:

32 bits: [(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE)\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]

64 bits: [(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE)\Software\wow6432node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
"MSAccess.exe" = dword 11000 (Hex: 0x2af8)

Mine looks like this for A2021:
1718029028615.png


And like this for A2016
1718029177694.png


This is what the web browser control should be showing:
1718029273070.png


Since the line you're highlighting has something to do with styling, maybe writing the rules directly will work. I'll try to add an example later.
 

Mike Krailo

Well-known member
Local time
Today, 14:09
Joined
Mar 28, 2020
Messages
1,131
I would rather not use that emulation mode for now, but I see what you are doing Edgar.

I'm still having trouble getting Daniel's local files demo's to work. I can get the first part of the menu to display but none of the click events work. Anyone have any idea why the click events would not fire at all? The web-resources demo works perfectly, it's just the local file version that I cannot get working.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 19:09
Joined
Feb 19, 2013
Messages
16,771
maybe writing the rules directly will work. I'll try to add an example later.

I'm developing an image cataloguer (to be demoed in November at the Eur AUG) and using a web control for some of the navigation - primary of the images since using an image control creates too much flickering on scrolling and image controls can't receive the focus.

My technique is to store the html in a long text field. The code contains placeholders to repeat code for each image when VBA is used to create the final html to be assigned to the web control.

As well as positioning, the html contains scripts to run VBA functions and return variables (such as mouse position over an image, imageID, etc.

The VBA code works on the basis of a user selecting a folder, the code then loops through the files in the folder and returns images found. and creating the html. In the case of a menu, perhaps loops through a table of menu options.

So don't know it it helps or is of interest - this is example script for the variables and function calls
JavaScript:
<script>
    function displayImageSrc(element, event) {
      var imageSrc = element.id;
      var xp = event.clientX; // Get the horizontal coordinate of the mouse pointer
      var yp = event.clientY; // Get the vertical coordinate of the mouse pointer
      var x = element.getBoundingClientRect().left; // Get the horizontal coordinate of the mouse pointer
      var y = element.getBoundingClientRect().top; // Get the vertical coordinate of the mouse pointer
      //var w=element.getBoundingClientRect().width;
      var clickedImageSrcElement = document.getElementById('clickedImageSrc');
      if (clickedImageSrcElement) {
       // clickedImageSrcElement.value = "Image ID: " + imageSrc + ", X: " + x + ", Y: " + y ;
        clickedImageSrcElement.value = imageSrc + "," + x + "," + y + "," + xp + "," + yp ;
        //alert('web source: ' + clickedImageSrcElement.value);
      }
    }
  </script>

<title>Image Click Event</title>
  <script>
    function imageClicked(imageId) {
      // Call the VBA function to switch focus to another form
      //window.external.form_frmdragimg_detail_mousemove(1,0,xp, yp);
    }
  </script>

and this is example html in the repeating section to enable them
HTML:
<img border=0 hspace=0  draggable='false' ID='PK' alt='' src='File://txtFile' height='150' onmousemove='displayImageSrc(this, event)' onmousedown="imageClicked('PK')">

<!-- Hidden input field to store the source URL of the clicked image -->
<input type="hidden" id="clickedImageSrc">

The vba code replaces 'PK' and 'txtFile' with appropriate values for each image as it loops.
 

Edgar_

Active member
Local time
Today, 13:09
Joined
Jul 8, 2023
Messages
469
I would rather not use that emulation mode for now
I can confirm that the emulation is the culprit. I removed the entry and I got the error. Setting it to emulate IE11 would work for this approach.
 

isladogs

MVP / VIP
Local time
Today, 19:09
Joined
Jan 14, 2017
Messages
18,314
Just to confirm that Edgar's simple demo works fine for me.
I have been using Feature Browser Emulation for over 6 years and recommend others do the same. See my article:

I have the registry key set to Edge browser emulation - key value = 12001
1718049185161.png


P.S. Edgar - are either of your Access Latino sessions on JSON yet available on YouTube?
 

Edgar_

Active member
Local time
Today, 13:09
Joined
Jul 8, 2023
Messages
469
P.S. Edgar - are either of your Access Latino sessions on JSON yet available on YouTube?
Hey there, Colin, thanks for confirming.

I have not yet uploaded them :(
Sorry about that, next week I will upload the two.
 

isladogs

MVP / VIP
Local time
Today, 19:09
Joined
Jan 14, 2017
Messages
18,314
Hey there, Colin, thanks for confirming.

I have not yet uploaded them :(
Sorry about that, next week I will upload the two.

I look forward to watching them once they are available
 

Edgar_

Active member
Local time
Today, 13:09
Joined
Jul 8, 2023
Messages
469
My technique is to store the html in a long text field. The code contains placeholders to repeat code for each image when VBA is used to create the final html to be assigned to the web control.
Hey there, CJ
Storing snippets in tables is a great way to not rely on external sources, personally I've seen the approaches in action with examples from @MsAccessNL and I've tried them myself in some places too.

Lots can be done with the browser, I hope to see more Access development with it!
 

accessmoraes

New member
Local time
Today, 15:09
Joined
Feb 3, 2020
Messages
6
Hello everyone, I'm from Brazil and as I don't speak English, I'm going to use a translator here.

Regarding interfaces, I tried to improve myself in some layouts similar to those on the web, and my applications are all full screen, here are some examples of them, I hope you like them
 

Attachments

  • 01.jpg
    01.jpg
    74.8 KB · Views: 43
  • 02.jpg
    02.jpg
    218.8 KB · Views: 41
  • 03.jpg
    03.jpg
    156.4 KB · Views: 43
  • 04.jpg
    04.jpg
    177.1 KB · Views: 41
  • 05.jpg
    05.jpg
    92.4 KB · Views: 37
  • 06.jpg
    06.jpg
    175.4 KB · Views: 40
  • 07.jpg
    07.jpg
    205.8 KB · Views: 43

Mike Krailo

Well-known member
Local time
Today, 14:09
Joined
Mar 28, 2020
Messages
1,131
Welcome to the forum Jose. I have seen your designs before and was inspired by your work not long ago to create some similar designs myself. That's when I learned about manipulating the transparency of a form to create that look for that popup form. The one thing that was very frustrating to deal with was handling multiple monitor setups so the popup form would not appear on the wrong monitor. There is a lot of creativity that went into your form and application designs. They look great.
 

Jason Lee Hayes

Active member
Local time
Today, 19:09
Joined
Jul 25, 2020
Messages
190
I couldn't get any of Daniel's demo files to work at all. No errors, just no menu's as shown on his website. Does it matter what the default browser of the system is? I'm using the Brave browser on Windows 11. I wouldn't think so if it is using the internal web browser control.

I had a menu system that I was working on that looked very close to his first example that doesn't use any html. I unfortunately lost all my source files on the one and only thumb drive that had all my important files on them. It was a lot of work to get it working but the real challenge was making it flexible and easy to recreate or modify.

The individual html files do load on their own and display properly, but not from within the app.
You need to be using the new browser that c
Hello everyone, I'm from Brazil and as I don't speak English, I'm going to use a translator here.

Regarding interfaces, I tried to improve myself in some layouts similar to those on the web, and my applications are all full screen, here are some examples of them, I hope you like them
Hi Jose, glad to see you on this forum pal.... What took you so long lol... Your work is inspiring as always....
 

Jason Lee Hayes

Active member
Local time
Today, 19:09
Joined
Jul 25, 2020
Messages
190
As stated in post #21, I got it working and it did not have anything to do with the browser. There was some hard coding in his forms to his html file paths.
Are yes; you would need to change the hardcoded path. On Daniels video it does state this is a requirement! Obviously demo only in its infancy state but sure ideally path & filenames would be stored in a table
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:09
Joined
Feb 19, 2002
Messages
43,881
I like the cleverness of the embedded menu expanding and contracting in Dan's example but I really dislike making all forms subforms of the menu form. If I were to do something like this I would prefer the "menu" to be a form anchored to the left edge and the form it opens to be a main form that fills the rest of the space. To do this would involve calculating the size based on the window so I'm not sure how that would work if the app window wasn't maximized.
 

isladogs

MVP / VIP
Local time
Today, 19:09
Joined
Jan 14, 2017
Messages
18,314
@accessmoraes
Hi Jose
I've also seen your designs before at Utter Access forum

I don't know whether you also speak Spanish but if so, perhaps you could discuss the possibility of presenting some of your user interfaces for the Access Latino user group. This has recently been re-launched with fellow AWF member @Edgar_ (Edgar Olivares) in charge. He is based in Mexico

This would give you the opportunity to explain to a wider audience how you achieve these effects.
 

accessmoraes

New member
Local time
Today, 15:09
Joined
Feb 3, 2020
Messages
6
Welcome to the forum Jose. I have seen your designs before and was inspired by your work not long ago to create some similar designs myself. That's when I learned about manipulating the transparency of a form to create that look for that popup form. The one thing that was very frustrating to deal with was handling multiple monitor setups so the popup form would not appear on the wrong monitor. There is a lot of creativity that went into your form and application designs. They look great.
Thank you friend, it's always great to be able to contribute in some way
 

accessmoraes

New member
Local time
Today, 15:09
Joined
Feb 3, 2020
Messages
6
You need to be using the new browser that c

Hi Jose, glad to see you on this forum pal.... What took you so long lol... Your work is inspiring as always....
Hi Jason, old virtual acquaintance, I've actually been following this wonderful forum for a long time, but I only now decided to register, I hope to contribute a lot here.
 

accessmoraes

New member
Local time
Today, 15:09
Joined
Feb 3, 2020
Messages
6
@accessmoraes
Hi Jose
I've also seen your designs before at Utter Access forum

I don't know whether you also speak Spanish but if so, perhaps you could discuss the possibility of presenting some of your user interfaces for the Access Latino user group. This has recently been re-launched with fellow AWF member @Edgar_ (Edgar Olivares) in charge. He is based in Mexico

This would give you the opportunity to explain to a wider audience how you achieve these effects.
Hello friend isladogs. It's also a great pleasure. I would be honored by such an invitation, but I don't speak Spanish. But actually my layouts have nothing special, they are VBA codes, the occasional image and a little creativity, nothing more. I'll leave here 3 examples of buttons and a simple gantt schedule. The schedule is an example of another site where I tried to streamline and improve the appearance

Ícone Verificada pela comunidade
 

Users who are viewing this thread

Top Bottom