about gui MonthCal help me Topic is solved

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
cgx5871
Posts: 315
Joined: 26 Jul 2018, 14:02

about gui MonthCal help me

Post by cgx5871 » 18 Jan 2024, 22:14

Code: Select all

g:=Gui()
g.SetFont('cBlue s12 bold')
g.Opt('-Caption AlwaysOnTop')
g.AddMonthCal("vMyCalendar")
;~ g.OnEvent('Click', 'MyCalendar')
OnMessage(0x201, WM_LBUTTONDOWN)
g.show
WM_LBUTTONDOWN(*){
    PostMessage(0xA1, 2) ; 0xA1 corresponds to the WM_NCLBUTTONDOWN message, and 2 corresponds to HTCAPTION. This simulates a left mouse button down on the window's caption area.
}
I have created a calendar control.
But I don’t know how to click
1, Get the date value.

After searching the forum, I need to create another button to get it.
If I only want to click/double-click on the control, I can get it directly.
What to do?
2,
I hope that the form can be moved by pressing the mouse on the calendar control.
This PostMessage(0xA1, 2) can only take effect in the border.

3. How to display the month screen during gui show?

User avatar
Datapoint
Posts: 300
Joined: 18 Mar 2018, 17:06

Re: about gui MonthCal help me  Topic is solved

Post by Datapoint » 18 Jan 2024, 23:17

For #1

Code: Select all

g.AddMonthCal("vMyCalendar").OnEvent("Change", CalChanged)

...

CalChanged(GuiCtrlObj, Info) {
	MsgBox GuiCtrlObj.Name "`n" GuiCtrlObj.Value "`n" Info
}

cgx5871
Posts: 315
Joined: 26 Jul 2018, 14:02

Re: about gui MonthCal help me

Post by cgx5871 » 19 Jan 2024, 05:05

@Datapoint
thank you
How to set parameters so that when gui show is executed, the starting page is the month page?

Post Reply

Return to “Ask for Help (v2)”