[futurebasic] Re: [FB] Last Date Modified

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 1999 : Group Archive : Group : All Groups

From: tedd <tedd@...>
Date: Mon, 3 May 1999 15:53:45 -0400
Jim:

Try this. Make sure that you have a resource file with a "STR#" resource of
128 with one string. It works for me. If you have any problems, I'll send
you my source code. That's the least I could do for such a fine dinner.

tedd

--- code will run "as is" provided a resource file is also provided


RESOURCES "my.rsrc"
COMPILE  0,_dimmedVarsOnly
END GLOBALS

'--------------------------

LOCAL FN buildWind
  WINDOW 1,"test",(0,0)-(300,200),_doczoom
END FN

'--------------------------
LOCAL FN initDate
  DIM tmp$
  DIM hndl&

  tmp$ = DATE$
  hndl& = FN GETRESOURCE (_"STR#",128)            'get the handle for the
resource string
  LONG IF hndl&                                   'do we have a valid handle?
    DEF REMOVESTR (hndl&,1)                       'remove and delete the
original string (number 1)
    DEF APNDSTR (tmp$, hndl&)                     'add and append a new
string in the old string's place
    CALL CHANGEDRESOURCE (hndl&)                  'tell the program that I
have changed the resource (internal flag)
    CALL RELEASERESOURCE (hndl&)                  'release the resource
  END IF
END FN

LOCAL FN checkDate
  DIM a$

  a$ = STR#(128,1)
  PRINT "Date in resources is = ";a$
END FN

'--------------------------

"MAIN"
DIM i
DIM a$
DIM b$
DIM c$

FN buildWind
FN initDate
FN checkDate

INPUT "Enter anything to end";a$

END

___________________________________________________________________
<mailto:tedd@...>	               http://sperling.com/