In VB, CreateObject is only for true OLE controls. Otherwise, you'll either
load the form, or dimension a new object based on your form class
' This example loads the form invisible and show's it. VB defaults the
object reference to the same name as the form:
Load MyForm ' Loads the form invisible
MyForm.Caption = "New Caption"
MyForm.Show ' Shows the form
or
' Create objects based on an existing form, like VFP's createobject("formclass")
' Create as many instances of the base form as you need:
Dim NewForm as MyForm, NewForm2 as MyForm ' Allows early binding in compiler
Set NewForm = New MyForm ' Myform is an existing form in your project
NewForm.Caption = "New Caption"
NewForm.Show
' Launch a 2nd instance
Set NewForm2 = New MyForm
NewForm2.Caption = "New Caption 2"
NewForm2.Show
>thanx for your ans.
>certanily i will try that.but again i want to ask you is that there is a function in VFP which i have used is CREATEOBJECT() through which i can create
>a object can manipulate the properties of that object before i give object.show
>
>that means if i am calling a form through another form by using the
>CREATEOBJECT() then i can change the properties of the called form as well as
>i can change the properties of the parent form by doing some coding.
>
>so, if there is any option for doing such thing in VB pls. write me.
>
>again thanx for your previous ans.
>
>Amol
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only