|
In that case, I would follow this article[^] (same as the one in my previous post). This works similar to your implementation, but handles the case where there are multiple listeners to your event.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Are you building a control for a form?
Phil
|
|
|
|
|
How do I create menu items with several sub menu items in .NET?
M.
|
|
|
|
|
Hi,
- graphically, use Visual Designer
- programmatically: MainMenu, ContextMenu and MenuItem all inherit from Menu,
which has a MenuItems property, so you can build an entire tree of Menus by adding
MenuItems where ever you want.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Two questions!
By using GACUTIL!
Is there any way to remove all the assemblies of a particular public key token from GAC?
By using NGEN!
Is there any way to remove all the assemblies of a particular public key token from native code cache? AFAIK the command "NGEN uninstall *" removes all assemblies from native code cache.
Best Regards,
Mushq
Mushtaque Ahmed Nizamani
Software Engineer
Ultimus Pakistan
|
|
|
|
|
ngen /uninstall allows you to specify an individual assembly that you want to remove. So no, there's no easy way.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
what are the best c#.net components for processing OCR and digital cameras?
|
|
|
|
|
Has a simple google search turned up anything?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
MC# is a new programming language for all types of parallel architectures:
multi-core processors, cluster and Grid. It's high-level constructs as async- and movable methods,
channels and handlers provide ways to increase dramatically a productivity of programmers who develop
concurrent and distributed applications.
MC# 2.0 programming system (www.mcsharp.net) main features are
1) dynamic workoad balancing over multiple cores/processors and
2)integration with Microsoft Visual Studio 2005.
|
|
|
|
|
If this is an advert then you should be speaking to the site owners about purchacing advertising space.
|
|
|
|
|
This looks like spam to me. Trying to get free advertising by posting a note in a forum. Sorry, it takes money to run the servers and pay for the pipe your using to get your "free" advertising. Support the site by buying ad space.
|
|
|
|
|
One word - pillock.
-- modified at 17:08 Thursday 20th September, 2007
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: One word - berk.
berk?
|
|
|
|
|
Cockney rhyming slang[^]. Although I was unaware of this connotation - I will not be using this one anymore as it's a phrase that I don't like. It also means a person who is a bit of a jerk.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks for the clarification. The meaning of "a person who is a bit of a jerk" is good, but as for the other connotation...I agree with you on that one.
|
|
|
|
|
I've modified it now to pillock. That's generally used for somebody who's a bit foolish.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
|
Hi all,
I've got a C# WinForms application where the top-level form displays a modal dialog to allow the user to set some options. I create it very simply as follows:
using (MyForm form = new MyForm())
{
form.ShowDialog(this);
}
I've turned off the ShowInTaskbar property for the dialog, so it doesn't show up in the taskbar. However, if you press Alt-Tab, it appears in the window list. That itself is not too much of a problem (it just looks bad and can be a little annoying if you're trying to switch between two apps).
However, you can use Alt-Tab to switch back to the parent form even though it is currently showing the modal dialog. I'm unable to use the mouse to do anything with the parent form, BUT I can use keyboard accelerators to use menus on the parent form (with bad consequences). I've worked around this by explicitly disabling and enabling the parent form while displaying the dialog.
So I have two questions:
1) Any ideas for how I can stop my modal dialog appearing in the Alt-Tab window list? I presume it appears there because it is a top-level form, but .NET doesn't seem to like showing non-top-level forms as modal dialogs.
2) Is the approach of disabling and enabling the parent the best approach here? Or am I just missing something obvious?
Thanks,
Dave
|
|
|
|
|
The only keyboard shortcut that Microsoft allow you to disable, by a happy chance, is alt+tab.
Set alt+tab as a key combination, and have the response to it be a
System.Windows.Forms.MessageBox.Show("I am offended by your choice to switch to another program")
About the lock thing-use an if() to disable the shortcuts in the parent until the child is closed!
All of my programs are downloadable at fahadsadah.co.nr
|
|
|
|
|
I was thinking more along the lines of not showing the dialog in the alt-tab list in the first place, rather than preventing alt-tab use altogether - that would be extremely annoying to some people.
|
|
|
|
|
It would indeed, and I must admit I hadn't noticed that a C# modal dialog created its own window in the Alt-Tab list. It looks like I've got some fixing to do (once you figure out what the cause is).
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi Pete,
This blog[^] calls it a bug in Windows XP PowerToy Task Switcher.
And it fits with my experience:
- regular Alt-Tab works as expected;
- PowerToy shows both form and its modal dialog whatever properties you set.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Ah. Glad I haven't lost my mind. Thanks for link.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I'm using System.Configuration.ConfigurationSettings, and it says the class is depreciated, and to use System.Configuration.ConfigurationManager (or something like that..) .. However, when I try and use the newer one, it says it doesn't exist. So I am forced to use the depreciated class. Which isn't a problem, everything still works. I just was curious as to what was going on.
|
|
|
|
|
Did you add a reference to system.configuration.dll?
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|