UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Remove Scrollbars From Webbrowser, Access 2003    
 
   
ipisors
post Jan 24 2013, 01:33 PM
Post#1


Banned
Posts: 9,239
Joined: 21-June 07



i have a tiny form (about 1.5 inches) and a webbrowser active x control drawn on it, filling up the form. i have an animated gif that I want to display on it.
The webbrowser shows up with a vertical, disabled, scroll bar of sorts, which makes no sense as it is not required due to size of content.
attached is how it shows up. i've also tried a suggestion i found here about writing the htm., so I tried writing this to an htm file and loading the htm file:
<img src="path to file name.gif">
<body style=""overflow:auto;"">
but the exact same result happens. despite all the googling, all results seem to point to vb and visual studios, and I know in a sense they are the same thing but there seem to be plenty of differences. I've tried them all - any ideas?
Attached File(s)
Attached File  example.JPG ( 43.75K )Number of downloads: 6
 
Go to the top of the page
 
theDBguy
post Jan 24 2013, 02:04 PM
Post#2


UA Moderator
Posts: 76,821
Joined: 19-June 07
From: SunnySandyEggo


Hi Isaac,
Have you tried using JavaScript?
document.body.scroll = "no";
(untested)
Just my 2 cents... 2cents.gif
Go to the top of the page
 
ipisors
post Jan 24 2013, 02:43 PM
Post#3


Banned
Posts: 9,239
Joined: 21-June 07



Beautiful. After struggling somewhat with the very-basic question "how to add java to an htm file", i came up with:
<body>
<img src="PathToGifFile.gif">
<script type="text/javascript">
<!--
document.body.scroll = "no"
//-->
</script>
</body>
which did, in fact, remove the 'disabled' scroll area. now I am just trying to figure out how to get the form in its entirety (form + webbrowser control) to show up perfectly, 100% flat with no borders. even though this is easy enough to do on a regular form, it seems like the way I have things sized or something, it still doesn't show up 'flat'. I know that in my screenshots, you might swear I had the webbrowser control SpecialEFfect set to either raised or lowered, but I don't - I have it flat..and I've tried them all
(see attached). Still pretty decent though.
thanks!
Attached File(s)
Attached File  example.JPG ( 28.93K )Number of downloads: 7
 
Go to the top of the page
 
theDBguy
post Jan 24 2013, 02:47 PM
Post#4


UA Moderator
Posts: 76,821
Joined: 19-June 07
From: SunnySandyEggo


Hi Isaac,
Glad to hear you got it to work! If the ultimate goal was just so you could display an animated gif on your form, then maybe you could take a look at the first three demos in the Code Archive's Colors & Graphics category.
Just my 2 cents... 2cents.gif
Go to the top of the page
 
ipisors
post Jan 24 2013, 02:52 PM
Post#5


Banned
Posts: 9,239
Joined: 21-June 07



Interesting - thanks! The first two appear to be manipulating the visible properties of multiple still-frame pictures, I also do some of that but in this case wanted a 'real', unadulterated, GIF animation.
The last one seems about like what I am doing, but considering it still requires an activeX control and additionally an external .dll, I will try to stick with the webbrowser if possible. It seems like since that's more standard I have a better chance of not messing up (distribution-wise).
Go to the top of the page
 
ipisors
post Jan 24 2013, 02:58 PM
Post#6


Banned
Posts: 9,239
Joined: 21-June 07



Actually I'm seeing the bigger problem. It seems that no matter what I try, at the end of the day, VBA programming in either Excel or Access means that while a procedure is running, screen repainting of any kind (much less what I'd consider full "unfrozen" behavior) just isn't reliable/possible.
I have various degrees of luck, sometimes very arbitrary, in screen repainting while a procedure is running.
What about you? It seems like unless I am missing some special trick out there, this is just one of the limitations of "programming" in regular Office apps. they "freeze up" sometimes during heavy procedures, and when they do, no amount of code will make them look pretty or responsive.
any ideas?
Go to the top of the page
 
theDBguy
post Jan 24 2013, 03:19 PM
Post#7


UA Moderator
Posts: 76,821
Joined: 19-June 07
From: SunnySandyEggo


Hi Isaac,
Not sure I can help you there. I work for the government and they like everything in Gray.
I'll let you know if I find/think of something...
C
Go to the top of the page
 
JemRabbit
post Nov 19 2019, 06:29 AM
Post#8



Posts: 2
Joined: 15-March 19



Access app instances are single-threaded, and when the Jet (database) engine is running something virtually everything else freezes.

There is a trick that works:

*Create/launch another "hidden" Access.Application instance... this gives you a separate thread that won't freeze while your app is crunching away.
*Run all your data processes in one instance (as usual).
*Meanwhile the other instance provides smooth visuals / uninterrupted behaviour.
*If you're using a typical split front-end/back-end arrangement then you could possibly launch the back end (via the front end) and use that as your second instance!

It works seamlessly without much effort, but the forms (and code) that you don't want to freeze have to go in the separate instance - not the one that's choking on your data!

When the data crunching instance is finished, it can immediately take back control. Opening/closing forms in the "smooth visuals" instance is as easy as:

Function Example()
Dim appInstance2 As New Access.Application 'Declare + instantiate new Access.Application; assign it to appInstance2...

'Open your "partner" .mdb or .accdb...
appInstance2.OpenCurrentDatabase ("C:\SolarSys\Uranus.accdb")

'You can call public functions and subs (and reference objects) in the partner instance like this...
appInstance2.DoCmd.OpenForm "YELLOW"
'^The user would now be looking at a form running in the other instance.

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Do stuff here that makes this instance freeze...
MsgBox "The other instance will run freely in the meantime...", , "Insert freeze here!"
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'If you want to close the form you opened...
appInstance2.DoCmd.Close acForm, "YELLOW"
'If you want to quit the other instance...
appInstance2.Quit
'Clean up...
Set appInstance2 = Nothing
End Function


Actually I prefer to have the forms and user interface in the "main" front-end DB, and get the "partner" back-end DB to do its own data crunching (code and queries).

Thought I'd mention this approach in case it's of use to anyone!
Go to the top of the page
 
JemRabbit
post Nov 19 2019, 06:51 AM
Post#9



Posts: 2
Joined: 15-March 19



P.S. First, try putting DoEvents in your loops (or even invoking it from queries). If you issue a DoEvents call a couple of times per second that can make a big difference.
But if you want smoothly animated gifs or anything like that, using another instance of Access or Excel is probably the only way.
Go to the top of the page
 
theDBguy
post Nov 19 2019, 08:47 PM
Post#10


UA Moderator
Posts: 76,821
Joined: 19-June 07
From: SunnySandyEggo


Hi Jem. Welcome to UtterAccess! welcome2UA.gif

In case you haven't noticed, you are replying to an almost 7-year-old thread. Cheers!

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    7th December 2019 - 06:58 PM