DayOfWeek, StartOfWeek, Week Properties

Purpose

DayOfWeek returns or sets a value that specifies the current day of week. StartOfWeek specifies the starting day of the week. Week specifies the current week number.

Syntax

MonthView.DayOfWeek [ = number ]

MonthView.StartOfWeek [ = number ]

MonthView.Week [ = number ]

Description

The DayOfWeek property specifies the day of the week (1 to 7). Sunday = 1, Monday = 2, etc.

The StartOfWeek property specifies the starting day of the week (1 to 7). Sunday = 1, Monday = 2, etc.

The Week property evaluates to an integer indicating the week number (1 to 52).

Example

OpenW 1, 100, 100, 260, 220

Ocx MonthView mvw = "", 10, 10, 0, 0

mvw.StartOfWeek = 1 ' Sunday

OpenW 2, 400, 100, 200, 300

Do : Sleep  : Until Win_1 Is Nothing

CloseW 2

 

Sub mvw_MouseUp(Button&, Shift&, x!, y!)

Local a$ = "Week No: " & mvw.Week & "  Day of Week: " & mvw.DayOfWeek

Set Me = Win_2 : Print a$ : Set Me = Win_1

EndSub

 

Sub Win_2_Close(Cancel?)

CloseW 1

EndSub

See Also

MonthView

{Created by Sjouke Hamstra; Last updated: 28/09/2014 by James Gaite}