Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 184
  • Last Modified:

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

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.
0
aussiemale33
Asked:
aussiemale33
  • 6
  • 2
1 Solution
 
aussiemale33Author Commented:
Can anyone assist me with this please?
0
 
aussiemale33Author 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.
0
 
bingieCommented:
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.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
aussiemale33Author 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.
0
 
aussiemale33Author 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?
0
 
aussiemale33Author 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.
0
 
AzraSoundCommented:
In your Form_Load event, try this:

wbresults.Navigate "about:blank"
0
 
bingieCommented:
>>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.
0
 
aussiemale33Author Commented:
Thank you for all the support. Much appreciated.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 6
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now