Results 1 to 3 of 3

Thread: Button events are not working which are placed on the ocx control

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2002
    Posts
    1

    Button events are not working which are placed on the ocx control

    Hi ,

    I have created an Ocx control which is having 2 buttons and one image. I able to run that ocx control form the other application.
    But i am not able to fire the events of button controls which are placed in the ocx control.

    what is property i need to set? please help me in the regard?

    thanks,

    Venkat

  2. #2
    PowerPoster Arc's Avatar
    Join Date
    Sep 2000
    Location
    Under my rock
    Posts
    2,336
    I would have to see your code to know exactly what the problem is, but you place code inside the buttons click event the same as you would on a regular form and it should work....

    Example:

    Make a new ActiveXControl project. Place 1 button on the User Control. Inside the buttons click_event put

    Msgbox "It worked!"

    Now add a standard EXE project to your project. Close the usercontrol window and then add the user control from the toolbox onto your Form1 form the new exe project. Now Right Click on the project2 icon in the project explorer and click Set as Start up.


    Then run the program and click the button. You will see the msgbox appear.
    Last edited by Arc; May 29th, 2002 at 09:36 PM.
    -We have enough youth. How about a fountain of "Smart"?
    -If you can read this, thank a teacher....and since it's in English, thank a soldier.


  3. #3
    Junior Member
    Join Date
    Nov 2001
    Location
    Belgium
    Posts
    16
    Hello,

    I've already tried Click and Mouse - events and it does work.

    BUT the dragover / drop event of a control in my usercontrol doesn't work.

    Who can help me ?



    Kris

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