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

Posted on 2006-03-25
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 :

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 :

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.


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.
Question by:aussiemale33

    Author Comment

    Can anyone assist me with this please?

    Author Comment

    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.
    LVL 11

    Expert Comment

    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 ""
    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 = "" Then Exit Sub
     wbresults.Navigate2 URL
     wbsearch.Navigate2 ""
    End Sub

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

    Author Comment

    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 Comment

    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 Comment

    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.
    LVL 28

    Expert Comment

    In your Form_Load event, try this:

    wbresults.Navigate "about:blank"
    LVL 11

    Accepted Solution

    >>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

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

    Load formName

    >>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.

    Author Comment

    Thank you for all the support. Much appreciated.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Suggested Solutions

    There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
    Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now