Home > Software engineering >  Win10 VB6 under development, I was drunk.
Win10 VB6 under development, I was drunk.

Time:09-22

Program has a special demand, is running, the icon on the status bar into a small icon (figure 1), by default, the system icon on the status bar is a great icon (figure 2), in Windows 7, can run normally, on doing is implemented as follows:
 
'the SOFTWARE \ Microsoft \ Windows \ CurrentVersion/Explorer/Advanced/TaskbarSmallIcons value to 1
Rc=RegOpenKeyEx (HKEY_CURRENT_USER SUBKEY_ADVANCED, 0, KEY_SET_VALUE, hSubKey)

If the rc & lt;> ERROR_SUCCESS Then Exit Sub

Rc=RegSetValueEx (hSubKey REGNAME_TASKBARSMALLICONS, 0, REG_DWORD p_SmallIcons, Len (p_SmallIcons))
Rc=RegCloseKey& (HKEY_CURRENT_USER & amp;)

'and then send the message to system
Call SendMessageTimeout (HWND_BROADCAST, WM_SETTINGCHANGE, 0, 0, SMTO_ABORTIFHUNG, 5000, w_retCode)


but win10 is no good, strange strange, , but,,,

Figure 1

CodePudding user response:

Use the wizard button to simulate manual?

CodePudding user response:

reference 1st floor zhao4zhong1 response:
use wizard button to simulate manual?


This not sure,

CodePudding user response:

Are you sure Win10, is still controlled by the registry Settings information?

You can delete the content in the registry first, and then manually change the way the task bar icon is displayed,
See if it creates the registry keys, and the corresponding value (data type and format),

CodePudding user response:

The
reference 3 floor Chen8013 response:
are you sure Win10, is still controlled by the registry Settings information?

You can delete the content in the registry first, and then manually change the way the task bar icon is displayed,
See if it creates the registry keys, and the corresponding value (data type and format),

Well, modify the registry to it, now the phenomenon is the program runs, manually open the properties for the task bar and shows have small icon, but the taskbar didn't become a small icon, so have a problem with my doubt is sending a message, but just don't know what to with news, how to send,

CodePudding user response:

reference 4 floor sunny50 response:
Quote: reference Chen8013 reply: 3/f

Are you sure Win10, is still controlled by the registry Settings information?

You can delete the content in the registry first, and then manually change the way the task bar icon is displayed,
See if it creates the registry keys, and the corresponding value (data type and format),

Well, modify the registry to it, now the phenomenon is the program runs, manually open the properties for the task bar and shows have small icon, but the taskbar didn't become a small icon, so have a problem with my doubt is sending a message, but just don't know what to with news, how to send,

I mean not to say that the result of your application to modify the registry, isn't that right,
I mean, you put the registry keys (TaskbarSmallIcons) delete, and then directly operation task bar properties,
Let it displayed as large ICONS, small ICONS, would the check system TaskbarSmallIcons created, as well as large ICONS, small icon corresponds to what kind of data,
(that is, first of all to be clear: under Win10, something to do with Windows 7, doing the same,)

CodePudding user response:

According to your instructions, the deleted after, through the task bar will create after operation, so feel that block on the registry, just don't know win10, with Windows 7, message mechanism between doing what's the change?

CodePudding user response:

Under Windows 7/64 I have a look of your code, and is also effective,
Registry unchanged, there appears to be the message of change, this don't know that I can check to information,
WM_SETTINGCHANGE, this should be no difference in
Estimates on HWND_BROADCAST the parameters are changed,

Don't know can use Spy++ "find out" the news,

CodePudding user response:

7 and 10 should be little difference

CodePudding user response:

refer to 7th floor Chen8013 response:
I tried under Windows 7/64 your code, is effective,
Registry unchanged, there appears to be the message of change, this don't know that I can check to information,
WM_SETTINGCHANGE, this should be no difference in
Estimates on HWND_BROADCAST the parameters are changed,

I don't know could use Spy++ "find out," the news

Have not used Spy++, don't know how to find the message
I also ask on the BBS of MSDN, is that there is no reason, strange strange, trouble the prawns are up by..
https://social.technet.microsoft.com/Forums/en-US/c6160636-a7ad-4bd0-9fc4-061b75c9b4ea/windows10-desktop-app-how-to-dynamically-set-the-icon-on-the-taskbar-to-large-or-small
My English is poor, if there is no description is clear, the trouble to the za is explained in the above reply, thank you,,,

CodePudding user response:

VC under the same conditions, the estimate is the message is disabled, don't know how to solve the original poster

CodePudding user response:

refer to the eighth floor chncoder response:
7 and 10 should be little difference.

I think 7 32-bit and 10 64 huge difference!
  •  Tags:  
  • API
  • Related