I have developed an application in C# which runs as system starts up. I also have a system tray icon in task bar. I just want to minimize my application by pressing a keyboard key, say Esc button. &then reload it when i press another button, say F11. I have worked on registry files & set some subkeys &values for it, for example i've set a value for keyboardActivation; the hexadecimal value of F11(which is 570000) & it still doesn't work. I think I know why it doesn't work, 'cause it needs first to be minimized in tray then get reloaded on page, yet I don't know how to minimize the application by a keyboard buttun such as Esc button...
Is there anybody who can help me to implement minimizing process to system tray by a keyboard button?
call this function with the desire key, if it returns 0 then key is not press if it return something else that mean key press
public static extern short GetAsyncKeyState(Keys Key);
128 bit encrypted signature, crack if you can
Hi all, this PropertyGrid is a great tool but I'm having difficulty really getting my head around its workings.
I've figured out how to make a class PropertyGrid-ready and how to define default values for various properties. What I would like to do now is to iterate through all the properties in the grid (ie all the properties of the SelectedObject) and write the value to a file if it differs from the default value for that property.
In other words, there are two things that I'm not sure how to do. First of all, how do I iterate through all of the properties in a PropertyGrid? Obviously the properties will differ depending on the type of the SelectedObject.
Secondly, how do I determine if the value of a given property differs from the default value for that property, in other words the value of the DefaultValueAttribute for that property?
The MS PropertyGrid has not been designed to do that but you can still call the SelectedGridItem property to get the selected property, and then Parent property of the returned GridItem until GridItemType equals Root. Then, you can recursively parse the grid with the GridItems property of the GridItem class.
After that, the Value and PropertyDescriptor properties will help you compare the actual value with the default one.
Sure but I wanted to know how he did it. I mean if he did using smo then obviously there is no Smo.EnumAvailbleOracleSevers() method so saying you can do it for SQL Server is pointless, if you used Smo.
Sorry - I was in the middle of organising unit testers this afternoon so I wasn't really paying too much attention to the subtleties. There are other ways of evaluating SQL Server instances, but I've never heard of one for Orrible.
Deja View - the feeling that you've seen this post before.
Post the exception message, stack trace and any other information it gives you. The more info you give the more likely someone will know the answer.
(Also, what do you mean by "my own system lock", do you mean an app that runs full screen and you have to type a password to close it? or do you mean a GINA replacement for the windows ctrl+alt+del -> lock computer screen?)
If i can provide you with more info please tell me what you need and ill get it for you,
This is the null reference exception which is basicly the same problem the call back crash is harder to reproduce while running inside VS.
As you can see its a full screen type password sort of thing, every keystroke will show another message from my guardian ninja until the correct password is typed in. (mouse gets hidden and clipped)
As you can see it doesnt actually crash inside my forms code but outside it in the program.cs
Type : System.AccessViolationException
Message : Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source : System.Windows.Forms
StackTrace : at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Ninja.Program.Main() in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\Ninja\Ninja\Program.cs:line 27
TargetSite : Boolean PeekMessage(MSG ByRef, System.Runtime.InteropServices.HandleRef, Int32, Int32, Int32)
Weird, did you defiantly put the event subscribe line _before_ the application.run line?
What I'm after is the full exception details, in particular, the stack trace. If you can get them yourself, just post them, if not, can you stick your code online somewhere in a zip file & I'll have a look when I get home.