Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,190 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,154 people online right now. Registration is fast and FREE... Join Now!




calender date display

 
Reply to this topicStart new topic

calender date display, need a help any one

rameshp
20 Sep, 2007 - 10:07 PM
Post #1

New D.I.C Head
*

Joined: 29 Jul, 2007
Posts: 44


My Contributions
hi everybody,
i am create new form and place the calender control.
in this selecting one date..

i want to display the date and close this form ..

i meen i click one button open control and return to one box.using control..
help .

maskedbox1 -commandbuttion ---> press command buttion then dispaly calender form.


click on mouse one click then
maskedbox1 display the date





User is offlineProfile CardPM
+Quote Post

hyperionza
RE: Calender Date Display
22 Sep, 2007 - 02:50 AM
Post #2

New D.I.C Head
*

Joined: 15 Sep, 2007
Posts: 30


My Contributions
I think this is what you meant:

in your main form:
CODE

Public Class Form1

    Private _SelectedDate As Date

    Public Property SelectedDate() As Date
        Get
            Return _SelectedDate
        End Get
        Set(ByVal value As Date)
            _SelectedDate = value
            txt_Date.Text = CStr(_SelectedDate.Day) & "/" & CStr(_SelectedDate.Month) & "/" & CStr(_SelectedDate.Year)      
        End Set
    End Property


    Private Sub btn_GetDate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_GetDate.Click
        Dim TDateSelectForm As CalendarForm
        TDateSelectForm = New CalendarForm(Me)
        TDateSelectForm.Show()
    End Sub
End Class


and in the calendar form
CODE

Public Class CalendarForm

    Private _Parent As Form

    Public Sub New(ByVal parent As Form)
        InitializeComponent()
        _Parent = parent
    End Sub

    Private Sub MonthCalendar1_DateSelected(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DateRangeEventArgs) Handles MonthCalendar1.DateSelected
        TryCast(_Parent, Form1).SelectedDate = MonthCalendar1.SelectionStart
        Me.Close()
    End Sub
End Class


hope thats what you wanted, it wasnt the most clear of queries.

though why didnt you want to use a DataTimePicker
User is offlineProfile CardPM
+Quote Post

rameshp
RE: Calender Date Display
23 Sep, 2007 - 06:55 PM
Post #3

New D.I.C Head
*

Joined: 29 Jul, 2007
Posts: 44


My Contributions
hope thats what you wanted, it wasnt the most clear of queries.
though why didnt you want to use a DataTimePicker


thanks..


in my code easy to pick date and he whants like this design.

in this appear also good..so i am creating like this..
actually..in my previous developer write active x control ..i am also trying to

same thig..

thanks agains..
ram..


User is offlineProfile CardPM
+Quote Post

rameshp
RE: Calender Date Display
26 Sep, 2007 - 10:18 PM
Post #4

New D.I.C Head
*

Joined: 29 Jul, 2007
Posts: 44


My Contributions
i am attaching doc file.please see this doc. i press help file and click once calender then mask edit display date.

only one click.

i searched on events of calender ..

at design time right click on calender and help display properties and evts..

i am writing code like this


Private Sub Form_KeyPress(KeyAscii As Integer)


If KeyCode = 13 Then
Form1.Label1.Caption = Calendar1
Unload Form
End If
End Sub


it is working at enter key only..

i used mouse click but it can not works..

i write this code..

Private Sub Calendar1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbLeftButton Then
Label1.Caption = Calendar1
ElseIf KeyAscii = vbKeyReturn Then
Label1.Caption = Calendar1
End If
End Sub


please modify my code..
give currect val..
thanks


ram...


Attached File(s)
Attached File  New_Microsoft_Word_Document__2_.doc ( 70k ) Number of downloads: 32
User is offlineProfile CardPM
+Quote Post

rameshp
RE: Calender Date Display
8 Oct, 2007 - 02:12 AM
Post #5

New D.I.C Head
*

Joined: 29 Jul, 2007
Posts: 44


My Contributions
hi Louisda16th,

i am worked this file like this..
but i want to create dll using any were pls check my dll and exe file..
i want to like exe file ok
i am attach files..

by using two forms its working..
check everyone..
thanks
ram....


Attached File(s)
Attached File  vbdllcrewation.zip ( 16.32k ) Number of downloads: 24
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 01:24AM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month