It is currently Wed Jun 19, 2013 2:49 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: A Replacement For DateGadget
PostPosted: Mon Apr 16, 2012 5:50 am 
Offline
User
User

Joined: Mon Nov 03, 2008 8:30 am
Posts: 55
Location: Australia
I found this while searching. Need something other than PB DateGadget and this appears
to be the answer.
Can somebody show me how to GET the displayed date INTO a STRING and how to
SET a date into the display FROM a STRING.

Code:
OpenWindow(0,200,200,200,200,"test",#PB_Window_SystemMenu)
  picker1=CreateWindowEx_(0,"SysDateTimePick32","",#WS_CHILD|#WS_VISIBLE|12+2,10,10,120,25,WindowID(0),0,GetModuleHandle_(0),0)
 
Repeat
  EventID=WaitWindowEvent()
   
Until EventID=#PB_Event_CloseWindow

CloseWindow(0)


Thanks Cressida


Top
 Profile  
 
 Post subject: Re: A Replacement For DateGadget
PostPosted: Mon Apr 16, 2012 6:20 am 
Offline
Addict
Addict

Joined: Sun Apr 12, 2009 6:27 am
Posts: 1506
Code:
OpenWindow(0,200,200,200,200,"test",#PB_Window_SystemMenu)
  picker1=CreateWindowEx_(0,"SysDateTimePick32","",#WS_CHILD|#WS_VISIBLE|12+2,10,10,120,25,WindowID(0),0,GetModuleHandle_(0),0)
  ButtonGadget(0,10,160,60,24,"Get")
  ButtonGadget(1,80,160,60,24,"Set")
 
Repeat
    Select WaitWindowEvent()
        Case #PB_Event_CloseWindow
            Quit = 1
   
   
        Case #PB_Event_Gadget
            Select EventGadget()
                Case 0
                    SendMessage_(picker1,#DTM_GETSYSTEMTIME,0,@d.SYSTEMTIME)
                    Debug "Date  : "+ Str(d\wDay)+" - "+ Str(d\wMonth) + " - " + Str(d\wYear)
                    Debug "Time  : "+ Str(d\wHour) + " - " + Str(d\wMinute) + " - "+ Str(d\wSecond)
                   
                Case 1
                    d\wDay = 10
                    d\wMonth = 2
                    d\wYear = 2010
                    ;d\wHour =
                    ;d\wMinute =
                    ;d\wSecond =
                    SendMessage_(picker1,#DTM_SETSYSTEMTIME,0,@d.SYSTEMTIME)

            EndSelect
    EndSelect
Until Quit = 1


_________________
Egypt my love


Top
 Profile  
 
 Post subject: Re: A Replacement For DateGadget
PostPosted: Tue Apr 17, 2012 8:01 am 
Offline
User
User

Joined: Mon Nov 03, 2008 8:30 am
Posts: 55
Location: Australia
Thanks Rashad.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye