Questions tagged [wm-syscommand]

11 questions
3
votes
2 answers

Delphi code to turn on screen saver doesn't work in Windows 7

I have a Delphi app that places the computer into screensave using hWnd := GetDesktopWindow ; SendMessage (hWnd, WM_SYSCOMMAND, SC_SCREENSAVE, 0) ; This works fine under XP but I find it doesn't work under (embedded) Windows 7. Any ideas?
rossmcm
  • 5,493
  • 10
  • 55
  • 118
2
votes
2 answers

Help please - WM_SYSCOMMAND message from Aero Shake/3D flip

HI I have an application written in Delphi 2006. I have noticed that when running under windows 7 the application does not receive the WM_SYSCOMMAND message from Aero Shake. However if I run the application as administrator then it does receive…
There is no spoon
  • 1,775
  • 2
  • 22
  • 53
2
votes
1 answer

WM_SYSCOMMAND with wParam 0xF063?

I am trapping WM_SYSCOMMAND messages in WinForm in a C# application for reasons that are not relevant. Sometimes, my handler receives a WM_SYSCOMMAND message with the wParam 0xF063. There is no 0xF063 in the documentation:…
KatDevsGames
  • 1,109
  • 10
  • 21
1
vote
1 answer

WM_SYSKEYDOWN not updating

I tried something with WM_SYSKEYDOWN, and WM_SYSKEYUP for Keyboard-Input. Here is the significant codepart. case WM_SYSKEYDOWN: if (wParam == VK_MENU) // VK_MENU = 18 = alt keys { if (!(lParam &…
DotBlack
  • 38
  • 1
  • 6
1
vote
4 answers

WM_SYSCOMMAND oddities

An application recieves the WM_SYSCOMMAND message when the user selects a menu item command on the system menu, and so wParam can be SC_CLOSE, SC_CONTEXTHELP, SC_MAXIMIZE, SC_MINIMIZE, SC_RESTORE etc. That's logical. (Of course you can also send…
Andreas Rejbrand
  • 105,602
  • 8
  • 282
  • 384
1
vote
1 answer

Listen to WM_SYSCOMMAND Events

I am writing a small c++ program that should react to the sc_screensaver and sc_monitorpower event. this should run in background hence no gui is intended. Since i have no experience with the windows api yet, i am struggling a lot with this. A…
0
votes
0 answers

Window setting Focus Assist turn On/Off programmatically

I am trying to Turn On/Off Focus Assist programmatically. I have tried many ways, (registry/code), but none of them work. I have found the following code, but this also is not working : [DllImport("user32.dll")] public static extern int…
At Work
  • 29
  • 2
0
votes
0 answers

Handling a system menu item of another application

I created a small application that adds an item to the system menu of all windows, and handles clicking on it with a hook (WH_CALLWNDPROC). The code works when the window receives WM_SYSCOMMAND messages with the existing items (minimize, maximize,…
yonni
  • 248
  • 2
  • 11
0
votes
1 answer

How can I send "SendMessage" from a keyboard/macropad?

Ok, I'll try to make this somewhat coherent, as I am not the best writer. I have an AHK script which uses SendMessage command to send code 0x112, 0xf170, 2 to call WM_SYSCOMMAND which responds to SC_MONITORPOWER and 2 is the Power off function. This…
Eeglis
  • 1
0
votes
2 answers

Catch Delphi MDI Child minimize event when the MDI Child form is maximized

I am in need of some help trying to capture the minimize event of an MDI Child form when it is maximized. I am able to capture the minimize/restore/maximize events when the form is not maximized when clicking the buttons circled in red in the image…
CKilpatrick
  • 313
  • 2
  • 8
0
votes
2 answers

Size option disable from the system menu in c# application

I have a c# windows base application.Now I want that the in the system menu the size option should be disable. To add the option in system menu I am using user32.dll. I am using windows form.
jiten
  • 5,128
  • 4
  • 44
  • 73