Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Calendar For Showing Only Mondays


Hi,
How can i show a calendar on a VB form which allows users to select Momday's only?

Regards,
Bharathram G




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Calendar Showing Many Selected Dates
I am looking for a control that I can use to mark muliple dates.

I am going to use it to marke holidays for an user, and this might be:
from 1/6-12/6, and additional some separate dates, like 20/6 and 23/4.
And it has to be user-friendly.....

thanks!

Get Dates For All Mondays On Monthview Control
I've got a monthview on my form that always displays 6 weeks. Is there a quick and easy way to obtain the dates of all 6 mondays currently displayed?

Taking The Date Of Mondays To Put Into Arrays
My program needs to take the date for mondays for the next nine months and put them into a array in order to add them to a list box.
i know how to ad them to the listbox, its just working out the dates of the mondays that is the part i am having difficulty with.
cheers, Marcus Tibbitts

I Hate Mondays, Overflow Problem
I know this is something stupid but I am not seeing it the problem. These are the values that are being assigned in the code below.

BpS = 512
NoFC = 3356843
TNoC = 8

Which equals 13749608448 which should fit fine in a double but I get an overflow error when I try solve for FreeBytes. What am I doing wrong?
Code:
Public Function GetFreeDiskSpace(ByVal Drive As String, _
Optional ByVal FormatAsKB As Boolean = True) As String

Dim SC As Long ' Sectors per cluster
Dim BpS As Long ' Bytes per Sector
Dim NoFC As Long ' Number of free clusters
Dim TNoC As Long ' Total number of clusters
Dim FreeBytes As Double

' verify info being passed In drive info is correct

GetDiskFreeSpace Drive & ":", SC, BpS, NoFC, TNoC

FreeBytes = BpS * NoFC * SC

If FormatAsKB Then
GetFreeDiskSpace = FormatKB(FreeBytes)
Else
GetFreeDiskSpace = FreeBytes
End If

End Function

Problems Linking Outlook Calendar To Microsoft Calendar Control In Vb.
Hi,
For a while now I've been trying to find a way to link my outlook calendar to the microsoft calendar control in visual basic. When I click on the calendar in my program, I want it to show the appointment subject in a text box and the appointment body in a Richtext box. I'd appreciate any help?
Thanks.

Populate Combo Box With Mondays Date From Given Date?
Hi,

I want to populate a combo box with the Monday's dates from a given date, which the user can select, but not sure where to start?

e.g.

Stored date = 13/05/2005

The combo box then has listed: -

16/05/2005
23/05/2005
30/05/2005
06/06/2005
etc.
etc.

Any ideas would be appreciated.

Regards

Crystal Report Not Showing On The Browser...instead Crystalreportviewer Showing
I am creating simple crystal report withing ASP.NET. When I build my project I don't get any errors. When I run it instead of showing me my report it shows me crystalreportviewer on the web browser? How can I fix this problem.

Not Showing The Icon And Showing The Disable X In The Corner
how do I only show the X disabled in the top right corner, no Max or Min, and also no Icon?

Date && Calendar - Can't Print Calendar
Basically I'm trying to create a program which will print the date (day, day of the week, month, year) and the month that that day is in, mainly using the zeller congruence.

The code is below. Everything works, the zeller quantity is right, the date prints fine. The only problem I have is that I'm not sure how I should do the calendar. The Sub for the Calendar is at the bottom, and there you can see my attempt at printing it, but it didn't get anywhere.

Anyone know how I'd code it so that the calendar prints? If you want I can zip everything and attatch the file.

Thank you!


Edit: Oh and this is in Vb6.



Quote:




'Purpose: Create a program which will allow a user
' to choose a day, a month, and enter a
' year. After the data is inputted is
' collected, the date and the calendar of
' that month in that year is printed.

Option Explicit

Sub LeapYear(blnLeapYear As Boolean, intYear As Integer)

intYear = txtYear.Text

'If intYear Mod 4 = 0 Then
'blnLeapYear = True

If (intYear 100) Mod 4 = 0 Then
blnLeapYear = True
If (intYear Mod 100) Mod 4 <> 0 Then
blnLeapYear = False
End If
End If

End Sub

Sub MaxDays(intDaysInYear As Integer, intDaysInMonth As Integer)

Dim blnLeapYear As Boolean
Dim intYear As Integer

LeapYear blnLeapYear, intYear

If blnLeapYear = True Then
intDaysInYear = 366
ElseIf blnLeapYear = False Then
intDaysInYear = 365
End If

If cmbMonth.ListIndex = 0 Or cmbMonth.ListIndex = 2 Or cmbMonth.ListIndex = 4 Or cmbMonth.ListIndex = 6 Or cmbMonth.ListIndex = 7 Or cmbMonth.ListIndex = 9 Or cmbMonth.ListIndex = 11 Then
intDaysInMonth = 31

ElseIf blnLeapYear = True And cmbMonth.ListIndex = 1 Then
intDaysInMonth = 29

ElseIf cmbMonth.ListIndex = 1 And blnLeapYear = False Then
intDaysInMonth = 28

ElseIf cmbMonth.ListIndex = 3 Or cmbMonth.ListIndex = 5 Or cmbMonth.ListIndex = 8 Or cmbMonth.ListIndex = 10 Then
intDaysInMonth = 30
End If

End Sub

Private Sub cmdDisplay_Click()

Dim blnDateValidity As Boolean
Dim strDayName As String
Dim strMonthName As String
Dim intYear As Integer
Dim intDay As Integer

picCalendar.Cls

intYear = txtYear.Text
intDay = cmbDay.ListIndex + 1

Valid blnDateValidity

If blnDateValidity = True Then
DayName strDayName
MonthName strMonthName
picCalendar.Print strDayName & ", " & intDay & " " & strMonthName & " " & intYear
ElseIf blnDateValidity = False Then
MsgBox "The date you entered is not valid. Please ensure that if February, it is either the 28th or 29th depending on whether or not it is a leap year, and make sure the year is between 1600 and 2200.", vbOKOnly, "Sorry!"
End If

Calendar

End Sub

Sub Valid(blnDateValidity As Boolean)
Dim blnLeapYear As Boolean
Dim intYear As Integer

LeapYear blnLeapYear, intYear

If (cmbMonth.ListIndex = 3 Or cmbMonth.ListIndex = 5 Or cmbMonth.ListIndex = 8 Or cmbMonth.ListIndex = 10) And cmbDay.ListIndex < 30 And (intYear > 1599 And intYear < 2201) Then
blnDateValidity = True
ElseIf cmbMonth.ListIndex = 0 Or cmbMonth.ListIndex = 2 Or cmbMonth.ListIndex = 4 Or cmbMonth.ListIndex = 6 Or cmbMonth.ListIndex = 7 Or cmbMonth.ListIndex = 9 Or cmbMonth.ListIndex = 11 And (intYear > 1599 And intYear < 2201) Then
blnDateValidity = True
ElseIf cmbMonth.ListIndex = 1 And (intYear > 1599 And intYear < 2201) And cmbDay.ListIndex < 28 And blnLeapYear = False Then
blnDateValidity = True
ElseIf cmbMonth.ListIndex = 1 And (intYear > 1599 And intYear < 2201) And cmbDay.ListIndex < 29 And blnLeapYear = True Then
blnDateValidity = True
Else
blnDateValidity = False
End If

End Sub

Sub Zeller(intReturnedDay As Integer)
Dim intM As Integer
Dim intY As Integer
Dim intP As Integer
Dim intR As Integer
Dim intMonth As Integer
Dim intDay As Integer

intDay = cmbDay.ListIndex + 1
intMonth = cmbMonth.ListIndex + 1
intM = intMonth - 2
intY = Val(txtYear.Text)

If intM <= 0 Then
intM = intM + 12
intY = intY - 1
End If

intP = intY 100
intR = intY Mod 100

intReturnedDay = (intDay + (26 * intM - 2) 10 + intR + intR 4 + intP 4 + 5 * intP) Mod 7

End Sub

Sub DayName(strDayName As String)

Dim intReturnedDay As Integer
Dim intY As Integer

Zeller intReturnedDay

If intReturnedDay = 0 Then
strDayName = "Sunday"
ElseIf intReturnedDay = 1 Then
strDayName = "Monday"
ElseIf intReturnedDay = 2 Then
strDayName = "Tuesday"
ElseIf intReturnedDay = 3 Then
strDayName = "Wednesday"
ElseIf intReturnedDay = 4 Then
strDayName = "Thursday"
ElseIf intReturnedDay = 5 Then
strDayName = "Friday"
ElseIf intReturnedDay = 6 Then
strDayName = "Saturday"
End If

End Sub

Sub MonthName(strMonthName As String)

If cmbMonth.ListIndex = 0 Then
strMonthName = "January"
ElseIf cmbMonth.ListIndex = 1 Then
strMonthName = "February"
ElseIf cmbMonth.ListIndex = 2 Then
strMonthName = "March"
ElseIf cmbMonth.ListIndex = 3 Then
strMonthName = "April"
ElseIf cmbMonth.ListIndex = 4 Then
strMonthName = "May"
ElseIf cmbMonth.ListIndex = 5 Then
strMonthName = "June"
ElseIf cmbMonth.ListIndex = 6 Then
strMonthName = "July"
ElseIf cmbMonth.ListIndex = 7 Then
strMonthName = "August"
ElseIf cmbMonth.ListIndex = 8 Then
strMonthName = "September"
ElseIf cmbMonth.ListIndex = 9 Then
strMonthName = "October"
ElseIf cmbMonth.ListIndex = 10 Then
strMonthName = "November"
ElseIf cmbMonth.ListIndex = 11 Then
strMonthName = "December"
End If

End Sub

Private Sub Form_Load()

cmbMonth.ListIndex = 1
cmbDay.ListIndex = 0
txtYear.Text = 2004

End Sub

Sub Calendar()
Dim intDayCount As Integer
Dim intDayCountTwo As Integer
Dim intDay
Dim intReturnedDay As Integer
Dim intDayTwo As Integer

Zeller intReturnedDay
Print intReturnedDay
picCalendar.Print " "
picCalendar.Print "Sun Mon Tue Wed Thurs Fri Sat"

intDay = 0

If intReturnedDay = 0 Then
Loop Until intDay = 7
intDay = intDay + 1
picCalendar.Print intDay;

For intDayCountTwo = intReturnedDay + 1 To 6
intDayTwo = intDay + 7
picCalendar.Print intDayTwo;
Next intDayCountTwo

picCalendar.Print " "

Next intDayCount
End If

End Sub




I didn't se code or vbcode tags so I thought putting it in quotes was the best way to paste it.

Solar Calendar And Lunar Calendar
Dear Sir, or Madam,
I live in VietNam, the country near China.
As you know, our country uses a calendar called "Lunar Calendar", it's the same as China's calendar.
For now, I need to write a function in VB6 to convert a date in solar calendar to a date in lunar calendar and vise vera.
If you know about this, or you have any solution about this, please give me your instruction.
Please mail to me at: hoangwhm@yahoo.com
Thanks in million.

I Need Hijri Calendar Or Arabic Calendar
Hi all
Can Any one help me for hijri calander or moon calander ,
one of my application in vb6 needs this calander control


thanks in advance

Add Pix To My Custom Calendar (not A Calendar Control)
Hey,
I'm hoping maybe someone can help me. I found this piece of code on the web (don't remember where) and I've made many adjustments to it. The only problem I'm having is I can't seem to add pictures to a date. For example, when the user double clicks on a date to add a text reminder, I would like him to also add a picture to that date. I would appreciate it if any of you could lend some help. Thanx.

NOTE:
This is a simplified version of my calendar. In the calendar in the attached zip file, I have changed the way the user changes the year (it is just a simple command button) and have deleted certain parts of the code that would have just cluttered things up for someone tryin to understand the code.



Edited by - Marce22 on 12/9/2003 1:24:33 PM

Date && Calendar - Need Help With Calendar
Basically I'm trying to create a program which will print the date (day, day of the week, month, year) and the month that that day is in, mainly using the zeller congruence.

The code is below. Everything works, the zeller quantity is right, the date prints fine. The only problem I have is that I'm not sure how I should do the calendar. The Sub for the Calendar is at the bottom, and there you can see my attempt at printing it, but it didn't get anywhere.

Anyone know how I'd code it so that the calendar prints? If you want I can zip everything and attatch the file.

Thank you!


Edit: Oh and this is in Vb6.



VB Code:
'Purpose: Create a program which will allow a user'         to choose a day, a month, and enter a'         year. After the data is inputted is'         collected, the date and the calendar of'         that month in that year is printed. Option Explicit Sub LeapYear(blnLeapYear As Boolean, intYear As Integer)     intYear = txtYear.Text        'If intYear Mod 4 = 0 Then        'blnLeapYear = True            If (intYear 100) Mod 4 = 0 Then        blnLeapYear = True        If (intYear Mod 100) Mod 4 <> 0 Then                blnLeapYear = False        End If    End If    End Sub Sub MaxDays(intDaysInYear As Integer, intDaysInMonth As Integer)     Dim blnLeapYear As Boolean    Dim intYear As Integer        LeapYear blnLeapYear, intYear        If blnLeapYear = True Then        intDaysInYear = 366    ElseIf blnLeapYear = False Then        intDaysInYear = 365    End If        If cmbMonth.ListIndex = 0 Or cmbMonth.ListIndex = 2 Or cmbMonth.ListIndex = 4 Or cmbMonth.ListIndex = 6 Or cmbMonth.ListIndex = 7 Or cmbMonth.ListIndex = 9 Or cmbMonth.ListIndex = 11 Then        intDaysInMonth = 31            ElseIf blnLeapYear = True And cmbMonth.ListIndex = 1 Then        intDaysInMonth = 29            ElseIf cmbMonth.ListIndex = 1 And blnLeapYear = False Then            intDaysInMonth = 28            ElseIf cmbMonth.ListIndex = 3 Or cmbMonth.ListIndex = 5 Or cmbMonth.ListIndex = 8 Or cmbMonth.ListIndex = 10 Then        intDaysInMonth = 30    End If End Sub Private Sub cmdDisplay_Click() Dim blnDateValidity As BooleanDim strDayName As StringDim strMonthName As StringDim intYear As IntegerDim intDay As Integer picCalendar.Cls intYear = txtYear.TextintDay = cmbDay.ListIndex + 1 Valid blnDateValidity If blnDateValidity = True Then    DayName strDayName    MonthName strMonthName    picCalendar.Print strDayName & ", " & intDay & " " & strMonthName & " " & intYearElseIf blnDateValidity = False Then    MsgBox "The date you entered is not valid. Please ensure that if February, it is either the 28th or 29th depending on whether or not it is a leap year, and make sure the year is between 1600 and 2200.", vbOKOnly, "Sorry!"End If Calendar End Sub Sub Valid(blnDateValidity As Boolean)    Dim blnLeapYear As Boolean    Dim intYear As Integer     LeapYear blnLeapYear, intYear        If (cmbMonth.ListIndex = 3 Or cmbMonth.ListIndex = 5 Or cmbMonth.ListIndex = 8 Or cmbMonth.ListIndex = 10) And cmbDay.ListIndex < 30 And (intYear > 1599 And intYear < 2201) Then        blnDateValidity = True    ElseIf cmbMonth.ListIndex = 0 Or cmbMonth.ListIndex = 2 Or cmbMonth.ListIndex = 4 Or cmbMonth.ListIndex = 6 Or cmbMonth.ListIndex = 7 Or cmbMonth.ListIndex = 9 Or cmbMonth.ListIndex = 11 And (intYear > 1599 And intYear < 2201) Then        blnDateValidity = True    ElseIf cmbMonth.ListIndex = 1 And (intYear > 1599 And intYear < 2201) And cmbDay.ListIndex < 28 And blnLeapYear = False Then        blnDateValidity = True    ElseIf cmbMonth.ListIndex = 1 And (intYear > 1599 And intYear < 2201) And cmbDay.ListIndex < 29 And blnLeapYear = True Then        blnDateValidity = True    Else        blnDateValidity = False    End If    End Sub Sub Zeller(intReturnedDay As Integer)    Dim intM As Integer    Dim intY As Integer    Dim intP As Integer    Dim intR As Integer    Dim intMonth As Integer    Dim intDay As Integer        intDay = cmbDay.ListIndex + 1    intMonth = cmbMonth.ListIndex + 1    intM = intMonth - 2    intY = Val(txtYear.Text)        If intM <= 0 Then        intM = intM + 12        intY = intY - 1    End If        intP = intY 100    intR = intY Mod 100        intReturnedDay = (intDay + (26 * intM - 2) 10 + intR + intR 4 + intP 4 + 5 * intP) Mod 7 End Sub Sub DayName(strDayName As String)     Dim intReturnedDay As Integer    Dim intY As Integer        Zeller intReturnedDay        If intReturnedDay = 0 Then        strDayName = "Sunday"    ElseIf intReturnedDay = 1 Then        strDayName = "Monday"    ElseIf intReturnedDay = 2 Then        strDayName = "Tuesday"    ElseIf intReturnedDay = 3 Then        strDayName = "Wednesday"    ElseIf intReturnedDay = 4 Then        strDayName = "Thursday"    ElseIf intReturnedDay = 5 Then        strDayName = "Friday"    ElseIf intReturnedDay = 6 Then        strDayName = "Saturday"    End If End Sub Sub MonthName(strMonthName As String)     If cmbMonth.ListIndex = 0 Then        strMonthName = "January"    ElseIf cmbMonth.ListIndex = 1 Then        strMonthName = "February"    ElseIf cmbMonth.ListIndex = 2 Then        strMonthName = "March"    ElseIf cmbMonth.ListIndex = 3 Then        strMonthName = "April"    ElseIf cmbMonth.ListIndex = 4 Then        strMonthName = "May"    ElseIf cmbMonth.ListIndex = 5 Then        strMonthName = "June"    ElseIf cmbMonth.ListIndex = 6 Then        strMonthName = "July"    ElseIf cmbMonth.ListIndex = 7 Then        strMonthName = "August"    ElseIf cmbMonth.ListIndex = 8 Then        strMonthName = "September"    ElseIf cmbMonth.ListIndex = 9 Then        strMonthName = "October"    ElseIf cmbMonth.ListIndex = 10 Then        strMonthName = "November"    ElseIf cmbMonth.ListIndex = 11 Then        strMonthName = "December"    End If End Sub Private Sub Form_Load() cmbMonth.ListIndex = 1cmbDay.ListIndex = 0txtYear.Text = 2004 End Sub Sub Calendar()    Dim intDayCount As Integer    Dim intDayCountTwo As Integer    Dim intDay    Dim intReturnedDay As Integer    Dim intDayTwo As Integer        Zeller intReturnedDay    Print intReturnedDay    picCalendar.Print " "    picCalendar.Print "Sun  Mon  Tue  Wed  Thurs  Fri  Sat"        intDay = 0        If intReturnedDay = 0 Then        Loop Until intDay = 7            intDay = intDay + 1            picCalendar.Print intDay;                    For intDayCountTwo = intReturnedDay + 1 To 6                intDayTwo = intDay + 7                picCalendar.Print intDayTwo;            Next intDayCountTwo                        picCalendar.Print " "                    Next intDayCount    End If    End Sub

Calendar
Hi there I have a calendar control on my form in a frame with 2 text boxes.

What I want to do is to click in one of the text boxes and then click on the calendar and the date will automatically be placed into the text box. Therefore, calendar click event must remember which text box was clicked.

Does anyone know how to do this?

Calendar
I m using this function for a project: MCSOMCT2.OCX

I need it to give me message box when u try to get a date more then two month from todays date and less then a week e.g:

today = 01/01/2006 and if i click on date that is like 05/01/2006 it should give me message and if 02/03/2006 it should give me message.

I know how to deactivate the calendar but i want it to give me message rather then deactivating it:

Code:
Calendar.Value = Date
Calendar.MinDate = DateAdd("d", 7, Date) 'enable the calendar less then a week
Calendar.MaxDate = DateAdd("M", 2, Date) 'enable the calendar more then two months
has anyone got anything to say please do soo thanks very much....

Calendar
How can:
for example if its the first monday of the week, text box Number = 2 and if its second monday of the week text box number = 25 and if its the third monday of the week and if its the third Monday of the week text box number = 46 and soo on for just a month.

I use MCSOMCT2.OCX component in vb 6

the code i use to get number for the week:

Code:
if txtDay.text = "Sunday" then
txtNumber.text = "1"
if txtDay.text = "Monday" then
txtNumber.text = "4"
'and soo on
End if

Help With Calendar
Hi,

i need help coding a calendar on visual basic, basically i want to select a date and if its the same date as a date in a text box i want a little picture inserted onto the calendar

Private Sub Text1_Click()
If MonthView1.Value = Text1.Text Then
MonthView1.Select 'i know you cant select the day with this command but this is just an example of what i want'
'i want to then insert a picture onto the day selected'
End If
End Sub

Calendar Help
hi

i would like to know if anyone could fix up my code as i need to compile ASAP for a project.

please help.

i would like help with the open and save parts of my code

thanks

VB Calendar
Hi, using Microsoft Calendar Control 9.0, is there a way to change the font or color of the Date Selectors combos?

Winston

Calendar
Visual Basic 6

I added the Calendar Control 9.0 ActiveX Control to the Toolbox in VB6. Does anyone know how to have the current date highlighted when the calendar is shown upon opening? I can't seem to find out if iy can be done at design time.

Calendar In VB
how can i make a pop-up calendar for VB nd select dates on the pop-up and automatically be placed on a textbox. sorry i really don't have an idea on how to create a code for this. can anyone help me? please please...

Calendar
I need to create a calendar that shows entries in the separate days
As in, say for June 1, I want text right in the box for June 1, maybe something like "Dentist Appointment" or "Pay Club Fees", etc. etc.

It would be nice if I could connect it to a database too.

Anyone know of a control that can do this, or of a way to make one from scratch?

Vb Calendar
is there a facility in vb to add a calendar item to a form, much like the ones used on websites whereby the user must click on a calendar icon and choose a date from a pop up form?

Cheers

Calendar Help!!!!!
Hi there,
i am new to this forum and have been looking around and have been really impressed with not only the quality of help but the amount as well!!!!! I am a begginner to VB and have a Uni Project that if anyone could help me with that would be great.

I would liketo be able to display Today's date which would update itself every day according to the computers in built clock.

Just simply the date in any format in a label.

if anyone could help that would be great!!

cheers

James

Using The Calendar. ????
i want to use the calendar in VB. I am trying to create a project that is similar to a scheduler. If i click on a certain day i want the schedule for that day to populate in a text box. then if i click on another day, the textbox would clear and then that days schedule would populate in the textbox.
(ex. If i click on the 4th then something like "meeting at 2" would populate in a text box, then if i clicked in the 5th, something like "rent due") Something simlar to that. any help would be helpful. thanks

Calendar
how can I incorporate one of those little small white drop down calendars into my program...

Calendar
ok this is the problem i need to have a textbox tha will hold a date.
i want to show the calendar when the user bouble clicks the text box.
ut i dont know how to set te Calendar1 variable. odes any olne know how to do it?


Code:
Dim Calendar1 As Calendar
Private Sub Text1_DblClick()
Calendar1.Visible = True
End Sub

Note i do not want to added to the for and have it visible or not, because i want this to be a pop up window.

Calendar
Hi guys

I have 2 problems.

1. I am trying to disable/enable the calendar on Windows
Start Bar. How to do it within a VB form.

2. How to keep a VB form always on top and what ever other
forms/windows we open should be below it. This is like
keeping some ad bar always on top and it will be there as it
was opened and all other windows will be behind/below the
ad bar.

Please help me.

Help With Calendar
Let me try this again. I want to put a calendar in my program and make it were the user can add a one word text on a given day as a reference to a file stored on the users HD. Is it possible to add text to a calendar day using MS Calendar Control 8.0? Or is it possible to be able to click on a date and have lets say a Dialog box come up?

Calendar
In some programs, there is a calendar that pops out of a ComboBox-like control. Is there an easier way to do this then hooking the ComboBox? I posted the code I'm using and it works.


Code:
Private Sub Hook(hWnd As Long)
'Don't hook twice or you will
'be unable to unhook it.
If defWinProc = 0 Then
defWinProc = SetWindowLong(hWnd, GWL_WNDPROC, AddressOf WindowProc)
End If
End Sub

Private Sub Unhook(hWnd As Long)

If defWinProc <> 0 Then
Call SetWindowLong(hWnd, GWL_WNDPROC, defWinProc)
defWinProc = 0
End If

End Sub

The WindowProc Procedure looks like this (must be in a module):

Code:
Public Function WindowProc(ByVal hWnd As Long, _
ByVal uMsg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long) As Long

If uMsg = WM_LBUTTONDOWN Then
frmDetail.dtPick.Visible = True
frmDetail.dtPick.SetFocus
Else
WindowProc = CallWindowProc(defWinProc, hWnd, uMsg, wParam, lParam)
End If
End Function

Using VB6 Calendar In My App...
Ok, I need a little guidance here. I have 2 labels (startdate & enddate) when the user clicks on these they each open their own form w/a calendar for date input. I can get the forms to open & the calendars to be on the forms, what I need to know is how do I get clicking on a date to fill in startdate.caption or enddate.caption on the original form? I want no user input from these fields unless the dates are chosen from the calendar, which is why I didn't use a textbox.

A minor side note, I need the date to be formatted like this: 14Feb2005

Thanks guys!

Calendar?
Can someone point me to some examples on the Calendar control
Note not Month VIew or Datepicker

I am reffering to the Calendar control..

I am wanting to see examples or an example to see how to go about adding events for each day or data to be saved to that Days cell.

vbMarkO

Calendar Value
I'm new to visual basic trying to make one of those all-too-common calendar programs and I suck at it to be honest (I'm using Microsoft Calendar Control 8.0)

My problem is that I want to store the Calendar.value as a data type but when I try to want it to display the data type in a label it said "Argument not optional" so I assumed that meant that it couldn't store it as a date data type so I tried a string but that didn't work either. What form of data type do I need to store the Calendar value? Or am I doing something else wrong?

Calendar
i was wondering if anyone had any code for a simple calendar? I would like to add this to an application I am programming, hoping this could save me sometime.

thanks in advance
annie

Calendar
Ok, is this possible, and if so, how would I go about it?

A database contains name, date and job.

I have a textbox, a listbox a db control and a calendar control. What I need, is you type a name in the textbox, then click a date, it runs a query on the database and inserts each of the jobs into the listbox

Please help

Thanks

Calendar Again.
I asked a few weeks ago and got some great advise. But no matter how hard I try I can not make a way to save my entry's so they will come back in the correct day and month when I re open the Calendar or change months. I think a Data Base is without a doubt the best way to do it. But I cannot save the array and open it back up in the correct order.
I am putting a copy of what I got on here. If any of you have time to take a look at it and tell me what I need to do I would be very Grateful. When you double click on a day a input box comes up and you can add text to that day. I want to be able to save it so when you open the calendar back up it will still be there in the correct month and day.
Thanks
John

Using VB Calendar
Hi,

Im just trying to write a little app to keep me organized.

Using the standard VB controls i have added the MonthCalendar.

Does anyone know a way off adding notes or something like this to the days of the week?

Cheers

Calendar
I need a WINDOW calendar control that can enter text in the day area. So far, I have only found the Microsoft Calendar Control 11.0 but it does not have that feature.

Is there a freeware or something that is similar to this one? ctCalendar

Pop-Up Calendar
I believe I have all the code needed to pop-up a calendar in Excel 2007. However I'm having difficulty with the code that will pop-up the calendar whenenver a cell in a particular column is selected. Here's what I have:


Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = Range("E:E") Then
Call OpenCalendar
End If
End Sub


When I click on a cell in column E the calendar is not opening. Here is the other code I have in the same module:


Code:
Private Sub cmdClose_Click()
Unload Me

End Sub


Private Sub Calendar1_Click()
ActiveCell.Value = Calendar1.Value
Unload Me

End Sub


Private Sub UserForm_Initialize()
If IsDate(ActiveCell.Value) Then
Calendar1.Value = DateValue(ActiveCell.Value)
Else
Calendar1.Value = Date
End If
End Sub


Sub OpenCalendar()
frmCalendar.Show
End Sub


Any idea what I'm doing wrong? Thanks, Dan

Calendar
Hi everyone, I have this really noob question... I am trying to use a calendar control, but I need to find out what day of the week it is because, I want to use the weekdayname function to find the name of the day... can anyone help me out...

Calendar
Hey people,

I am using the following code to draw a calendar in a mshflexgrid, all is working well, except for one thing. I want to fill in the gaps, for eg.


VB Code:
With grid  .Row = 1 If m <> 12 Then For i = 1 To DateDiff("d", "01/" & m & "/" & Y, "01/" & m + 1 & "/" & Y)d = CDate("01/" & m & "/" & Y) + i - 1.Col = Weekday(d) - 1.Text = i.CellBackColor = RGB(249, 244, 185).CellFontSize = 18.CellFontName = "10 Cent Soviet" If Weekday(d) = 7 Then .Row = .Row + 1 If d = Date Then .CellForeColor = vbBlueDoEventsNext grid.Redraw = True Screen.MousePointer = vbNormalgrid.MousePointer = flexArrowExit Sub Else For i = 1 To DateDiff("d", "01/" & m & "/" & Y, "01/01/" & Y + 1)d = CDate("01/" & m & "/" & Y) + i - 1.Col = Weekday(d) - 1.Text = i.CellBackColor = RGB(249, 244, 185).CellFontSize = 18.CellFontName = "10 Cent Soviet" If Weekday(d) = 7 Then .Row = .Row + 1 If d = Date Then .CellForeColor = vbBlueDoEventsNext grid.Redraw = TrueScreen.MousePointer = vbNormalgrid.MousePointer = flexArrowExit Sub End IfEnd With


now here is a screen shot:

http://users.tpg.com.au/nick_ng/calendar.jpg

So basically, i want to fill in the gaps, prior to the start of the month and end of the month, with the days from the month before and month after?

Any help would be great!

Cheers

Calendar Help
[IMG]calendar[/IMG]
I know this is a simple question but I wanted to know how would I

1. create the form below
2. change the data in the fields to the right to reflect the
for that day.
3. what would be the most efficient way to create the
formto the right of the calendar ....should I used some type of
grid or caption and textboxes.


If image doesn't show follow this thread

Calendar
Is there a way to change colors of indivdual boxes on the calendar. I have a test that i do to see if it is a vaild date for the user to select. I want all valid dates to look green on the calendar and invalid dates to show up red on the calendar. Is this possible?

Vb Sql Calendar
Hey guys,

Could someone please take a look at this and help to discover what im doing wrong, this is really stressing me out ive spent 4 hrs on this

it keeps putting my dates out of wack, for e.g http://users.tpg.com.au/nick_ng/completecal.jpg

Please help, thanks
VB Code:
Dim i As IntegerSet con = New Connectioncon.Open "Provider=SQLOLEDB.1;User ID=sa;password=Newgen01;Data Source=NS1; Initial Catalog=ng"Set rs = New RecordsetWith MSHFlexGrid1   .Rows = 7   .FixedRows = 1   .Cols = 7   .FixedCols = 0   .Row = 0   .RowHeight(0) = 300       For i = 1 To 6          .RowHeight(i) = (.Height - .RowHeight(0) - 200) / 5.9      Next      For i = 0 To 6         .ColWidth(i) = (.Width - 0) / 7      Next.Col = 0.Text = "Sunday".Col = 1.Text = "Monday".Col = 2.Text = "Tuesday".Col = 3.Text = "Wednesday".Col = 4.Text = "Thursday".Col = 5.Text = "Friday".Col = 6.Text = "Saturday" .ColAlignment = 4End With rs.Open "Select Sum(Case When delstats='Pickup' Then 1 Else 0 End) As Pickups, Sum(Case When delstats = 'Pickup' Then 0 Else 1 End) As Deliveries, datefrom From invoices where Month(datefrom) = " & cboMonth.Text & " And Year(DateFrom) = " & cboYear & " group by datefrom order by datefrom", con, adOpenKeyset, adLockReadOnly MSHFlexGrid1.Redraw = FalseWith rs    .MoveFirst    If Not .EOF Then        Do            MSHFlexGrid1.Col = Weekday(.Fields("DateFrom")) - 1            MSHFlexGrid1.Row = Int(Day(.Fields("DateFrom")) / 7) + 1            MSHFlexGrid1.Text = rs!datefrom & vbCrLf & "Pickups: " & .Fields("Pickups") & vbLf & "Deliveries: " & .Fields("Deliveries")            .MoveNext        Loop Until .EOF    End IfEnd WithMSHFlexGrid1.Redraw = True rs.Closecon.CloseSet rs = NothingSet con = NothingMSHFlexGrid1.Visible = True








Edit: Added [vbcode][/vbcode] tags and some indenting for clarity. - Hack

MS Calendar
I'm using MS Calendar in my VB application and something strange is happening. On all computers, it shows the calendar from Sunday to Saturday but on 2 computers, it's Monday to Sunday even if I put this :


VB Code:
myCalendar.FirstDay = vbSunday


Anyone knows why?

Calendar
Is there a calendar control I can select multiple non-adjacent date? I know that with MonthView control, I can use DayBold fonction but there's not a big difference between the bold and not bold day!

The best would be a calendar that change color of certain date. Is there any?

Calendar
Can anyone help?
I need a "good" calendar Control to do the following things.

1. Select Several days in one Month.
This days could be: 1 thru 5, 15 thru 20 and 28 thru 30.

2. Display multiple months

Why My Calendar Looks Like This?
Hi,
I used MSCal.ocx when I developed this and I forgot to include it in setup package. When I instal it on other machines, I downloaded the MSCal.ocx from a couple of sites and found that my application looks like this without the dates visible. Why is this happening?

Calendar
What I'm doing is giving my people the option to select dates on the calendar and then click go!! when they click go I want to to bring up a spread sheet with the days selected on the top and "X" about of rows down the side (X must be changeable) and when I have filled in one of these rows it will show up and taken or something. Any ideas on who to start on this?? It's almost like a Availability search.

Copyright © 2005-08 www.BigResource.com, All rights reserved