I wanted to know pro-grammatically via C# when my OneDrive was “Up To Date” or not.
I wondered if there was an API, and sure there is, see here for Live One Drive API.
I am not a One Drive API expert, but all the examples seemed to be specific for mobile applications and not for say Windows 7 or Windows 8.
I also have a drop box account, again if I wanted to know when its “Up To Date”, another API to investigate !
I then read on forums other people looking to do similar things with Drop Box and One Drive etc, and talk about scraping the data from the Tool Tip from the Tray Icon. Very Cunning !
I saw a few posts about the ability to scrape from the Tool Tips, but not a complete demo example / solution.
After lots of digging around the Internet with some fantastic input from others, I managed to piece it all together and get this working.
Tested on : –
Windows Essentials Server 2012
In the image below you can see we read from the Tool Tip that OneDrive was uploading a 5GB file, 2.9 GB was completed.
Demo Project to Scrape Tray Notification Tool Tips in CSharp
Complete code below (and downloadable project).
Open Visual Studio and create a new Windows Application
On to your form drag over a Button and List Box for you have something like this
Scrape Tray Notification Tool Tips
Now double click your button and add the following code:-
Next add an new class to your project called say
Add these name spaces :-
Paste in the code below :-
Huge thanks to these 2 url’s :-
Other Reference Sites :-