Home > Software engineering >  Notepad calendar
Notepad calendar

Time:10-09

Please use vb how to create a simple notepad, calendar control is to click on a certain day can bring up the notepad to write things, why the second day after calendar control loading date remains the same?

CodePudding user response:

 Private Declare Function ShellExecute Lib "shell32. DLL" Alias "ShellExecuteA" (ByVal HWND As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd) As Long As Long 

Private Sub MonthView1_DateClick (ByVal DateClicked As Date)
Dim sFilePath As String
With MonthView1
SFilePath=Replace (App) Path & amp; "" & amp; The Year & amp; "Year" & amp; . The Month & amp; "Month" & amp; The Day & amp; "Day. TXT", "\ ", "")
The Open sFilePath For Output As # 1
Close # 1
Call ShellExecute (0, "open", "notepad", sFilePath, 0, 1)
End With
End Sub
  • Related