Delphi like interface

I'm making an application with a Delphi like interface. It has a main toolbar form with the menu on it. It has child editor forms.

The problem I have is the menu shortcuts don't work in the child forms. This makes sense as they have the input focus, not the toolbar form.

What I would like to know is how I can implement menu shortcuts from the child windows to the main toolbar?

I tried catching the various WM_ messages I thought should do it in the child and passing them to the toolbar, but that didn't work. Probably I used the wrong WM_ messages.
0
Anonymous
8/19/2008 2:55:10 AM
embarcadero.delphi.win32 2183 articles. 0 followers. Follow

9 Replies
764 Views

Similar Articles

[PageSpeed] 5

justin temby wrote:

> The problem I have is the menu shortcuts don't work in the child
> forms. This makes sense as they have the input focus, not the toolbar
> form.

As long as your child forms are not shown modally this should not be a
problem.  The easiest solution is to use the Action Manager on the main
form. This allows you to centrally manage individual pieces of
functionality. Menus and toolbars can then easily take advantage of the
actions.  It's a much cleaner approach than writing "OnClick" code for
buttons and menus and toolbars.

-- 
-Mike (TeamB)
0
Mike
8/20/2008 12:34:25 AM
Thanks, yes I can use an Action Manager on the main form.

Problem is in opening the menus.

Eg if in the child and the child is an editor window and I want to save changes by pressing the appropriate menu shortcut

alt + f (file) + s (save)

The toolbar doesn't get the keystrokes
0
supertappy1
8/20/2008 3:19:36 AM
supertappy1 supertappy1 wrote:

> Eg if in the child and the child is an editor window and I want to
> save changes by pressing the appropriate menu shortcut
> 
> alt + f (file) + s (save)
> 
> The toolbar doesn't get the keystrokes

I understand what you're trying to do but have never tried to do
something like that myself. While it doesn't specifically answer your
question does a "save" action with a Ctrl+S shortcut on the main form
get fired when the child form has focus and the user presses Ctrl+S?

-- 
-Mike (TeamB)
0
Mike
8/20/2008 3:42:53 AM
supertappy1 supertappy1 wrote:
> Problem is in opening the menus.
>
> Eg if in the child and the child is an editor window and I want to
> save changes by pressing the appropriate menu shortcut
>
> alt + f (file) + s (save)
>
> The toolbar doesn't get the keystrokes

Supertappy1 (Justin),

Did you notice Mikes sentence:
"As long as your child forms are not shown modally this should not be 
a
problem."

Do you use Show or ShowModal to show the editor window?

Regards
Tom
0
Tom
8/20/2008 5:56:19 AM
Tom,

the editor windows are like Delphi's edit windows. They are modeless, shown with show
0
supertappy1
8/20/2008 8:08:17 AM
*I understand what you're trying to do but have never tried to do*
*something like that myself. While it doesn't specifically answer your*
*question does a "save" action with a Ctrl+S shortcut on the main form*
*get fired when the child form has focus and the user presses Ctrl+S?*

Yes, using an action list the save command is fired on ctrl+s when the editor has the focus

Edited by: supertappy1 supertappy1 on Aug 20, 2008 1:10 AM
0
supertappy1
8/20/2008 8:11:34 AM
Are your editor windows loaded from a dll? I had a similar problem with 
forms (like plugins) loaded from dlls.

Leonardo.

justin temby escribió:
> I'm making an application with a Delphi like interface. It has a main toolbar form with the menu on it. It has child editor forms.
> 
> The problem I have is the menu shortcuts don't work in the child forms. This makes sense as they have the input focus, not the toolbar form.
> 
> What I would like to know is how I can implement menu shortcuts from the child windows to the main toolbar?
> 
> I tried catching the various WM_ messages I thought should do it in the child and passing them to the toolbar, but that didn't work. Probably I used the wrong WM_ messages.
0
Utf
8/20/2008 11:55:08 AM
justin temby wrote:

> I'm making an application with a Delphi like interface. It has a main
> toolbar form with the menu on it. It has child editor forms.
> 
> The problem I have is the menu shortcuts don't work in the child
> forms. This makes sense as they have the input focus, not the toolbar
> form.
> 
> What I would like to know is how I can implement menu shortcuts from
> the child windows to the main toolbar?

Actually you don't need to do anything special for this to work, since
the VCL has support for this kind of application build-in. If the
current form does not process a key as shortcut it will get send to the
main form and trigger actions and menus there. Refer to this article
for information on how key handling works in the VCL:
http://dn.codegear.com/article/38447

If it does not work for you you are doing something that interferes
with the default key handling.

-- 
Peter Below (TeamB)  
Don't be a vampire (http://slash7.com/pages/vampires), 
use the newsgroup archives :
http://www.tamaracka.com/search.htm
http://groups.google.com
0
Peter
8/20/2008 5:37:40 PM
Thanks guys.

I tried it in a test project with a simple main toolbar and edit form and it worked as expected.
So as Peter said it's something in my app doing it.
It uses expressbars as the menu and toolbar interface, i assumed it was that. I was about to remove it and replace it with something more standard when I had a look at it's properties

allowcallfromanotherform = false

my goodness

all good now
0
supertappy1
8/21/2008 5:05:00 AM
Reply:

Similar Artilces:

Language like Delphi 6 or Delphi 7
Hi I like to make application what will connect to web services(SOAP or REST) and send data to server via HTTPS. I have previous experience with Delphi 6 and Delphi 7.I know that language in Delphi 2009 is changed. Which is the last Delhi(Delphi 2005, Delphi 2009) what have the languages like Delphi 6 or Delphi 7. Additional ,which edition(home,professional ,architect) I should use if i like to achieve my task? Pero perov wrote: > I know that language in Delphi 2009 is changed. That is not true. > Which is the last Delhi(Delphi 2005, Delphi 2009) what > have the lan...

Migrate from Delphi 2007 for Win32 to Delphi XE
we use Delphi 2007 for Win32 to support legacy (32Bit) OWL-based pascal applications (yes i know it was a mistake not to switch to VCL 15 years ago). could our applications still be opened and compiled with Delphi XE? The existing projects are all plain Pascal-Code, coming back from the times of Turbo Pascal for Windows and later on Borland Pascal. Are there any improvements we could profit from (i.e IDE, Debugger)? Thanks Andrej > {quote:title=Andrej Dimic wrote:}{quote} > could our applications still be opened and compiled with Delphi XE? I'm not sure, but I guess ...

Delphi.NET loading Delphi.Win32 Driver
Hi, What I'm trying to do is marshal an array of cardinal (or integer) back into managed memory from a win32 dll. I know how to pass managed memory into a win32 dll {code} var aa : array of Integer; Buffer : IntPtr; begin SetLength(aa,2); aa[0] := 1; aa[1] := 80; if not Supports(ExtractFilePath(Application.ExeName)+'Win32_Library\SDK_Driver.Win32.io', TypeOf(IMyFunctions), MyFunctions) then Exit; //loads the driver into memory. MyFunctions contains the method names found in the SDK_Driver. Buffer := Marshal.AllocHGlobal(2 * {Marshal.SystemDefaultC...

delphi Win32 using delphi .NET dll
Hi, I'm trying to use a delphi.NET dll in delphi.WIN32. I am currently using CodeGear Delphi 2007 with version2(base version) of .NET I can get the dll to import into the WIN32 application the only problem is when i include things such as: "using Classes,DateUtils, SysUtils" in the .NET dll the win32 application will instantly hang when any of the dll functions are called. Any help would be great thanks. Also I have tried this example and it also crashes for me? http://cc.embarcadero.com/Item/22688 -Braden I also found this.. "The problem is that, wehn you instal...

Converting Delphi for Win32 to Delphi .Net(Prism)
Hi, I am currently migrating a project from Delphi for Win32 to Delphi.net. Part of my code currently goes into a directory and pulls out a random file from this directory and loads the contents of the file for me. This code doesn't seem to work in Delphi.Net. It uses PString and a number of functions in SysUtils that don't seem to be present in Delphi.net's SysUtils file. If anyone can help me please, it would be greatly appreciated! Many thanks, Jonathan Mackey Jonathan Mackey a écrit : > I am currently migrating a project from Delphi for Win32 to &...

Delphi and Delphi for .Net
It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. I would like to know is it true all .Net application is slower than Win32 native applicaiton or it is Delphi for .Net only. Your information is great appreciated, Inung On 2011-06-21 18:20:17 +0100, Inung Huang said: > It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. > I would like to know is it true all .Net application is slower than > Win32 native applicaiton or it is Delphi for .Net only. If you are only running the code in the application once then, yes, yo...

Win32 program: Delphi 7 vs Delphi XE5
How is a D7 Win32 program compared to a Delphi XE5 one in terms of stability and performance? Is Delphi XE5 good enough for a big ERP project with several DLL's and hundreds of units and forms? Thanks in advance Am 26.12.2013 15:02, schrieb lior ilan: > How is a D7 Win32 program compared to a Delphi XE5 one in terms of stability > and performance? > Is Delphi XE5 good enough for a big ERP project with several DLL's and > hundreds of units and forms? > Thanks in advance > Hello, XE5 has increased functionality. Stability seems to be ok for most ...

Win32 Delphi language features introduced since Delphi 7
Hi, Am I right in thinking that the language features introduced since Delphi 7 fall into the categories: a) language features dictated by .Net compatibility. e.g. Namespaces, Inlining, records with methods, operator overloading, pure interfaces, generics, extended RTTI and reflection; b) Unicode strings and supporting procedures? c) 64-bit support What other language features, if any, have been introduced since D7? Had most of the post-D7 languages features, except for generics, Unicode strings, and 64-bit support, been introduced in or before Delphi 2005? How bug-free were ...

[Discussion] My Wishlist on interface in Delphi for Win32
*1. Supports generic method* There are so many scenarios for using generic method insteading of generic interfaces, such as: ILogger = interface procedure Info(const msg: string); procedure Info<T>(const obj: T); //... end; or, // Reprensents a IoC container IUnityContainer = interface procedure RegisterType<TType, TImplementation>; function Resolve<T>: T; //... end; As you can see, Generic Interfaces are obvious not suitable in these cases. I really have no idea why delphi doesn't support it. *2. Determines whether a object suppor...

SEPA components for Delphi with Source Code (Delphi 5
Hi all, in the european union change next year the Bankingformat to the SEPA Format. All peoples and companies must change the bankingssoftware and the costumer data form acountnummers in the new IBAN and BIC numbers. See: http://www.arma-it.de/shop/artikelueber.php?wgruppeid=211&wgruppe_offen=211 Functions: - generate SEPA XML'S - Calc IBAN - BIC Database (DE,AT and CH) Questions: vertrieb@arma-it.de PS: Bankinssoftware for Develpoers (Germany only) http://www.arma-it.de/shop/artikelueber.php?wgruppeid=212&wgruppe_offen=212 El 26/10/13 21:38, A...

Delphi 7 to Delphi XE
Have been using Delphi 7 for many moons ( have got later versions but never upgraded to ) My first problem is: Component Palette. in XE it is a small toolbar docked in top right in Delphi 7 it gives a large view of all the components. I am struggling to be able to cope/access my components.in Delphi XE. Can I make the component pallette tool bar the same size as Delphi 7, or is there a fast way to view/choose all available components in XE, that I have not spotted yet? Kind Regards, Robert. Hi, What I know is that in Delphi 2010 and XE you can choose between t...

Delphi 4 to Delphi 2009
Hello, Thanks to all who answered my previous question. That was a great help. And atlast our client agreed to upgrade our delphi version from 4 to Delphi 2009. *Sigh*. But before that, I need to give the estimation and cost regarding the migration to delphi 2009. Can anyone tell me is there any tool to migrate from delphi 4 to delphi 2009 or just I need to compile our Delphi 4 application in Delphi 2009. I have read from the delphi 2009 feature matrix that Delphi 1 through Delphi 2007 import is possible in delphi 2009. But i am not that sure considering the size of our application. ...

Delphi for PHP or Delphi PRISM
Hi, I have the opportunity to develop a web-based library management system. Nothing fancy, just being able to do the usual CRUD stuff for books and provide a search facility. Borrowing is to be done via an email request to the library admin who then sends out the book(s). Since both Delphi for PHP and Delphi PRISM will enable me to develop the app, which one will allow me to deliver it in less time and also increase (even how small) my marketability as a web developer? Thanks. Phillip Flores Phillip Flores wrote: > Hi, > > I have the opportunity to develop a...

Delphi 2007 to Delphi 7
I've written a class in Delphi 2007 that is not supported in Delphi 7. What would be the best way to achive what I've done in Delphi 2007 in Delphi 7? Thanks, Tom type BondConstants = class { Bond Types } type BondType = record const TREASURY = 3; AGENCY = 0; CORP = 1; MUNI = 2; SBA = 5; MBS = 4; CMO = 6; end; { Day Count Methods } type DayCount = record const ACTUAL_360 = 2; ACTUAL_365 = 1; ACTUAL_ACTUAL = 1; d30_360 = 0; ...

Web resources about - Delphi like interface - embarcadero.delphi.win32

Interface - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

User Interface of the Week
“Maintenance mode” of a cash-for-used-phones machine, as spotted by Dave Addey . This is only the first tab. Obviously this is crazy, but in ...

iOS 9 How-To: Use the updated multitasking interface on iPhone and iPad
Ever since Apple made the move to a more ‘flat’ design with iOS 7 , the multitasking interface has changed in either a minor or major way with ...

Google streamlining Hangouts on the web with interface tweaks, higher quality video
Google has announced some updates coming to Hangouts video calls on the web, including a tweaked interface, along with faster, crisper full-screen ...

This startup wants to bring a Minority Report-style interface to your living room
... ago. After all, the best input device would be no extra input device at all—who wouldn’t want a perfectly accurate Star Trek -style voice interface ...

In pictures: iOS 9 vs. Android 6.0 Marshmallow user interfaces
Apple and Google already have hundreds of millions users for their mobile operating systems. Hardcore fans of each mobile platform seem to be ...

Google Updates Search Interface For Tablets
It looks like Google updated the search interface for tablets and switched to the mobile UI. The previous tablet interface was an interesting ...

Digitimes Research: Pogo Pin to account for over 60% of power charging interfaces used in smart wearable ...
Pogo Pin will account for over 60% of power charging interfaces used in smart watches and smart bands in 2016, all types of USB together for ...

Google Camera Receiving Update for Android 6.0+ Devices, Includes New Interface
Google Camera , Mountain View’s in-house shooter software for Android devices, is receiving an update to build 3.1. Inside, the new UI that is ...

The interfaces that bridge the human-machine divide
First it was toggle switches. And then keyboards, the mouse and other standard interface devices gave us control of computers and the digital ...

Resources last updated: 11/21/2015 2:47:45 AM