Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing web page from VFP9

Status
Not open for further replies.

gaa18

IS-IT--Management
Dec 15, 2002
3
0
0
GB
thisform._webbrowser41.navigate("
This works beautifully when I just run the page

But if I compile the project I get an error message UNABLE TO FIND VISUAL CLASS LIBRARY _CONTROLS

What do I need to do
 
You haven't given us much information to work on.

thisform._webbrowser41.navigate("

That doesn't tell us what controls you are using, or exactly how you are trying to access the web page.

However, _CONTROLS.VCX is one of the class libraries that comes with the FoxPro Foundation Classes (FFC). If that's the file that's missing, then make sure it is in a directory that is on the VFP search path. Its usual directory is the FFC directory, which is just below the VFP9 directory. So, just add that directory to your SET PATH command.

If that doesn't solve the problem, you'll need to give us more information about what exactly you are doing.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Just a side question, as I see "_webbrowser41" as control name. Did you really put 41 or more Webbrowser controls on your form?

Actually, as you used a control which is based on a class in _controls.vcx, at least the compilation would add that classlib. Or did you copy out some classlib from the VFP folder and put it into your own project folder?

The classlibs contain relative paths to parent classes in other classlibs and therefore the build error can happen, if there are dependencies on inherited classes you didn't think.

If you use something from the VFP install folder, there are two catches:

1. You take the original class, but any change you make in classes fixing some bug, also influence other projects.
2. You copy over the FFC and Wizard folder and use them in your project. Then code inside the classes using HOME() may fail later, for mixing things from your copy and the original HOME() folder (which is the VFP install foilder).

Both things have their catches.

Catches of going route no 1: It can be fine to solve bugs, but if you change something to change behavior for a single application, that can also hurt other applications.
Catches of going route no 2: Using a copy and modifying that decouples other projects but the FFC and wizard classes still refer to the VFP home folder and this also can hurt you at runtime

The best usage therefore is to not use wizards and builders and FFC classes. The second best is to use them as is and not change them nor copy them. The third best is to copy them, change them, if you know what you're doing, but then you'll have enough knowledge to write your own and better classes and overall framework.

This is halfways kidding and halfwas the bittersweet truth.

In your case, still one thing can help you find out the root of your problem, which not necessarily comes from the _webbrowser control. Actually I don't find a base class in VFPs FFX _controls.vcx, which would point to the webbrowser control.

Before you build: Open the debugger and make surte the Debugoutput Window is open. No build. The Debug window will show what compiles and when you arrive at the problem, you'll see what was currently compiled.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top