Just a bit lost - re-entering PB/FF that now use JR wrappers

Started by John Montenigro, November 21, 2012, 03:28:08 PM

Previous topic - Next topic

John Montenigro

I've been away (again) from PB programming, and am a bit lost as to where/how to get up to speed with the new environment.

At best, I am a hobbyist programmer. I mostly write small, standalone utility programs to help me be more productive in organizing data and files that I need in my research and writing assignments, and for some specialized knowledge-management functions needed in my analytical work.

I've been with PB from DOS 3.x, and was last using PBWin9, and FF 3.10 on WinXP Pro SP3 about 2 years ago, and was finally getting good at SDK/API coding...

I recently got a new computer running Win7 (64bit), and have upgraded all my programming tools: PBWin10.03, FF 3.61, and JR 3.1.04. I even installed the SDK 7.1 (although I can't seem to read the offline (local) Help Docs...).

As I'm beginning to explore and try things out, it seems to me that I'm at such a new and powerful level of technology, that I'm really starting over. I'm resigned to re-creating my older apps pretty much from scratch (probably not a bad thing, as it's forcing me to reconsider my original designs...)

It looks like my collections of routines in 2 dozen .INC files must either be abandoned, or completely revised to utilize COM, and all those API calls must now somehow call the JR functions.

Also, I wonder about the impact on my older code where I used PB's DDT commands...can they still be used, or must they be converted to something else? If so, to what?

So, I'm reading as much of the SDK 7.1 documentation as I can stand, and reading the FF Help, this forum, the JR forum, reviewing and playing with FF Examples, and experimenting on my own in FF with the new controls, too. It's a bit overwhelming, to say the least. Although I'm slowly seeing how some of these things work, I know I'm missing a lot.

It seems that I'm missing an intermediate level of information. For example, I'm trying to create a single-form app with only a WebBrowser control, a textbox, and a command button; when the button is clicked, I want  to take a new URL from the textbox and have the browser control accept and display that page. But what is the name of the browser control's property that accepts the URL? I don't see it on the Properties tab of the Workspace. (Yes, I can hard-code a URL into the secondary dialog box before compiling, but how to do that under program control?) Where can I find that information?

So my question is: does anyone have any suggestions as to anything else I need to have, or need to be reading, in order to wrap my brain around these new tools, technologies, and techniques?

Thanks for any help you can offer!
-John



José Roca

You get the url typed in the textbox and put it in a variant:

DIM vUrl AS VARIANT
vUrl = <URL typed>

You get a reference to the WebBrowser control as follows:

DIM pIWb AS IWebBrowser2
pIWb = OC_GetDispatch(<handle of the window that hosts the WebBrowser control>)

and you call the Navigate2 method:

pIWb.Navigate2 vUrl

John Montenigro

Thank you, Jose! Got that to run just fine.

Now, if you had not been around to provide that information, where would I have to go in order to find that information myself?

-John

José Roca

In the documentation of the author of the control, in this case Microsoft:

IWebBrowser2 interface
http://msdn.microsoft.com/en-us/library/aa752127%28v=vs.85%29.aspx

And regarding OC_GetDispatch, in my help file WinApiHeaders.chm (Custom Controls, OLE Container).

Douglas McDonald

John, I know how you feel. Jose has done a fantastic job but it is a bit overwhelming. The only thing I can tell you is just to read read read and try things out. You really have to dig or know exactly what your looking for to find the info but it is out there.  After some time you'll find that it gets intuitive. My problem is I just don't always have the time to search for the info so I mostly just use FF3.x's / PB's functions. I must say that for some things like USB interface using Jose's wrappers is the only way to go.

I wish I had the time to take full advantage of all his hard work.

Doug
Doug McDonald
KD5NWK
www.redforksoftware.com
Is that 1's and 0's or 0's and 1's?

José Roca

Quote
It looks like my collections of routines in 2 dozen .INC files must either be abandoned, or completely revised to utilize COM, and all those API calls must now somehow call the JR functions.

All my wrapper functions are optional. You can use them if you want, use yours or others. They're not mandatory.

Quote
Also, I wonder about the impact on my older code where I used PB's DDT commands...can they still be used, or must they be converted to something else? If so, to what?

It depends of which DDT commands are you talking about. Most of the ones related with GUI or graphics are unusable. It has become a closed system that is incompatible with everything else.