Solved

I want to create a new control without any reference to an exisiting control on a form

Posted on 2004-10-21
213 Views
Last Modified: 2010-05-02
Hello,
       Is it possible to create an inet control inside a class with out using a form a or control placed on the form.
For instance I don't want

Set myTextBox = new form1.textbox1

I want to create a new control without any reference to an exisiting control on a form.

Thanks

0
Question by:Arundel_Castle
    4 Comments
     
    LVL 26

    Accepted Solution

    by:
    0
     
    LVL 17

    Assisted Solution

    by:inthedark
    Yes..

    1) In the project where your class is create a dummy form with an Inet ontrol on it.

    2) In the class decs you need code like this:

    Dim MyfrmDummy As FrmDummy
    Dim WithEvents INET1 As INet

    3) In the class initiaize you need code like this:

    Set myfrmDummy = New frmDummy ' note the use of the New keyword
    Set INET = frmDummy.INet1

    The INet in your class will now receive all events etc.

    When closing the class just:
    Set INet = Nothing
    Set MyFrmDummy = Nothing

    Hope this helps:~)
    0
     
    LVL 17

    Assisted Solution

    by:zzzzzooc
    If you don't need to know the interface (for WithEvents) and don't mind late-binding:

        Dim objInet As Object
        Set objInet = CreateObject("InetCtls.Inet.1")
        Call MsgBox(objInet.OpenURL("www.yahoo.com"))
    0
     
    LVL 3

    Author Comment

    by:Arundel_Castle
    Thanks for the help guys.
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
    The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    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…

    846 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

    7 Experts available now in Live!

    Get 1:1 Help Now