[RESOLVED] MouseUp in ActiveX - works in IDE but not in exe - Page 3
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 3 of 3 FirstFirst 123
Results 31 to 38 of 38

Thread: [RESOLVED] MouseUp in ActiveX - works in IDE but not in exe

  1. #31
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,537

    Re: MouseUp in ActiveX - works in IDE but not in exe

    Quote Originally Posted by AlexanderSupertramp View Post
    @---

    @Jonny: I am not having many loops in the code. And loops are called at:
    ....
    2> MouseWheel Scroll

    So they should not conflict with MouseMove events. am i correct?
    Is this a loop for listening ? Can you switch of this one for testing reasons so it would not run ?
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  2. #32
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,984

    Re: MouseUp in ActiveX - works in IDE but not in exe

    If my hunch is correct, try changing the screen resolution to something normal, like 800x600 or 1024x768 to see if they hard-coded values in
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #33
    Join Date
    Dec 2001
    Posts
    6,332

    Re: MouseUp in ActiveX - works in IDE but not in exe

    Since the events of the UserControl fully cover what a PictureBox can do, there really isn't any advantage in also using a PictureBox for your purpose, IMO. And if this resolves the event problem, it'd be worth trying.

    If the UserControl is being subclassed, that might explain the interference with the Public event. Though I can't say for certain how the dll you're using may be impacting it, I do know the other method I referred to doesn't cause such a problem.

    One thing to try, is to turn off the subclassing, and see if the MouseUp event works. Then you'll know if that's part of the problem.

    Feel free to post any part of the project you want, but a mouse event is fairly straight-forward, so there's not much to examine there. I still think it's due to the subclassing.
    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

  4. #34
    Join Date
    Mar 2009
    Posts
    19

    Re: MouseUp in ActiveX - works in IDE but not in exe

    Hello Guys.

    @Jonny: Oh I tried to use the OCX ina simpler project. Just drag n dropn the control, and process MouseMove to display X and Y values in textboxes. No loops. Still the same problem. The text boxes are updated only in the MouseClicks as opposed to MouseMoves.

    @dglienna: My resolution is already 1024 x 768. I'll try with 800x600. Is the text in ur post
    incomplete?

    @WizBang: I have already tried commenting all the sub classing code. It does not matter.
    I'll post the simpler app with a setup here.

    Now after these conversations, I think it has do with something like exposing or calling events? Something like passing parameters????

    Thanks.

  5. #35
    Join Date
    Mar 2009
    Posts
    19

    Re: MouseUp in ActiveX - works in IDE but not in exe

    hey Guys.

    Here's the code. Please put SSubTmr6.dll in System32 and register with regsvr32.exe.

    I have commented the subclassing code, it is in the class module. The commented subclassing code is bookmarked. I have also added the class module with subclassing uncommented, but outside project.

    The app is as simple as it can get. It runs in IDE but not outside.

    The code is not extensively commented, but mostly it is. And no algos for Reimann Hypothesis, just standard things are there inside.

    Let's see what do we get now.

    Thanks a lot.
    Attached Files Attached Files

  6. #36
    Join Date
    Dec 2001
    Posts
    6,332

    Re: MouseUp in ActiveX - works in IDE but not in exe

    OK, the first thing I see is that the control doesn't have Option Explicit. This is always a good idea, and you can set the IDE to automatically add it to the top of every new module.

    Well, there was a lot of scroll mouse stuff to comment out before it would run without flagging some problem. But once I got them all, it ran, and the MouseUp even fired both within the IDE and compiled. I did not include the dll or any other files. I just compiled the control directly into an exe.
    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

  7. #37
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,537

    Re: MouseUp in ActiveX - works in IDE but not in exe

    Quote Originally Posted by WizBang View Post
    OK, the first thing I see is that the control doesn't have Option Explicit. This is always a good idea, and you can set the IDE to automatically add it to the top of every new module.

    Well, there was a lot of scroll mouse stuff to comment out before it would run without flagging some problem. But once I got them all, it ran, and the MouseUp even fired both within the IDE and compiled. I did not include the dll or any other files. I just compiled the control directly into an exe.
    OK if you already did it I can spare my time for other requests
    But I cannot see it posted here. Dis you sent it to him by email ?
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  8. #38
    Join Date
    Mar 2009
    Posts
    19

    Thumbs up Re: MouseUp in ActiveX - works in IDE but not in exe

    Hi Guys,

    Sorry, I am being a bit late in reply, but was busy with something else.

    But solved the problem (somehow ), and though I should post something about it.

    I found out the last version of the Control that was working perfectly.

    Added the new features one by one, carefully avoiding the routes which I thought might have caused the problem.

    After each new feature added, I checked if the control was working fine, and it was.

    Finished the whole coding like that. The control just worked!!

    So I solved it somehow, still can not pin-point where the problem was.

    Thanks you all for your help and time.

    And thanks to Subversion !!!!!!

Page 3 of 3 FirstFirst 123

Tags for this Thread

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center