I tried, but it didn't seem to work. But I fixed it with a default button that's positioned outside the form :)
S O S
Posts
-
Getting rid of the enter beep -
Getting rid of the enter beepHow can I get rid of the beep that happens when I press enter on a form with no default button?
-
KeyDown for arrowsI tried that, but when I put a breakpoint there, I see the function never gets called... hmm?
-
KeyDown for arrowsHow can I get the KeyDown event to fire for the arrow keys?
-
Creating child windowThanks! That worked. However, the window is created with the WS_CHILD style, which makes it be "inside" the main window. This I do not want. How can I make it not use the WS_CHILD style, but still have the main window as its parent? I don't see any place to specify the window styles manually...
-
Creating child windowWell, method 1 gives me:
An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dll
Additional information: Cannot add a top level control to a control.
And neither my own form nor the System.Windows.Forms.Form class has a (Form) constructor...
-
Creating child windowHow can I create a form as a child window of another form?
-
6.0 to Dot-Net ConversionIf you open a dsp/dsw, VS.Net will ask you to automatically convert it. So open your main workspace file with all the projects and say "Yes to all" and that should be it.
-
C# and BitBltI remember when I did some drawing, it came out black if the bitmaps were of incompatible format. (Maybe the form is 256 colours and bitmap is 32bit? Then 256 colours -> 32bit conversion is easy, but 32bit -> 256 is not. I'm not sure if it converts like that, but it's possible)
-
Global Variables ...wtfMake the second form's constructor have some parameters that receive it?
-
Topmost windowsNo, that's not what I need. What I need is to know what window is getting activated, so I don't turn the topmost window invisible when I click on it.
-
WndProc Within a classYou can't put it in a class. All non-static class functions have a hidden "this" argument, so the function signature won't match with the WNDPROC one.
-
Modifying window without activatingHow can I top/detop (TopMost property) and show/hide a window without activating it? In C, there was the SetWindowPos() function that had an activate flag, but I don't see any such thing in .Net.
-
System propertiesMaybe Control.DefaultFont and Control.DefaultIForgotWhat can help you.
-
Topmost windowsThere's an always on top window in my app, but I have an annoying problem with it. The window is just a normal window with TopMost set to true. Now this works fine, but I want the window to dissappear if another app gets focus. I tried pussing
topwindow.Visible = true;
in the Activate event andtopwindow.Visible = false;
in the Deactivate event, but these events get called even when another window in my app gets actiavted, so whenever I click on the topmost window, it dissappears because the main window gets deactivated. Is there a way to prevent the topmost window from getting focus at all? (But still use it as normal, just no focus. By normal I mean still have it receive mouse clicks.) Or some way to determine what window is getting focus in the Deactivate event? Or some other way to fix this? -
AutoScroll jumping to 0I have a window with AutoScroll set to true, but I seem to have some odd problem wtih it. Whenever the window gets focus, the scrollbars jump to 0. How can I fix this?
-
Setting GetAsyncKeyState() output?How can I set the key states that GetAsyncKeyState() returns? SetKeyboardState only sets the ones that the other keyboard functions return, but GetAsyncKeyState() is global it seems.
-
WH_CALLWNDPROC global hook not receiving messages?Is a WH_CALLWNDPROC global hook not supposed to catch WM_KEYUP/WM_KEYDOWN messages for some reason? I have an edit control hooked, but I can't get these messages. I do get some normal ones (focus, destry, a few edit control ones), so I know it is hooked right :/ Spy++ shows the WM_KEYUP/WM_KEYDOWN messsages fine.
-
C DLL -> C# DLL possible?Thanks
-
C DLL -> C# DLL possible?Thaank you