Web Browser: Customize On-The-Fly

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Web Browser: Customize On-The-Fly

Post by Osler »

Find attached the latest version of the browser. It has been recoded in VS 2008 and should provide some improved compatibility. In addition, I finally solved the issue where scrolling programmatically wouldn't function after following a hyperlink on the loaded page. A .pdf file is included that should outline what needs to be done to use the current version. Note that the allowed value for the Transparency property has changed from 0-100 to 0-1 in this version.

4/24/2009
New version attached. With this version, it will detect when a popup occurs and redirect the page to the main window of the browser.

10/14/2013
There have been a few requests for the source code for this project. I have added the VS 2008 Project file below. If you would like me to post the source directly as text, let me know and I will dig it out.

Osler
Attachments
HouseBot Browser 2008.zip
(322.61 KiB) Downloaded 1689 times
HouseBot Browser 2008.zip
(84.64 KiB) Downloaded 1876 times
Last edited by Osler on Mon Oct 14, 2013 7:39 pm, edited 7 times in total.
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

Oops...forgot to inlcude the external control device in the .hbx. You will need to create one with a port of 2525, IP of 127.0.0.1, and password that is empty. I will add the ability to set port, ip, and password on the browser so it can be used on a remote machine as well.

Osler
peter
Member
Posts: 35
Joined: Wed May 31, 2006 3:51 am
Location: Berlin , GER

Post by peter »

Hi Osler,
I'm curious about your program, But simething wrong, I've got this:

bye peter
Attachments
browser_error.jpg
browser_error.jpg (55.09 KiB) Viewed 70648 times
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

yeah....i forgot to include the dll files with the download. i wasn't thinking too clearly last night. I have created an installer file for this now and added the ability to set Port, IP, Password at app start-up. Also, I have made the browser window always on top. I will upload these this evening to my site. Sorry about that.

Osler
roussell
Advanced Member
Posts: 268
Joined: Wed Dec 15, 2004 9:07 am
Location: Pelham, AL

Post by roussell »

This sounds great Osler! Unfortunately I get a "Run-time Error '13' Type mismatch" when double-clicking on HouseBot_Browser1.exe. I'm running HB 2.32 on Windows Server 2003.

Terry
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

see above. i will upload the files when I get home from work tonite. too much wine last night. Also, you error was thrown because you started the .exe without having HB open. The app pulls the browser settings from within HB. The dll you are missing is the CCRP high performance timer dll and it can be found here if you are inclined:

http://vb.mvps.org/tools/ccrpTmr/

It appears you have the HBControlMod.lib already.

Osler
roussell
Advanced Member
Posts: 268
Joined: Wed Dec 15, 2004 9:07 am
Location: Pelham, AL

Post by roussell »

Actually, HB is running while I'm trying to run your app. Happy to report that HB has been running for 95 days non-stop. :) Does the app need to be in a specific directory or with a particular file(s)? Right now it's running from its unzipped location within a "downloads" folder on the server. Should I move it under the HB folder?

Thanks,
Terry
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

The error you reported occurs when the app doesn't have the initial window settings at instantiation (Form Load). This means it isn't communicating with HouseBot to get the required data. I have added error detection to the latest version after your previous post to try to catch some of these things prior to occurence. For now, check these:

1. Did you create an external control device with Port, IP, and Password that the application is expecting. With your app, it should be 2525, 127.0.0.1 (ie, local only), and no password. I think there may be something screwy with port 2525 (HB may use this already). However, I got this to work last night using that number.

2. Make sure your property values conform to the following:

Properties and Values:
1. Back (True/False): When set to True the browser will move to the previous page.
2. Blue (0-255): the value of RGB blue for the browser rim color.
3. BrowserQuit (True/False): when set to True the browser program will unload.
4. Forward (True/False): when set to True the browser will move to the next page.
5. Green (0-255): the value of RGB green for the browser rim color.
6. Offset (0-?): sets the size of the colored rim around the browser (recommend 200).
7. Red (0-255): the value of RGB red for the browser rim color.
8. Reload (True/False): when set to True the current page is reloaded.
9. ResolutionX (0-?): the x-dimension resolution of the browser in pixels.
10. ResolutionY (0-?): the y-dimension resolution of the browser in pixels.
11. TimerInterval (0-?): the frequency at which the broswer queries HouseBot for current settings in milliseconds (recommend 500 or 1000).
12. Transparency (0-255): sets the transparency of the browser window where 0 is completely invisible and 255 is completely visible.
13. X (0-?): sets the x postion of the browser window relative to the top of the screen.
14. Y (0-?): sets the y position of the browser window relative to the left of the screen.

ALL VALUES ARE ALPHANUMERIC

3. Make sure you downloaded and registered ccrpTmr6.dll from the above website (START -> RUN -> regsvr32 "<path to dll>")

It doesn't matter where you put the app. The setup.exe file I'll upload tonite will create C:\Program Files\HouseBot_Browser1 folder and put all the stuff there.

Also, open your task manager and kill off any Browser1.exe files that are hanging out.

Osler
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

Improved version and installer done. Download, unzip, and run setup.exe. Navigate to the installed folder (C:\Program Files\HouseBot_Browswer1) and open the ReadMe file and follow the instructions.

REMOVED

Osler

All DLL's included this time :)
Last edited by Osler on Wed Feb 04, 2009 11:06 pm, edited 1 time in total.
roussell
Advanced Member
Posts: 268
Joined: Wed Dec 15, 2004 9:07 am
Location: Pelham, AL

Post by roussell »

Thanks for the update. I tried it this morning and at first it didn't work. The app did not see HB running as you has presumed earlier. I had the external control running in HB at port 2525 and confirmed that it was listening by doing a "netstat -a" at a command prompt. I noticed the config file "Browser1Parameters.txt" and opened it. It had one line - "5000, 127.0.0.1, *" in it. I changed the 5000 to 2525 and it worked.

This is awesome Osler! My mind is spinning thinking of the possibilities for this guy. Thanks so much for contributing such a great add-on to HB.

One question: When I launch the browser from windows (double-click in explorer) it launches "normally". When I launch it from within HB (Setting "Execute Program" to "Yes"; it launches "minimized" just in the left lower corner of the screen just above the Windows "Start" button. It has a name of "Form1" (See attached screenshot). Double-clicking on it will restore it to it's normal size and position. Is there a way to have HB launch it "normally" as it does when launching it from Explorer?

Thanks Again!

Terry
Attachments
HB.JPG
HB.JPG (47.06 KiB) Viewed 70591 times
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Osler,

Installed and ran without a hitch for me. Thanks for sharing this with the community. In addition to just web surfing, it actually adds adds a portal for adding more functionality to Win32 SWRemotes (for the more resourceful users :wink:)
Scott
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

roussell:

It should not launch minimized and I am not sure what is happening. In fact, the form type I used should not show up in the task bar, should not be minimizable (except from code), and should not be moveable by the mouse. Did you download the latest version I posted? I would get rid of all of the previous versions of the app and then download and run the installer. I will add some code to it to force it to show at form load as well.
You're running server 2003, correct. What version of IE do you have?

Scott:

Thanks. I will be adding the ability to get rid of the scroll bars and also make the browser window flat (instead of 3D). You could potentially use this to run flash animations stored local/server. Also, you can point this to a text document (instead of a web address) and it will be dispalyed.

Should I give the option to turn on/off "always on top"?

Osler
roussell
Advanced Member
Posts: 268
Joined: Wed Dec 15, 2004 9:07 am
Location: Pelham, AL

Post by roussell »

Correct, I'm running 2003 Server SP1 with IE 6.0 (6.0.3790.1830 to be exact). I did download the latest version and have removed all previous versions of the program but the behavior is the same.

I can try the app on HB under XP (in a virtual PC session) this evening when I get home and see if there are any differences. The interesting part to me was the fact that it launches normally when running it from an explorer windows and only runs minimized when launched from HB.

I like the option of removing the scroll bars and making the window flat - would that include removing the borders entirely, or changing the width of them? The always on top on/off would be nice as well.

Terry
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

OK...hopefully the new version fixes your problem roussell. I have added code to continually check WindowState and ensure it is never maximized or minimized. I also fixed what I think the original problem was...the BrowserQuit from within HB was not generating a complete unload of the form (forgot an exit sub...oops).

Also in this version I have added the following:
-ability to make the browser flat or 3D
-ability to get rid of the visible scrollbars
-ability to turn on or off making the browser always on top
-simple scroll control via property value change (right, left, up, down) so you can ditch the scrollbars and use HB property change buttons for scrolling if you want.
-ability to have multiple instances of the browser associated with different browser devices (i.e., create 4 browsers for you web cam page in you theme and display them all at one time using 4 different Browser execute program devices). This is accomplished by editing the Browser1Parameters.txt file and adding the name of the device you want that copy of HouseBot_Browser.exe associated with. This will require multiple copies of HouseBot_Browser.exe in distinct folders with distinct Browser1Paremeters.txt files.

I will upload the new installation file this evening when I arrive home.

Osler
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Osler wrote:Should I give the option to turn on/off "always on top"?
I suppose you could, but without a titlebar and no placement in the taskbar, it could easily get lost behind other windows. I guess you can always add the option... just not sure if anyone would need it.
Scott
Post Reply