We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

App to display website in one window and result after search in another

aussiemale33
aussiemale33 asked
on
Medium Priority
200 Views
Last Modified: 2010-05-03
Being new to VB, and not understanding alot of code at all, what I am about to ask may need to be said a few different ways.

I have a small jpg I made of an example of what I am trying to achieve :

http://www.jf3000.com/window.jpg


In lamens terms, I would like to create a simple layout with 2 windows side by side.

The first window loads a php webpage, actually it will display a form, when the user enters the required info, I would like the result to be shown in the 2nd window.

What I am trying to achieve is an alternative to display templates from the monster template website. I want to load this webpage :

http://www.templatemonster.com/search_src.php

Into the window on the right, so when a user enters the number of the template, it will display the image on the right side of thie window, can this be achieved?

Once the user enter the info and presses the search, is it possible to have that window reset, so it goes back to the search_src.php place?

Thank you.

Jf3000

If you can assist me with this, I would be grateful in achieving this, and if your answer is helpful, I will gladly bump this to 500 points for any assistance.
Comment
Watch Question

Author

Commented:
Can anyone assist me with this please?

Author

Commented:
Thank you for the speedy reply, just would like some sort of help on what too do for this, as I am a beginner, and if someone starts spitting out code to me, and telling me too add this or that, I may be back for questions. But thank you.
CERTIFIED EXPERT

Commented:
Start a new project and go to Project -> Components and put a check next to "Microsoft Internet Controls". Hit ok. Now, select that control (it will be the image of the world) and add two of them your project. Resize the controls as you need to. One will be used to search and one will be for the results.

Rename this control from "webbrowser1" to "wbSearch" and name "webbrowser2" to "wbResults". This will make it easier to type the controls name, as its much shorter. :)

Ok - so we have now added a "lite" version of internet explorer to your project.

Now, double click anywhere on the main project form. This will open the code window and start letting you enter code for the Form_Load() event. This is the code that will run when the Form loads. Insert the following:

Private Sub Form_Load()
 wbsearch.Navigate2 "http://www.templatemonster.com/search_src.php"
End Sub

Now paste the following below the code about. This is the code that will run when the wbsearch control has fully navigated to its webpage.

Private Sub wbsearch_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
 If URL = "http://www.templatemonster.com/search_src.php" Then Exit Sub
 wbresults.Navigate2 URL
 wbsearch.Navigate2 "http://www.templatemonster.com/search_src.php"
End Sub

Let me know how this is going, and if it's what you need.

Author

Commented:
Thank you, this is exactly what I was looking for, its the little things that bring back certain memories, Ur programming tutorial here is clearly defined for anyone whishing to take on a challenge, now if I can only remember the code to load another form.

Author

Commented:
I have noticed that when the form loads, the bottom form says page cannot be found, is there a way for this to load a blank page e.g. from my own domain, so when the user enters the search and presses search, it then displays over the blank page.

Or if there is another way to not display the page cannot be found message prior to using the form?

Author

Commented:
Also I have a scrollbar in my code, how do I remove the scrollbar from the search form? I have shrunk the form to a certain size, and in my code it shows a scrollbar, but on the exe it doesnt.
In your Form_Load event, try this:

wbresults.Navigate "about:blank"
CERTIFIED EXPERT
Commented:
>>now if I can only remember the code to load another form

Use the following. It will copy the current form. If your form isn't named Form1, then change it to refect your form name.

Dim f As Form
Set f = New Form1
Load f
f.Show

If you want to load another form in your project, use

Load formName
formName.Show


>>I have noticed that when the form loads, the bottom form says page cannot be found....

Use what AzraSound posted - it will navigate to a blank page.


>>, how do I remove the scrollbar from the search form...

You can't disable the scroll bars for the object (as far as I know..) so the only way to do it would be to put the webbrowser control in another container (the picturebox) and then decrease the size of the pic box so it doesn't show the scroll bars. See http:Q_10310855.html for more information on that.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Thank you for all the support. Much appreciated.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.