![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
With the below code why does the file contents like fine in the explorer (date) only but show a large number when viewed the code way ?
Sub Globals 'Declare the global variables here. regdt=Date(Now) End Sub Sub App_Start Form1.Show reg End Sub Sub reg ErrorLabel(Err1) If FileExist ("c:\windows\colorbn.txt") = true Then FileOpen (c1,"c:\windows\colorbn.txt",cRead) r = FileRead (c1) Do Until r = EOF sum = sum + r r = FileRead (c1) Loop textbox1.Text=sum FileClose (c1) Else regdt=Date(Now) FileOpen (c1,"c:\windows\colorbn.txt",cWrite) FileWrite (c1,regdt) FileClose (c1) End If Goto sbed err1: Msgbox("Error") sbed: End Sub |
|
|||
|
any idea why I getting an error on this code and how to complete it, thanks !!!
Sub Globals 'Declare the global variables here. regdt=Date(Now) rc=0 End Sub Sub App_Start Form1.Show reg End Sub Sub reg Dim regexp ErrorLabel(Err1) If FileExist ("c:\windows\clrbn.txt") = true Then FileOpen (c1,"c:\windows\clrbn.txt",cRead) r = FileRead (c1) FileClose (c1) Else regdt=Date(Now) FileOpen (c1,"c:\windows\clrbn.txt",cWrite) FileWrite (c1,regdt) FileClose (c1) End If textbox1.Text=r ' Displays Registration Date textbox3.text=Date(Now) ' Displays Today Date rd=DateAdd(r, 0, 1, 0)'sets reg duration (Ticks, Years, Months, Days)for one month textbox2.text=rd ' Displays Registration Expires Date dn=Date(Now) If dn > rd Msgbox("Registration Expired, Contact Support for Registered Version, Contact scott93727@aol.com"):rc=1 ' if date now later then regdate by 1 month Goto sed err1: Msgbox("Registration Error, Contact Support, scott93727@aol.com") sed: 'if rc=1 then (Control code (what to disable after reg. expires)) End Sub |
|
||||
|
You have posted this question in a separate thread. In the politest possible way (not easy for me I know
) could I point out that cross-posting is considered bad form in most forums/newgroups.P.S. Your answer is in the other thread ![]() |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tippy v.1.0 [open source] | N1c0_ds | Share Your Creations | 4 | 11-20-2008 10:08 PM |
| Automatically Open Pword With A Word File | sintaq | Questions & Help Needed | 3 | 03-26-2008 03:31 PM |
| Serial Port won't open | djmrozinski | Questions & Help Needed | 6 | 03-16-2008 05:25 PM |
| open a text file with Word | mwaite | Questions & Help Needed | 6 | 06-16-2007 10:03 AM |
| SQLite Open Close - how often? | sloopa | Questions & Help Needed | 3 | 05-01-2007 03:01 PM |