-
March 12th, 2009, 05:53 AM
#1
[RESOLVED] MouseUp in ActiveX - works in IDE but not in exe
Hello Guys.
I have this strange problem. Just finished an activeX control involving a pictureBox. I have exposed PictureBox's MouseUp event.
When I run it in VB IDE, it works fine, shows a message box which I have programmed on MouseUp event.
But when I run the exe, after making the project, outside VB 6.0 IDE, MouseUp does just nothing.
I have tried a lot of stuff, including uninstalling/unregistering previous versions of control, deleting and adding correct ocx to toolbox etc. But problem is not getting solved. It has been 3 days now since I am fighting with it. I think when exe runs, it is not using proper ocx, but I have not been able able to either prove or disprove this hunch.
Thanks for your time.
p.s. I have tried posts with similar title without success.
-
March 12th, 2009, 06:09 AM
#2
Re: MouseUp in ActiveX - works in IDE but not in exe
try registering the OCX Manually with Regsrv32. Use the same with /u to uninstall manually.
Also during the creation of the setup program, check where setup thinks the ocx should be and make sure after setup that it is where the exe expects it to be.
Last edited by Bill Crawley; March 12th, 2009 at 06:13 AM.
If you find my answers helpful, dont forget to rate me
-
March 12th, 2009, 08:33 AM
#3
Re: MouseUp in ActiveX - works in IDE but not in exe
Thanks for the reply Bill.
I did try manual register/unregister half a dozen of times, keeping ocx at various places.
Installation keeps the ocx at intended place.
Besides, other features are OCX are available. It basically adds MouseWheel to PictureBox. I am processing WM_MOUSEWHEEL. That works fine every time everywhere. It's just MOuseUp that is not working.
Did I make it clear that it was working fine in earlier builds? All mouse and keyboard events have been tested already and they were working ine after installation. Problem started after I
added Container properties to Control and built it again. Then it started working in IDE but not in exe.
Plus, the one person I distributed the app to, ocx MouseUp does not work in IDE as well!! Even if he sets up a beak point, control does not enter the MouseUp procedure.
-
March 12th, 2009, 09:08 AM
#4
Re: MouseUp in ActiveX - works in IDE but not in exe
No one is replying?
Have I messed up the information or the question is hard?
Anyway, I forgot to mention a tiny detail, very important. I apologize:
The demo works only when opened as a group with the ActiveX control project. If opened individually, behaves like exe does.
-
March 12th, 2009, 10:28 AM
#5
Re: MouseUp in ActiveX - works in IDE but not in exe
This sounds like a tough nut, really.
I suppose you have the latest service packs of everything, too.
Without seeing the code it would be hard to make more than some inspired guesses.
If you know what you added to the previous builds where everything worked fine, you could possibly locate the problem by going back step by step...
I'm not the ocx crack here. The controls I built are always integrated and compiled in the project, so I would never have stumbled over a problem like that.
We have some more experienced ocx-wizards here, like WizBang? Maybe they rise to the challenge?
-
March 12th, 2009, 10:40 AM
#6
Re: MouseUp in ActiveX - works in IDE but not in exe
Have you checked that the mouse driver isn't corrupt.
Also you said that the demo only works when opened as a group. Could you try compiling the OCX in it's own right and then rather than adding it as a group, make a reference to it in the standard project on your dev box where it currently works and check that the OCX still works there.
Last edited by Bill Crawley; March 12th, 2009 at 10:46 AM.
If you find my answers helpful, dont forget to rate me
-
March 12th, 2009, 10:47 AM
#7
Re: MouseUp in ActiveX - works in IDE but not in exe
Why would the mouse then work at all?
-
March 12th, 2009, 11:42 AM
#8
Re: MouseUp in ActiveX - works in IDE but not in exe
Do you use the same OCX in other places in that project? Sounds like a version problem.
-
March 12th, 2009, 02:05 PM
#9
Re: MouseUp in ActiveX - works in IDE but not in exe
Thansks for replies guys.
@Bill: I am sure it is not a mouse diver problem. Thing works in IDE and everything else with mouse works.
@WOF:
@dglienna: I am not using that same dll anywhere else in the same project. But ther are many versions lying around on my PC of the OCX from previous builds. I have no idea how many of them are registered. So I think it could be a version problem.
Is there a way to find out all registered OCXs for that control? Would they all be showing up in IDE's toolbox's Component dialog if they are indeed registered? If yes, then I am sure only one control is registered because only one shows up in component dialog.
I am pissed off. Sorry for the language.
-
March 12th, 2009, 02:08 PM
#10
Re: MouseUp in ActiveX - works in IDE but not in exe
And how would I solve this problem on client's PCs? Some versioning tools for OCXs?
-
March 12th, 2009, 10:26 PM
#11
Re: MouseUp in ActiveX - works in IDE but not in exe
If I were you, I'd buy Registry Mechanic 2009, and run it. I'd bet that fixes things, or at least provides a valid error. (You could probably install and remove it at the client sites that have problems)
You can search for OCX Remover, but are likely to find snakeoil. I've used RM
-
March 13th, 2009, 03:14 AM
#12
Re: MouseUp in ActiveX - works in IDE but not in exe
Hi,
I have used a utility to check all the registered files OCXs on the system. Very handy tool. Find it here: http://www.nirsoft.net/utils/registered_dll_view.html
I unregistered and deleted all the entries for my OCX. Then I reinstalled the program with my setup. Only one entry then comes, the one I registered with install. The problem still persists!!
Is there a utility to check which OCX the exe is using at run time? Something like spy++? I think that should help.
Thanks.
-
March 13th, 2009, 06:03 AM
#13
Re: MouseUp in ActiveX - works in IDE but not in exe
After trying the utility to make sure that only one OCX is registered on PC, I am sure its not a OCX or versioning problem.
I tried spy+ as well, the messages trapped for app run inside as well as outside VB IDE are same. spy+ did not pin point the problem.
So, for a app running outside, spy++ did trap the MouseMove messages, which app does not seem to trap as events.
What could be the issue?
-
March 13th, 2009, 07:44 AM
#14
Re: MouseUp in ActiveX - works in IDE but not in exe
Include a filelog system into your ocx and let it write to a file whenever the mouse has to be catched from the ocx. and in the event so you can see if it gets fired. Write to the same file appending all the time so you can see if the ocx does its work.
Because you ned to find out : is it inside the ocx or outside the event is fired but maybe nor trapped. by your application
IMHO you need to go this way to debug it at real runtime using filelogs and looking what you get there. All others is 'for the fishes' as we say here, because its only a discussion with assumptions but no really databased search.
So, for a app running outside, spy++ did trap the MouseMove messages, which app does not seem to trap as events.
Are you sure they come from the ocx, or are they maybe fired from elsewhere and your ocx doesn't even get the mousemoves ? This is why I say log it.
Last edited by JonnyPoet; March 13th, 2009 at 07:46 AM.
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
-
March 13th, 2009, 08:58 AM
#15
Re: MouseUp in ActiveX - works in IDE but not in exe
Yes. Logging is a good method to get behind things.
But as stated before, Alex did try to trap the mouseup with a MsgBox in the event handler and found, that the event does not fire.
@Jonny: Say, as having masterly used event hooking and knowing much more about events as I do...
could it be the mouseup event is trapped or hooked by some other program, which does not occur in IDE?
@Alex: I'd say you got to analyze the changes you did to the previous working version and see if some of these are responsible for the effect. You said you put some containers or something, but you were not specific enough about that.
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|