Results 1 to 4 of 4

Thread: RaiseEvent form a Form , help needed !

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    Posts
    105

    Angry RaiseEvent form a Form , help needed !

    Hi,

    I recently working on an ActiveX.exe project containing a form (Form1)
    and a class module.

    I want the Form1 to RaiseEvent to the class, which is possible.

    I attached 2 files : project1 & project2 which are the same besides
    a small thing that shouldn't change the difference between them - only if it's
    if it's a bug in vb (what I think it is).

    Project2 works fine and project1 don't! Why ???

    Hope ypu can help me resolve that problem.

    Thanks in advance , Moyalt.

    ps. I've taken this example from the Karl More tutorial on Com
    which is in : http://www.vbworld.com/activex/comcourse3/
    Attached Files Attached Files

  2. #2
    Addicted Member
    Join Date
    May 2000
    Location
    Mexico City
    Posts
    242
    I guess it's because the FileFound event doesn't actually exist in Form1. It's created when you create a new instance of the form (Check).

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    Posts
    105
    Yeh ,

    I know that =s the problem but how I can I raiseevent from the form without create this instance ?

    More over in my original program wich the form in it has a lot of subs , altough I declare this check object in the class module I cant RaiseEvent after the program runs for a while.

    Hope You can help me resolve this.

    Moyalt.

  4. #4
    Addicted Member
    Join Date
    May 2000
    Location
    Mexico City
    Posts
    242
    That sounds very strange... unfortunately I ran out of ideas (yeah, like I have a lot )

    Well, as a last resort you could redesign your program to fit the limitations...

    Maybe you can encapsulate the form in a class module, and create/raise the event in that module instead of the form. The form would only handle/have code for it's interface, not for any other kind of functionality.

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