BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Cool idea, but not sure how to do it...

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OpenToolsAPI
View previous topic :: View next topic  
Author Message
David Saracini
Guest





PostPosted: Fri Jan 05, 2007 5:46 am    Post subject: Cool idea, but not sure how to do it... Reply with quote



I recently started a new job. The company's existing application is very large (well over a 100 forms) and I'm having a problems navigating around it (just finding the correct form is difficult sometimes). I was thinking that it would be really nice if I could embed in the base form class some code to possibly broadcast a custom message on a given key stroke (eg. Ctrl+Alt+B) and have Delphi (note: I'm using BDS2006) open and display the form.

Has anyone ever done anything like this? I've written a few little OTA things before but never anything that was responding to another process.

TIA,

David Saracini
Back to top
Hannes Danzl[NDD]
Guest





PostPosted: Fri Jan 05, 2007 9:35 am    Post subject: Re: Cool idea, but not sure how to do it... Reply with quote



David Saracini wrote:

Quote:

I recently started a new job. The company's existing application is very
large (well over a 100 forms) and I'm having a problems navigating around it
(just finding the correct form is difficult sometimes). I was thinking that
it would be really nice if I could embed in the base form class some code to
possibly broadcast a custom message on a given key stroke (eg. Ctrl+Alt+B)
and have Delphi (note: I'm using BDS2006) open and display the form.

Has anyone ever done anything like this? I've written a few little OTA
things before but never anything that was responding to another process.

You can get the unitname via rtti so all you need is to add a small unit that
installs a global keyboard hook in the initialization. the hook then looks for
the key combination if found check that Screen.ActiveCustomForm<>nil and then
use GetTypeData(Screen.ActiveCustomForm.ClassInfo)^.UnitName) to get the
unitname which you can broadcast. Write a small plugin for the IDE that
listens for the broadcast if it occurs iterate through the current projects
path (and env path) and look for the unit. open it. probably a matter of 30
minutes to write :)

--

Hannes Danzl [NexusDB Developer]
Newsgroup archive at http://www.tamaracka.com/search.htm
Back to top
JED
Guest





PostPosted: Fri Jan 05, 2007 8:02 pm    Post subject: Re: Cool idea, but not sure how to do it... Reply with quote



David Saracini wrote:

Quote:
I recently started a new job. The company's existing application is
very large (well over a 100 forms) and I'm having a problems
navigating around it (just finding the correct form is difficult
sometimes).

Hi David,

This might be of assistance.

http://www.jed-software.com/vf.htm
http://www.jed-software.com/vf_screen.htm

Disclaimer: I wrote it

cheers,
Jeremy

--
Compact Framework for Delphi 2006: http://www.jed-software.com/cf.htm
QualityCentral Windows Client: http://www.jed-software.com/qc.htm

Visual Forms IDE Add In: http://www.jed-software.com/vf.htm
Back to top
David Saracini
Guest





PostPosted: Fri Jan 05, 2007 11:29 pm    Post subject: Re: Cool idea, but not sure how to do it... Reply with quote

Yep... this is pretty much exactly what I'm thinking about doing. My main questions are related to the "listening" part. Well I be able to receive custom windows messages? Or will I need to do something else?


Quote:
You can get the unitname via rtti so all you need is to add a small unit that
installs a global keyboard hook in the initialization. the hook then looks for
the key combination if found check that Screen.ActiveCustomForm<>nil and then
use GetTypeData(Screen.ActiveCustomForm.ClassInfo)^.UnitName) to get the
unitname which you can broadcast. Write a small plugin for the IDE that
listens for the broadcast if it occurs iterate through the current projects
path (and env path) and look for the unit. open it. probably a matter of 30
minutes to write :)

--

Hannes Danzl [NexusDB Developer]
Newsgroup archive at http://www.tamaracka.com/search.htm
Back to top
Thomas Mueller
Guest





PostPosted: Sat Jan 06, 2007 1:52 am    Post subject: Re: Cool idea, but not sure how to do it... Reply with quote

Hi,

David Saracini wrote:

Quote:
Yep... this is pretty much exactly what I'm thinking about doing. My
main questions are related to the "listening" part. Well I be able to
receive custom windows messages? Or will I need to do something else?

I would try a very simplistic approach first: Write the filename to a file
and have an IDE plugin check for this file periodically (or maybe better
when you click its menu) and open the form if it can find it. If that works
you can try to improve the communication.

MfG
twm
Back to top
David Saracini
Guest





PostPosted: Sat Jan 06, 2007 3:03 am    Post subject: Re: Cool idea, but not sure how to do it... Reply with quote

Hi Thomas... Thanks for the reply. Simplier is always better! Smile Actually, you gave me an idea. I think I might do what you are saying, but with a memory mapped file. That would make it a little nicer.

Thanks.

Dave


Quote:
I would try a very simplistic approach first: Write the filename to a file
and have an IDE plugin check for this file periodically (or maybe better
when you click its menu) and open the form if it can find it. If that works
you can try to improve the communication.

MfG
twm
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OpenToolsAPI All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.