Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Additional Libraries
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.

WebBrowserEX

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-14-2008, 12:01 AM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default WebBrowserEX 2.1

WebBrowserEX.DLL

This is an evolution of Andrew Graham's WebBrowser control library.

It enables a few new properties and methods that were not available in previoue releases.

All of the previous properties, methods and events are still present, so this will focus on the new ones aded to the base dll.




properties:


DLLVersion - Returns the Dll Version Number.
In this case it wil, return "2.1" as it is based in Andrews "1.0" WebBrowser DLL.

DocumentText - Can now GET current document text(html)

ScrollBars - Boolean, sets or gets wheter the scrollbars are visible or not

FocusedControlName - String, gets the name of the WebBrowser Document Controls that has the focus...
Can be used to learn the name of textboxes in a webForm, for later filling...

FocusedControlID - String, gets the ID of the WebBrowser Document Controls that has the focus...
Can be used to learn the name of textboxes in a webForm, for later filling...

ControlValue - String, sets or gets the value of the focused control

SupressScriptErrors - Boolean, Enables or disable the script error catching by the browser NEW

ContextMenuEnabled - Boolean, Enables or disables the Browser context menu NEW


methods:

Cookie - Retrieves the current document cookies...NEW

SendControlClick(String ID) - Fires the click event (if supported) of the specified control (either by ID or by Name)
Can be used to trigger a webform "submit" button instead of using the POST method

SetControlFocus(String Control) - Sets the focus to the specified webBrowser document based control, such as a textbox, either by ID or by name

Refresh() - Reloads the current url

Zoom(int factor) - Optical Zoom, as in IE7...


Most of these properties, methods and events work on any platform, BUT some are, as earlier referred by Andrew, not available in some OS versions, Other throw an error, and others are only available in the desktop, like the zoom feature.

I haven't tryied this in a device, because i do not have mobile data access enabled in my Universal.
Edit:
It is safer to say that this is a DESKTOP ONLY dll.


This is still a work in progress, so more properties, methods or events can be added, as needed and as possible.
Use this thread to post your opinion or suggestion for future versions.

Better demo file Uploaded, enjoy!!
Attached Files
File Type: sbp WebBrowserEX-Demo.sbp (3.0 KB, 244 views)
File Type: zip Browser.zip (7.3 KB, 240 views)
File Type: txt Browser.cs.txt (14.3 KB, 189 views)
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!

Last edited by Cableguy : 03-01-2009 at 07:16 PM.
Reply With Quote
  #2 (permalink)  
Old 10-14-2008, 08:17 AM
Basic4ppc Veteran
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 223
Send a message via MSN to tsteward
Default

Ok giving your browser library a try and I get an error when I try to compile.
See attached screen dump.
Attached Images
File Type: png Capture.PNG (16.2 KB, 34 views)
__________________
PC: Dual core 3.4ghz 2gb ram
PPC: I-mate Jasjam
Reply With Quote
  #3 (permalink)  
Old 10-14-2008, 10:44 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

I am afraid that this is a desktop only library. It is currently compiled for desktop use and will not compile for the device as it stands as it references some properties and methods that are not present on the device.
Reply With Quote
  #4 (permalink)  
Old 10-14-2008, 01:38 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
A few Objects apear in the object menu, but only the webbrowser object is to be added.The others are internal dll object that needed to be public
You can hide them by prepending an underscore to their names "_MyBrowser", "_OLECMDID" etc. B4ppc will not then show them as objects.
Reply With Quote
  #5 (permalink)  
Old 10-14-2008, 06:35 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Thanks for the hint...
I have managed to hide the remaining objects from b4ppc...
I will release the new file with a new update...
I'm hopping to add a "links collection" array to the dll, so to list all the links present in a html document...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #6 (permalink)  
Old 10-15-2008, 06:48 AM
Basic4ppc Veteran
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 223
Send a message via MSN to tsteward
Default

Quote:
I am afraid that this is a desktop only library.
not happy.....
__________________
PC: Dual core 3.4ghz 2gb ram
PPC: I-mate Jasjam
Reply With Quote
  #7 (permalink)  
Old 10-19-2008, 06:29 AM
Basic4ppc Veteran
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 223
Send a message via MSN to tsteward
Default

I am considering useing your lib on the desktop version of my program.

Since with this lib you can get DocumentText. Is it possible to create a search feature to find some text then highlight it and scroll to make it visible?

Easy done with a text box but not sure with this lib.
__________________
PC: Dual core 3.4ghz 2gb ram
PPC: I-mate Jasjam
Reply With Quote
  #8 (permalink)  
Old 10-19-2008, 11:21 AM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Quote:
Originally Posted by tsteward View Post
I am considering useing your lib on the desktop version of my program.

Since with this lib you can get DocumentText. Is it possible to create a search feature to find some text then highlight it and scroll to make it visible?

Easy done with a text box but not sure with this lib.
Yes it is possible except for the auto scroll(yet)...
1st get the text with documenttext
2nd treat the resulting string as you normaly would do to serach for the word(s) you want
3rd Insert the needee html code to highling the word(s)
4rth show the resulting string using agian the document text

'll try to work out how to auto scroll to the highlighted word..
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #9 (permalink)  
Old 10-20-2008, 06:51 AM
Basic4ppc Veteran
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 223
Send a message via MSN to tsteward
Default

A few questions if you don't mind.
When adding objects I notice you have

IWebBrowser2
MyBrowser
WebBrowser

Whats the differance? What are they for?

Also in your test file line 20:
Code:
MyBrowser.FocusControl("Button")
I notice "FocusControl" is not in the popup list when using the IDE?

And I cant compile with your library. I cant even compile your test file for the desktop. Will this be fixed soon?
__________________
PC: Dual core 3.4ghz 2gb ram
PPC: I-mate Jasjam

Last edited by tsteward : 10-20-2008 at 06:54 AM.
Reply With Quote
  #10 (permalink)  
Old 10-20-2008, 05:27 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

whch demo file are you using?
The WebBrowserDemo.spb is much complete and targets the current dll...
The Objects, as pointe in one of my posts, are public methods created in the dll, for internal use...
The next release of the dll, will only make public the Wbbrowser Object, That IS the one object to use.

Also I had NO problem compiling in either the Optimized compile or legacy compile...WITH THE WEBBROWSERDEMO.SPB FILE...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!

Last edited by Cableguy : 10-20-2008 at 05:29 PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On


All times are GMT. The time now is 06:26 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0