This made the job, just some info for anyone else, using this with topmost property to true will not work, i think this is a bug on windows forms
manchukuo
Posts
-
How to not lose focus in the parent form when opening a modeless form -
Updating console textbox from multiple threadswhy not just use begininvoke or invoke? this is executed in the main thread always, or even using windows messages, or there is even invoke required way since .NET 2 the invoke way can be something like this, using anonymous method
///...code code code and more code in your worker thread
string nextText = "qwe";
this.Invoke( (MethodInvoker)delegate {
oneLabel.Text = nextText; // runs on main thread
}
);///...and goes more code in your worker thread
-
How to not lose focus in the parent form when opening a modeless formHello!, well that is the question i remember fixing this in MFC returning a false in the initdialog method, but how to do this in C#? :doh:
-
Load image that really are 2 images into imagelistThank you that was the one
-
Load image that really are 2 images into imagelistHello i want to load an image that is 50x25, which are really 2 images of 25x25 into imagelist an use the index to refer them, i can't make it work Thanks :)
-
Make client area of dialog transparent, so i can see what is behind the windowThe second link is what i needed thanks :laugh:
-
Make client area of dialog transparent, so i can see what is behind the windowthanks but how to do that myself i know that using NULL brush on the WM_PAINT draws the window transparent but just it does that draws a no fill rect, so i can see the back of the window but just the moment it gets drawed, so i am thinking of using a timer but that is not efficient can someone they me how i can do it myself without libraries?
-
Make client area of dialog transparent, so i can see what is behind the windowHello i was just wondering if this can be done?, i want to be able to see the windows that overlapped by my window. Thanks :laugh:
-
pass a Size object to sendmessageThanks this has though me a lot,thanks for your time :cool:
-
pass a Size object to sendmessageok it worked like a charm thank you soo much :laugh:, just a question, isn't there a general way so it could only be one declaration and be able to pass any object?
modified on Friday, May 6, 2011 2:44 PM
-
pass a Size object to sendmessageok i change from this [DllImport("user32.dll")] public static extern int SendMessage( IntPtr hWnd, int Msg, int wParam, int lParam); to this [DllImport("user32.dll")] public static extern int SendMessage( IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam); but now i am getting errors in wparam where i am passing a int, how can i pass the int now and about the part to declare as ref Size i can't because i might use another type in there in the future
-
pass a Size object to sendmessageHello i have this problem. I need to send a message from a child window to a parent window using sendmessage but i can't make it work to send the Size object to my lParam parameter and i don't know how to cast it when catching it in the parent window so i get the valid Size object i send can someone tell me how? i am getting Cannot convert type 'System.Drawing.Size' to 'int' when calling sendmessage i don't know how to pass it there, thanks
-
Make window dock/undock to parent windowHi, I am trying to do an app which has children windows inside it, and make it capable of when drag the mouse off the parent window it undocks and float all around the desktop, but for some reason i can seem to accomplish this. I am using the SetWindowLong method to change style of the window from WS_CHILD to WS_POPUP but it doesn't work, can someone please show me some code to make it work :sigh:
long lastStyle = NativeMethods.GetWindowLong(myControl.Handle,
(int)NativeMethods.GetWindowLongConst.GWL_EXSTYLE);long newStyle = NativeMethods.SetWindowLong(myControl.Handle,
(int)NativeMethods.GetWindowLongConst.GWL_STYLE,
(uint)NativeMethods.WindowStyles.WS_POPUP);newStyle = NativeMethods.SetWindowLong(myControl.Handle,
(int)NativeMethods.GetWindowLongConst.GWL_EXSTYLE,
(long)(NativeMethods.WindowStylesEx.WS_EX_APPWINDOW | NativeMethods.WindowStylesEx.WS_EX_TOOLWINDOW));myControl.Location = new Point(100, 200);//just a test
-
Key pressed time LogicOh i see, i wasn't reading the MSDN documentation :p
-
Key pressed time Logici know about this ones but how to get the time or do the logic for doing what i asked?
-
Key pressed time LogicHello i am currently facing this problem, i am doing a kind of game where when the user presses a key like the 'a' key it makes jump the object, but how to detect key press in a way to know how much jump, if you press the key for a tiny time do a little jump or if you got pressed the button too much jump only a maximum. Thanks
-
How to Use WPF in Vc++ win32/MFC application?You can try this http://msdn.microsoft.com/en-us/library/ms744829.aspx i tried this and succeed some time ago. ;P
-
Return data when using SendMessageYeah the first solution you tell about was the one i was using but i though it was ugly and not a good practice but it worked, i passed a CString pointer, but the 2nd solution you post how could it be implemented? Thanks
-
Return data when using SendMessageHi there. I am currently using a worker thread that communicates to the main thread using a call to sendmessage everything works great but now i need to return a string from that sendmessage handler to my worker thread. How can i return data from there, is it possible? Thanks
-
Nested structs problem [modified]Yes it helps, i now understand more of the problem here so this is compiler dependent then. Thanks for your time i have learned from all you!!