Results 1 to 4 of 4

Thread: passing a form as form

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2010
    Posts
    3

    passing a form as form

    This is an example of something I am trying to do. Can anyone help me with this code:

    Code:
    '(placed in form @ form load)
    
    Private Sub Form_Load()
    initialize Me
    End Sub
    
    '(placed in code module)
    
    Public Sub initialize(fmInit As Form)
    
    fmInit.Caption = "OK"
    
    End Sub
    The compiler says "type mismatch"
    Last edited by Hack; Jan 25th, 2010 at 12:25 PM.

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: passing a form as form

    Welcome to the forums.

    Looks fine to me and works for me too. What version of VB are you running? Did the error occur with that exact code? If not, post the real code.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3
    Lively Member agent_007's Avatar
    Join Date
    Jan 2010
    Posts
    93

    Re: passing a form as form

    Works fine for me Too here the screen shot
    Attached Images Attached Images  

    Im Pro in C#,VB.NET,Batch,Socket Programming, SPY Software Programming, VB6, Win32Api, VBscript, Windows Registry, ASP.NET, PHP, Jquery, AJAX.

  4. #4
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: passing a form as form

    Quote Originally Posted by m8Ball View Post
    This is an example of something I am trying to do.
    Examples aren't always helpful - the real code is. So, can you post it "as is" ?
    Also, by pressing CTRL+F5 you will run it with full compile - if there is an error ide will stop at the line where the error occured.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width