473,416 Members | 1,559 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

How to supress Ctrl-F6?

My MDI form has several child forms in maximized state. Pressing Ctrl-F6
causes next child to show, which I don't like. How can I cancel standard
Ctrl-F6 behaviour?
Thank you
Nov 17 '05 #1
6 2310
Alex,

You should be able to hook into the KeyDown event on the main form, and
detect the modifier that is pressed at the same time (the ctrl key). You
should be able to cancel this event.

If that doesn't work, then you can always override the WndProc method on
the main form and then handle the key events there (by handling the windows
message yourself).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
My MDI form has several child forms in maximized state. Pressing Ctrl-F6
causes next child to show, which I don't like. How can I cancel standard
Ctrl-F6 behaviour?
Thank you

Nov 17 '05 #2
"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
My MDI form has several child forms in maximized state. Pressing Ctrl-F6
causes next child to show, which I don't like. How can I cancel standard
Ctrl-F6 behaviour?


See Nicholas' earlier post on some options to do what you want.

However, you might like to consider that, unless you are writing
applications *only for yourself*, what you like and dislike is largely
irrelevant. Ctrl-F6 is the standard keystroke for moving between child forms
in MDI apps (as you know), so any of your users who've ever used such an app
(e.g. Word, Excel etc) will fully expect to be able to use that keystroke in
your app too, otherwise they might move to another vendor's solution whose
usage is more intuitive to them.

Just a thought...
Nov 17 '05 #3
KeyDown on main form does not work: it is not fired when ctrl-F6 pressed.
Now I am trying to catch it in WndProc

Thanks

"Nicholas Paldino [.NET/C# MVP]" wrote:
Alex,

You should be able to hook into the KeyDown event on the main form, and
detect the modifier that is pressed at the same time (the ctrl key). You
should be able to cancel this event.

If that doesn't work, then you can always override the WndProc method on
the main form and then handle the key events there (by handling the windows
message yourself).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
My MDI form has several child forms in maximized state. Pressing Ctrl-F6
causes next child to show, which I don't like. How can I cancel standard
Ctrl-F6 behaviour?
Thank you


Nov 17 '05 #4
I wrote "I don't like" just to indicate my problem. For my application it is
absolutely critical to avoid standard MDI behaviour because it appears to
user as a normal single form interface. (only one child is visible at any
particular moment and MDI parent controls the switching between childs based
on functions executed by user).
So don't worry about me losing clients: the app is developed by their specs.

BTW, from options suggested by Nicholas, none seem to work. So, I am still
looking for the right answer...

Thank you

"Mark Rae" wrote:
"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
My MDI form has several child forms in maximized state. Pressing Ctrl-F6
causes next child to show, which I don't like. How can I cancel standard
Ctrl-F6 behaviour?


See Nicholas' earlier post on some options to do what you want.

However, you might like to consider that, unless you are writing
applications *only for yourself*, what you like and dislike is largely
irrelevant. Ctrl-F6 is the standard keystroke for moving between child forms
in MDI apps (as you know), so any of your users who've ever used such an app
(e.g. Word, Excel etc) will fully expect to be able to use that keystroke in
your app too, otherwise they might move to another vendor's solution whose
usage is more intuitive to them.

Just a thought...

Nov 17 '05 #5
Alex,

What messages are you looking for in WndProc? There has to be SOME
message that is handling this, you just have to find the right one.

Also, are you calling the base implementation before or after you check
the message in WndProc?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:48**********************************@microsof t.com...
I wrote "I don't like" just to indicate my problem. For my application it
is
absolutely critical to avoid standard MDI behaviour because it appears to
user as a normal single form interface. (only one child is visible at any
particular moment and MDI parent controls the switching between childs
based
on functions executed by user).
So don't worry about me losing clients: the app is developed by their
specs.

BTW, from options suggested by Nicholas, none seem to work. So, I am still
looking for the right answer...

Thank you

"Mark Rae" wrote:
"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
> My MDI form has several child forms in maximized state. Pressing
> Ctrl-F6
> causes next child to show, which I don't like. How can I cancel
> standard
> Ctrl-F6 behaviour?


See Nicholas' earlier post on some options to do what you want.

However, you might like to consider that, unless you are writing
applications *only for yourself*, what you like and dislike is largely
irrelevant. Ctrl-F6 is the standard keystroke for moving between child
forms
in MDI apps (as you know), so any of your users who've ever used such an
app
(e.g. Word, Excel etc) will fully expect to be able to use that keystroke
in
your app too, otherwise they might move to another vendor's solution
whose
usage is more intuitive to them.

Just a thought...

Nov 17 '05 #6
I've found the solution.
Message is WM_SYSCOMMAND = 0x112,
and WndProc must be defined in all child forms, but not in MDI paremt form.

Finally, it works!
Thank you

"Nicholas Paldino [.NET/C# MVP]" wrote:
Alex,

What messages are you looking for in WndProc? There has to be SOME
message that is handling this, you just have to find the right one.

Also, are you calling the base implementation before or after you check
the message in WndProc?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:48**********************************@microsof t.com...
I wrote "I don't like" just to indicate my problem. For my application it
is
absolutely critical to avoid standard MDI behaviour because it appears to
user as a normal single form interface. (only one child is visible at any
particular moment and MDI parent controls the switching between childs
based
on functions executed by user).
So don't worry about me losing clients: the app is developed by their
specs.

BTW, from options suggested by Nicholas, none seem to work. So, I am still
looking for the right answer...

Thank you

"Mark Rae" wrote:
"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...

> My MDI form has several child forms in maximized state. Pressing
> Ctrl-F6
> causes next child to show, which I don't like. How can I cancel
> standard
> Ctrl-F6 behaviour?

See Nicholas' earlier post on some options to do what you want.

However, you might like to consider that, unless you are writing
applications *only for yourself*, what you like and dislike is largely
irrelevant. Ctrl-F6 is the standard keystroke for moving between child
forms
in MDI apps (as you know), so any of your users who've ever used such an
app
(e.g. Word, Excel etc) will fully expect to be able to use that keystroke
in
your app too, otherwise they might move to another vendor's solution
whose
usage is more intuitive to them.

Just a thought...


Nov 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: LRW | last post by:
I'm creating a simple reply form, and if a form item isn't answered I get an error: "Notice: Undefined index: rb_amntspent in c:\inetpub\wwwroot\mackinaw\survey.php on line 36" even if in the...
1
by: roderik | last post by:
How do I supress the output generated from each psycopg command: >>> import psycopg initpsycopg: initializing psycopg 1.99.10 typecast_init: initializing NUMBER .. .. microprotocols_add:...
1
by: David | last post by:
I have a custom control that contains a class that Inherits the panel control. I am trying to catch a keydown event in this class and then supress it from the rest of the control as well as the...
3
by: JG | last post by:
Hi all, I have a simple aspx page. On the page there is only one button. When I click on the button, the event sequence is Page_Load, Button1_click and Page_PreRender. How do I supress the...
2
by: Still Learning | last post by:
Hi, Currently a crystal report is getting 359.9999 from a dataset. Even with rounding set to 0.0001 it displays 360.0 which is wrong. How can I supress rounding or get it to display 359.9999? ...
4
by: rob c | last post by:
This is a minor thing and only appears in IE (so far), but I'd like to know to correct it (if possible). Whenever I use a form on a webpage, Explorer always leaves a blank line following the...
1
by: Nikhil Mittal | last post by:
How to supress system errors in windows perl In unix it is 2>&1 , what is in windows :o
2
by: =?Utf-8?B?Q2hyaXMgRGF2b2xp?= | last post by:
I have to zero supress some numbers ie; 20.000000000 or 20.0100000 What is an easy way to do this? If I got to write code, is there some code examples out there? -- Chris Davoli
2
by: khani | last post by:
Hi i have following situation in cystal report in detail section i have a field say name.now i have five duplication record like this zahid zahid zahid zahid
6
by: Proaccesspro | last post by:
Hello All, I have a report that is tied to a SELECT query.....Problem is, when I open the report, it also opens the results of the select query. Is there a way to supress the Query from...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.