System Tray Icon for .NET Core Console App

Notification icon or tray icon is supported for .NET Core 3.0 onwards only. Install .NET Core 3.0 Preview from https://dotnet.microsoft.com/download/dotnet-core/3.0 to add the tray icon for a console or windows application.

Once installed, create a new console application using .NET Core in Visual Studio

Add references to System.Windows.Forms and System.Drawing.Common from .NET Core 3.0 library, which will be located at C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\3.0.0-preview3-27504-2.

Also, add your tray icon. Here, I have used the cat.ico for the tray icon.

In your program, use the NotifyIcon from System.Windows.Forms namespace to create a tray icon and add the notification message to it.

Sample code:

Console.WriteLine(“Hello Kitten!”);
NotifyIcon icon = new NotifyIcon();
icon.Icon = new System.Drawing.Icon(“./cat.ico”);
icon.Visible = true;
icon.BalloonTipText = “Hello from My Kitten”;
icon.BalloonTipTitle = “Cat Talk”;
icon.BalloonTipIcon = ToolTipIcon.Info;
icon.ShowBalloonTip(2000);
Console.Read();

Ensure that the cat.ico will be copied to your output directory

Run the application and observe the tray icon and notification appearing near the task bar.

 

Posted in .NET Core | Tagged , | Leave a comment

Azure Notebooks – Great tool

Great tool from Microsoft.

Read the book and practice directly from your browser. No setup hurdles, no download issues, and so on. Many books related to Python, R and Data Science are available now. Add new skills to your expertise quickly.

https://notebooks.azure.com/

Screen shot from my Python basics; edit the samples and run.

Posted in Azure, Book | Tagged , | 2 Comments

Enabling SQL Express User

Visual Studio(VS) lovers! Yes, we want to work on everything from within the VS. Yes, of course, our VS have required features to support us to perform various development and ALM operations. Database is one of the main parts of any application development. Instead of working on the database objects using SQL Server Management Studio, we prefer to use VS. Access the database directly from VS using the SQL Server Object Explorer. Moreover, we would like to work with the SQL express instead of connecting to a centralized database server for small project or at the starting of a project.

Read more at https://www.codeproject.com/Tips/1202659/Enabling-SQL-Express-User

 

 

Posted in SQL, Visual Studio | Tagged | Leave a comment

Resuming Writing – First article on Azure Data Lake

After a long time, I am resuming my writings. My current focus area include Azure, DevOps and Bot. You can expect more articles related to these topics in coming days.

My first article, after the long break, talks about Azure Data Lake. First half of the article dealing with Azure AD app creation will be applicable for those who plan to develop external applications talking to Azure resources. Following is an abstract from the article:

Azure Data Lake allows you to rapidly store and ingest data simply whatever its form, and do any type of processing and analysis on it across platforms and languages. It is ideal for batch, streaming and interactive analytics because it provides a unified repository for diverse enterprise data requirements.

There are many ways of uploading the files to Data Lake store, using Azure Data Factory Services, using Azure Data Lake Store .NET SDK, Java SDK, Node, REST API and so on.

Read more at https://www.red-gate.com/simple-talk/cloud/cloud-development/uploading-files-azure-data-lake-using-net-app/

 

 

Posted in Uncategorized | Leave a comment

QnA Maker

The QnA Maker, launched in beta, will let users train an automated conversation partner on existing frequently-asked-questions content. After that information is fed in, the service will create a bot that will respond to customer questions with the content from the knowledge base.

Once the information is loaded into the service, users can then view how the bot has paired up questions and answers and add their own custom questions and responses.

Explored with few FAQ links and documents; excellent service.
https://qnamaker.ai/

Posted in Cognitive Services, Microsoft | Tagged , , | Leave a comment