Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
New to VB
Message
From
29/06/1999 10:10:56
 
 
To
29/06/1999 09:57:41
Nikki Bannister
K&M Computer Systems Ltd
Birmingham, United Kingdom
General information
Forum:
Visual Basic
Category:
Other
Title:
Miscellaneous
Thread ID:
00235213
Message ID:
00235224
Views:
23
Welcome to the world of VB, where everything you do is harder than in VFP!

Here are the steps I recommend you:
- Create a new form (say, frmDate)
- Place a maskedit box on it (you will need to select MSMask32.OCX in the components form, Projects|Components)
- MaskEdit.Format = "dd/mm/yyyy" (or whatever date format you use)
- MaskEdit.Mask = "##/##/####"
- MaskEdit.PromptChar = " "
- You will need to write code in the Validate() event of the maskedit box to validate the date (the user can still enter 54/34/1999)
- In the Terminate() event of the form, issue Me.Hide
- In the calling form, issue "frmDate.Show vbModal"
- To get the date, ldDate = frmDate.MaskEdit.Text (you may need to format the date before)
- Unload the form, Unload frmDate

HTH

>I work for a company who writes bespoke software, I am a visual foxpro programmer who has been asked to maintain a project in VB 5.
>
>I am having difficulty.
>
>Could someone please help me.
>
>The program currently takes todays date to use on all invoices, the customer now wants to be able to change this date. I am trying to call a form with a textbox on, get a date, return the date, and use it in the program. I am having difficulty doing any of it.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform