#11 2006-07-23 18:35

dloneranger
Senior Member
From: Birmingham, UK
Registered: 2006-05-03
Posts: 122

Re: 4.10 ACCESS VIOLATION

This is what I get
ren1ql0.gif

I can reproduce the disappearing rules with these steps

1) start renamer with ontop off, and no rules
2) add any rule
3) check ontop and save preferences
4) close renamer
4) start renamer again -> I have the 'click here' and rule showing
5) uncheck ontop in the options and save preferences
6) my rules get cleared


I don't mind no 'always on top option' - I've got PowerMenu installed on my pc and it lets me do ontop, transparency and alter process priority easily enough
I got it here if anyone is interested http://www.veridicus.com/tummy/programming/powermenu/

Offline

#12 2006-07-23 21:57

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: 4.10 ACCESS VIOLATION

I was able to reproduce the problems described by you. This is it, the last drop of this "Always on top" option! If I don't get it right this time, it will disappear from ReNamer.

From now on, this option will affect the form style ONLY when the form is created (when application is just launched), which is the right (and maybe the only) way to go! So changes of this option will take effect ONLY after restarting the program. This eliminates all these nasty problems we were having, and my headache for last few days!

Here is the latest dev version: ReNamerBeta.zip

dloneranger, my very best regards to you, for your effort on this issue! It is much apprecieated smile

Offline

#13 2006-07-23 22:23

dloneranger
Senior Member
From: Birmingham, UK
Registered: 2006-05-03
Posts: 122

Re: 4.10 ACCESS VIOLATION

Cheers

You were good enough to give me some great pointers about my programming - it's the least I could do smile

Just for information, that program (PowerMenu) succesfully makes Renamer be always on top with no side effects at all

If you have WinSpy++ or the equivalent you should be alble to see how it does it and replicate it ?
(I'd have a look just out of curiosity but all my tools and stuff are at another location right now)

One thing I noticed that was different between how PowerMenu and your option works is that after changing the state of always on top in your preferences dialog, the form briefly vanishes and reappears, doing the same from PowerMenu doesn't cause any disappearing act (as far as I can see, all that happpens is that the window suddenly stays on top)

Edit:
that should read before the latest beta, changing the state of always on top in your preferences........ now it's a restart option

Hope the info helps

ps
I'm always available for beta testing, coz i've got tiiiiiiiiimmmmme, tiiiiimmmme, time on my hands - yes I do, yeessssss i doooooooooo
(I've done it now - I've got that song stuck in my head <grrrr> Damn them rolling stones!!)

Last edited by dloneranger (2006-07-23 23:21)

Offline

#14 2006-07-23 22:41

dloneranger
Senior Member
From: Birmingham, UK
Registered: 2006-05-03
Posts: 122

Re: 4.10 ACCESS VIOLATION

After a quick test it looks like you've sorted the problem out
No erased rules, no 'click here' messages

Top stuff

I'd still love to find out from a technical point why an external program can do it while ReNamer is running, without requiring a restart
I'm scratching my head here because as your using D7 you shouldn't have to put up with the awful 'popupmode' nonsense that has been added to D2005/6

<gives away a trade secret here>
If I really get stuck I usually pop over to the borland newsgroups and seek out Mr Peter Below
I honestly think that guy knows more than is humanly possible - must be a robot, saint, devil, msoft employee.......

Offline

#15 2006-07-23 22:50

dloneranger
Senior Member
From: Birmingham, UK
Registered: 2006-05-03
Posts: 122

Re: 4.10 ACCESS VIOLATION

Just a quick thought (I hope I'm, remembering correctly)

As you're running D7, you should have WinSight32 and be able to see how PowerMenu forces your form to be on-top in a 'nicer' way

Offline

#16 2006-07-23 22:58

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: 4.10 ACCESS VIOLATION

YEY!!! big_smile  I found this little secret!  Few minutes of hacking Delphi's components and looking through Windows API's - and here it is!!!

Delphi has a very generalized way of changing the FormStyle, which causes loads of unnecessary stuff to happen, like destroying the window handle and recreating it for the new parameters, hiding and showing, repainting and resizing events, etc. I knew that Windows had a function that does that, and I just found it: SetWindowPos. It does exactly what we want, it can simply change the Z order of any window by its handle.

To set any form to "stay on top" mode:

SetWindowPos(WindowHandle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE);

And, to cancel the "stay on top" mode:

SetWindowPos(WindowHandle, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE);

Simple as that smile

Last edited by den4b (2006-07-23 23:04)

Offline

#17 2006-07-23 23:02

dloneranger
Senior Member
From: Birmingham, UK
Registered: 2006-05-03
Posts: 122

Re: 4.10 ACCESS VIOLATION

Great !!

Really happy to hear you found a good solution smile

At the moment I'm still fighting with drag&drop - just file names, but getting a solution that will resolve 'not real files - but namespace exensions' is starting to annoy me. It's all getting stupidly complicated - I wish I was back in the old days of ZX81 at times. And god forbid you might want something really stupid - like the XP effect of a 'ghost' selection.......

Just one of those things you wish you'd never mentioned.............................

Last edited by dloneranger (2006-07-23 23:34)

Offline

#18 2006-07-23 23:04

dloneranger
Senior Member
From: Birmingham, UK
Registered: 2006-05-03
Posts: 122

Re: 4.10 ACCESS VIOLATION

Sorry I couln't have been of more help tonight, but I'm sooooo drunk right now big_smile

Offline

#19 2006-07-23 23:06

dloneranger
Senior Member
From: Birmingham, UK
Registered: 2006-05-03
Posts: 122

Re: 4.10 ACCESS VIOLATION

den4b wrote:

To set any form to "stay on top" mode:

SetWindowPos(WindowHandle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE);

And, to cancel the "stay on top" mode:

SetWindowPos(WindowHandle, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE);

Simple as that smile

Cheers - thats's gone into my useful tips archive
It's one of those things that you know you've done before but just can't remember and didn't bother saving...........

Last edited by dloneranger (2006-07-23 23:08)

Offline

#20 2006-07-23 23:36

dloneranger
Senior Member
From: Birmingham, UK
Registered: 2006-05-03
Posts: 122

Re: 4.10 ACCESS VIOLATION

Easy when you know how eh? big_smile

Offline

Board footer

Powered by FluxBB