473,385 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Monthly log application

I need to create an application that displays each day of the month and allows the user to input data on a daily basis. This application form would display one month at a time, depending of the month selected. Does anyone have an sample application or code that would allow me to use one form and populate the form with text boxes based on the number of days in the selected month?

Would appreciate any thoughts or ideas.

Thanks
Nov 20 '05 #1
1 977
Hi George,

You mean something as my old standard dynamic winforms control sample?

I hope this helps?

Cor
\\\
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim start As Integer = 4
Dim top As Integer = 25
Dim i As Integer
Dim nowdate As DateTime = DateTime.Now
Dim mybutton(System.DateTime.DaysInMonth _
(nowdate.Year, nowdate.Month)) As Button
For i = 0 To System.DateTime.DaysInMonth _
(nowdate.Year, nowdate.Month) - 1
mybutton(i) = New Button
mybutton(i).TextAlign = ContentAlignment.MiddleCenter
mybutton(i).Width = 40
mybutton(i).Height = 20
mybutton(i).FlatStyle = FlatStyle.Flat
mybutton(i).BackColor = Drawing.Color.AntiqueWhite
mybutton(i).Location = New System.Drawing.Point(start, top)
mybutton(i).Text = (i + 1).ToString
mybutton(i).Cursor = Cursors.Hand
Me.Controls.Add(mybutton(i))
AddHandler mybutton(i).Click, AddressOf mybutton_Click
AddHandler mybutton(i).MouseHover, AddressOf mybutton_Hoover
AddHandler mybutton(i).MouseLeave, AddressOf mybutton_Leave
start = start + 40
If (i + 1) Mod 5 = 0 Then
top = top + 20
start = 4
End If
Next
End Sub
Private Sub mybutton_Click _
(ByVal sender As Object, ByVal e As System.EventArgs)
Dim thisbutton As Button = DirectCast(sender, Button)
MessageBox.Show("The day is: " & thisbutton.Text)
End Sub
Private Sub mybutton_Hoover _
(ByVal sender As Object, ByVal e As System.EventArgs)
Dim thisbutton As Button = DirectCast(sender, Button)
thisbutton.BackColor = Drawing.Color.AliceBlue
End Sub
Private Sub mybutton_Leave _
(ByVal sender As Object, ByVal e As System.EventArgs)
Dim thisbutton As Button = DirectCast(sender, Button)
thisbutton.BackColor = Drawing.Color.AntiqueWhite
End Sub
///
I need to create an application that displays each day of the month and allows the user to input data on a daily basis. This application form would
display one month at a time, depending of the month selected. Does anyone
have an sample application or code that would allow me to use one form and
populate the form with text boxes based on the number of days in the
selected month?
Would appreciate any thoughts or ideas.

Thanks

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ray in HK | last post by:
I have 2 tables, they are daily and monthly tables. I want to update the monthly table with the max and min value of the daily table with the corresponding month. I figure out the following...
18
by: Jeremy Weiss | last post by:
I'm trying to build a database that will handle the monthly billing needs of a small company. I'm charting everything out and here's what I see: table for customers sub table to track payments...
1
by: Alison | last post by:
Four teacher's aides and I provide Basic Skills Instruction in Reading, Language and Math to over 100 K to 6 children in the BSI program. The BSI program is funded by government grants and as such...
0
by: Vishnu | last post by:
In a Windows Application How to display a monthly , weekly calender ( Just like the calender in Outlook or the calender display airline websites) .....Also how will the code know if some month and...
3
by: cameron | last post by:
Hi I am new here in this forum: I am writing a C++ program to calculate a Montly Mortgage Payment where the loan amount is 200,000.00 with a 5.75% interest rate with a term of 30 years. My program...
1
by: Paul H | last post by:
Can anyone give me some pointers as to how to construct a form or forms that will allow me to see a schedule of meeting rooms Booked or Available as a nice visual display. The Query that holds the...
1
by: azimid | last post by:
Hello everyone, I need your help with a query. Currently I display the data in a daily format. I have a form that the users submits the date range (from say 20061224 to 20070530) and the...
7
by: Lucas_london via AccessMonster.com | last post by:
Hi I have set up a database/tables in Access based on daily timeseries data. However I would like to create two additional columns in the table as a basis to pull the data on a weekly and...
0
by: Rog | last post by:
Who am I?: Hi I am a 'one-man-show' and mainly in the ecommerce and community business based in Western Europe. With over 13 years experience in the internet and telecommunication business, I...
1
by: Jiwei06xie | last post by:
I'm interested in tracking monthly utility bills....monthly charges, units/volumes, costs per unit and so on, by monthly date. The data source would be mainly from an Excel Spreadsheet (or sometimes...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.