EldoS | Feel safer!

Software components for data protection, secure storage and transfer

change the Disk Icon in runtime

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
#26871
Posted: 10/17/2013 10:15:58
by Youssouf SAKO (Basic support level)
Joined: 10/08/2013
Posts: 12

Hello,

I have two icons for my disk and it is ok when I try to display each of these icons. Now I want to display the first one when the disk is visible in the explorer but the media is not mounted, and display the second when the media is mounted.

But it does not work, only the first icon is always display. Even when i call the method SetIcon with the id of the second icon.

Is it possible to change the icon of the disk in runtime?

Youssouf
#26872
Posted: 10/17/2013 12:23:13
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

Hello, Youssef.

I also wanted to do this and last year I tried to accomplish it but couldn't do it.

If you figure out how to do this, I would certainly appreciate if you tell everyone in the Forum and especially me :-) how to do it.
#26873
Posted: 10/17/2013 12:30:55
by Eugene Mayevski (EldoS Corp.)

I have a feeling that this should be doable via Shell APIs.


Sincerely yours
Eugene Mayevski
#26875
Posted: 10/17/2013 13:12:39
by Vladimir Cherniga (EldoS Corp.)

Hello,
Quote
Now I want to display the first one when the disk is visible in the explorer but the media is not mounted

What does this step actually mean by the code execution ?
#26882
Posted: 10/18/2013 02:27:05
by Youssouf SAKO (Basic support level)
Joined: 10/08/2013
Posts: 12

Hello,

Here is how my test code is structured:

1- SetRegistration
2- Initialize
3- CreateStorage
4- AddMoutingPoint
5- SetIcon (The first icon) <-- the explorer displays the first icon
6- waits 30 s
7- MountMedia
8- SetIcon (The second icon) <-- the explorer still displays the first icon

Youssouf
#26883
Posted: 10/18/2013 02:44:18
by Vladimir Cherniga (EldoS Corp.)

Did you try to update icon with F5 in explorer after step 8 ?
Did you try to ResetIcon before set the next icon ?
#26884
Posted: 10/18/2013 02:59:21
by Youssouf SAKO (Basic support level)
Joined: 10/08/2013
Posts: 12

Ok it works now!

No need to ResetIcon, we just need to update the explorer (F5) after the step 8.

Sid we have our answer :-) .

Thank you
Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.

Reply

Statistics

Topic viewed 1486 times

Number of guests: 2, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!