Uploaded September 2021 | Updated November 2026, 1 day ago
Steps I took to create a resizable monthly calendar that displays events such as birthdays in VB.NET Windows Forms (.NET Framework 4.6.1). I show how i create the interface and create a class to provide info to populate, format and navigate the calendar.
#vbdotnet
Original files: (renamed a few variables/methods for clarity):
drive.google.com/drive/folders/1qxcGRJy1KPilXe5XhJDDkz4PaZYmogod?usp=share_link
Updated version that uses a form to add/edit data:
drive.google.com/drive/folders/1-TDIZgN-WZ8_vkdk0i-VNzbDowCXb03P?usp=share_link
Steps I took to create a resizable monthly calendar that displays events such as birthdays in VB.NET Windows Forms (.NET Framework 4.6.1). I show how i create the interface and create a class to provide info to populate, format and navigate the calendar.
#vbdotnet
Original files: (renamed a few variables/methods for clarity):
drive.google.com/drive/folders/1qxcGRJy1KPilXe5XhJDDkz4PaZYmogod?usp=share_link
Updated version that uses a form to add/edit data:
drive.google.com/drive/folders/1-TDIZgN-WZ8_vkdk0i-VNzbDowCXb03P?usp=share_link


![C# - Wait for active window title
Using win32 dll to wait for an external active window such as Notepad in C#. This supports my automation of desktop apps. #csharp
[DllImport(user32.dll)]
static extern IntPtr GetForegroundWindow();
[DllImport(user32.dll)]
static extern int GetWindowText(IntPtr hWnd, StringBuilder text, int count);
public static string GetActiveWindowTitle()
{
const int nChars = 256;
StringBuilder buff = new StringBuilder(nChars);
IntPtr handle = GetForegroundWindow();
if (GetWindowText(handle, buff, nChars) 0) //greater than here
{
return buff.ToString();
}
return ;
}
public static int WaitForActiveWindow(string title, int seconds)
{
DateTime startTime;
string activeTitle = ;
startTime = DateTime.Now;
activeTitle = GetActiveWindowTitle();
while (!activeTitle.ToLower().Contains(title.ToLower()))
{
//Check for timeout
if ((DateTime.Now - startTime).TotalSeconds seconds) //greater than here
return 1;
//Check every 0.2 seconds
Thread.Sleep(200);
activeTitle = GetActiveWindowTitle();
}
return 0;
} C# - Wait for active window title](https://i.ytimg.com/vi/6RkFFoFeLUA/mqdefault.jpg)







