KriXz
Tech Evangelist
2
MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1
100 XP
In my continuation on my first tutorial in using Dialogs, now I will introduce another kind of Dialog, the DateDialog.
First add the Dialog library as your references and create an abstract design. Next, put a button and named it Button1. Then saved the layout name "Main".
Here's the complete code for our tutorial.
Note:
Dd - used as our variable for our DateDialog.
Dd.Year = DateTime.GetYear(DateTime.Now) - syntax to get the year that is equivalent to the year now.
Dd.Month = DateTime.GetMonth(DateTime.Now) - syntax to get the month that is equivalent to the month now.
Dd.DayOfMonth = DateTime.GetDayOfMonth(DateTime.Now) - syntax to get the day that is equivalent to what day is now.
ret - used as a variable for our return value.
For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below.
Best Regards,
Engr. Lyndon Bermoy
IT Instructor/System Developer/Android Developer/Freelance Programmer
Mobile: 09488225971
Landline: 826-9296
E-mail:[email protected]
Add and Follow me on Facebook: https://www.facebook.com/donzzsky
Visit and like my page on Facebook at: https://www.facebook.com/BermzISware
Download
First add the Dialog library as your references and create an abstract design. Next, put a button and named it Button1. Then saved the layout name "Main".
Here's the complete code for our tutorial.
- Sub
Process_Globals
- 'These global variables will be declared once when the application starts.
- 'These variables can be accessed from all modules.
- End
Sub
- Sub
Globals
- 'These global variables will be redeclared each time the activity is created.
- 'These variables can only be accessed from this module.
- Dim
Button1 As
Button
- Dim
bmp As
Bitmap
- End
Sub
- Sub
Activity_Create(FirstTime As
Boolean
)
- 'Do not forget to load the layout file created with the visual designer. For example:
- 'Activity.LoadLayout("Layout1")
- Activity.LoadLayout("Main"
)
- bmp.InitializeSample(File.DirAssets, "bermoy.jpg"
,48,48)
- End
Sub
- Sub
Activity_Resume
- End
Sub
- Sub
Activity_Pause (UserClosed As
Boolean
)
- End
Sub
- Sub
Button1_Click
- Dim
Dd As
DateDialog
- Dd.Year = DateTime.GetYear(DateTime.Now)
- Dd.Month = DateTime.GetMonth(DateTime.Now)
- Dd.DayOfMonth = DateTime.GetDayOfMonth(DateTime.Now)
- ret = Dd.Show("Set the required date"
, "B4A Date Dialog"
, "Yes"
, "No"
, "Maybe"
, bmp)
- ToastMessageShow(ret & " : "
& Dd.DayOfMonth & "/"
& Dd.Month & "/"
& Dd.Year , False
)
- End
Sub
Note:
Dd - used as our variable for our DateDialog.
Dd.Year = DateTime.GetYear(DateTime.Now) - syntax to get the year that is equivalent to the year now.
Dd.Month = DateTime.GetMonth(DateTime.Now) - syntax to get the month that is equivalent to the month now.
Dd.DayOfMonth = DateTime.GetDayOfMonth(DateTime.Now) - syntax to get the day that is equivalent to what day is now.
ret - used as a variable for our return value.
For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below.
Best Regards,
Engr. Lyndon Bermoy
IT Instructor/System Developer/Android Developer/Freelance Programmer
Mobile: 09488225971
Landline: 826-9296
E-mail:[email protected]
Add and Follow me on Facebook: https://www.facebook.com/donzzsky
Visit and like my page on Facebook at: https://www.facebook.com/BermzISware
Download
You must upgrade your account or reply in the thread to view the hidden content.