怎样在vb.net里做一个日历提醒?急~~~~~~

怎样在vb.net里做一个日历提醒?急~~~~~~,第1张

Public Class Form1

   族码烂闷 Dim 设置时间 As DateTime

    Private Sub D1_CloseUp(ByVal sender As Object, ByVal e As System.EventArgs) Handles 日期时间选择.CloseUp

        和.Text = 日兆历哪期时间选择.Value

        设置时间 = 日期时间选择.Value

    End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        日期时间选择.Value = Now

    End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

        If Now.ToString = 和.Text Then

            提醒显示.Text = "时间到了 你该去做些什么事了吧"

            'Timer1.Enabled = False

        Else

            提醒显示.Text = "现在时间是:" &Now

        End If

    End Sub

Private Sub 和_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 和.TextChanged

        设置时间 = 和.Text

    End Sub

End Class

用vb自带的calendar类就可以处理

Imports System

Imports System.Globalization

Public Class SamplesCalendar

Public Shared Sub Main()

' Sets a DateTime to April 3, 2002 of the Gregorian calendar.

Dim myDT As New DateTime(2002, 4, 3, New GregorianCalendar())

' Uses the default calendar of the InvariantCulture.

Dim myCal As Calendar = CultureInfo.InvariantCulture.Calendar

' Displays the values of the DateTime.

Console.WriteLine("April 3, 2002 of the Gregorian calendar:")

DisplayValues(myCal, myDT)

' Adds 5 to every component of the DateTime.

myDT = myCal.AddYears(myDT, 5)

myDT = myCal.AddMonths(myDT, 5)

myDT = myCal.AddWeeks(myDT, 5)

myDT = myCal.AddDays(myDT, 5)

myDT = myCal.AddHours(myDT, 5)

myDT = myCal.AddMinutes(myDT, 5)

myDT = myCal.AddSeconds(myDT, 5)

myDT = myCal.AddMilliseconds(myDT, 5)

' Displays the values of the DateTime.

Console.WriteLine("After adding 5 to each component of the DateTime:")

DisplayValues(myCal, myDT)

End Sub 'Main

Public Shared Sub DisplayValues(myCal As Calendar, myDT As DateTime)

Console.WriteLine(" Era: {0}", myCal.GetEra(myDT))

Console.WriteLine(" Year: {0}", myCal.GetYear(myDT))

Console.WriteLine(" Month:{0}", myCal.GetMonth(myDT))

Console.WriteLine(" DayOfYear:{0}", myCal.GetDayOfYear(myDT))

Console.WriteLine(" DayOfMonth: {0}", myCal.GetDayOfMonth(myDT))

Console.WriteLine(" DayOfWeek:{0}", myCal.GetDayOfWeek(myDT))

Console.WriteLine(" Hour: {0}", myCal.GetHour(myDT))

Console.WriteLine(" Minute: {0}", myCal.GetMinute(myDT))

Console.WriteLine(" Second: {0}", myCal.GetSecond(myDT))

Console.WriteLine(" Milliseconds: {0}", myCal.GetMilliseconds(myDT))

Console.WriteLine()

End Sub 'DisplayValues

End Class 'SamplesCalendar

当有重要的事情要处理又怕自己忘了时,可以在日历上设置提醒,那日历提醒怎么设置的呢,让我们一起来看看隐茄吧~

日历提醒怎么设置

小米手机

1、打开手机日历,点灶逗察击右下角【+】创建日程界面。

2、选择需要设置日程类型、时间,再点击右上角确定图标即可。

华为手指旅机

1、打开手机日历,点击右下角【+】创建日程。

2、添加重要日的设置即可。

oppo手机

打开手机日历,点击上方【+】,新建日程提醒即可。

本文以小米12&&华为p50pro&&OPPO Reno6 Pro+为例适用于MIUI13&&HarmonyOS 2.0&&ColorOS 11.3系统


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/bake/11970063.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-20
下一篇 2023-05-20

发表评论

登录后才能评论

评论列表(0条)

保存