Board Logo
« NOTE-PAD JB 0.74 (UPGRADE) »

Welcome Guest. Please Login or Register.
Jan 16th, 2018, 3:41pm


Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Please use the forums Search feature before asking.
Please post code using the code box described in Format Your Messages.
This will keep indentation, separate it better form the message and prevent gibberish.
If the code is too long for one post or additional files are needed, upload a ZIP archive to the Just BASIC Files Archive Site.

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: NOTE-PAD JB 0.74 (UPGRADE)  (Read 623 times)
atomose
Full Member
ImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 198
xx NOTE-PAD JB 0.74 (UPGRADE)
« Thread started on: Jun 9th, 2016, 05:55am »

a little notepad for fun ^^

Code:
'BlocNote Creat by UnLiMiTeD Corporation 2014-2016
nomainwin
police = 1 : style = 1 : size = 2 : var$ = ""
version = 0.71
WindowWidth = 600 : WindowHeight = 600
UpperLeftX=int((DisplayWidth-WindowWidth)/2)
UpperLeftY=int((DisplayHeight-WindowHeight)/2)
goto [ini]
[new]
var$ = ""
close #bloc
goto [ini]
[iniBIS]
print #bloc.index, "!contents? var$"
vp = val(var$)
close #bloc
if parametres = 1 then
    close #parametre
    openPARAMETRES = 1
end if
parametres = 0
[ini]
gosub [size]
texteditor #bloc.index, 0, 0, WindowWidth-8, WindowHeight-50
menu #bloc, "&Menu", "&Nouveau", [new],"&Ouvrir", [open], "&Sauvegarder", [save], "&A propos", [About], "&Quitter", [close]
menu #bloc, "Paramètres", "Preferences", [parametres]
open "BlocNote ";version for window_nf as #bloc
#bloc, "trapclose [close]"

if police = 1 and style =1 then print #bloc, "font Century Schoolbook 9"
if police = 2 and style =1 then print #bloc, "font Times New Roman 9"
if police = 3 and style =1 then print #bloc, "font ariel 9"
if police = 4 and style =1 then print #bloc, "font Courier_new 9"
if police = 5 and style =1 then print #bloc, "font Comic_Sans_MS 9"

if police = 1 and style =2 then print #bloc, "font Century Schoolbook 9 bold"
if police = 2 and style =2 then print #bloc, "font Times New Roman 9 bold"
if police = 3 and style =2 then print #bloc, "font ariel 9 bold"
if police = 4 and style =2 then print #bloc, "font Courier_new 9 bold"
if police = 5 and style =2 then print #bloc, "font Comic_Sans_MS 9 bold"

if police = 1 and style =3 then print #bloc, "font Century Schoolbook 9 italic"
if police = 2 and style =3 then print #bloc, "font Times New Roman 9 italic"
if police = 3 and style =3 then print #bloc, "font ariel 9 italic"
if police = 4 and style =3 then print #bloc, "font Courier_new 9 italic"
if police = 5 and style =3 then print #bloc, "font Comic_Sans_MS 9 italic"

if police = 1 and style =4 then print #bloc, "font Century Schoolbook 9 underscore"
if police = 2 and style =4 then print #bloc, "font Times New Roman 9 underscore"
if police = 3 and style =4 then print #bloc, "font ariel 9 underscore"
if police = 4 and style =4 then print #bloc, "font Courier_new 9 underscore"
if police = 5 and style =4 then print #bloc, "font Comic_Sans_MS 9 underscore"

if police = 1 and style =5 then print #bloc, "font Century Schoolbook 9 strikeout"
if police = 2 and style =5 then print #bloc, "font Times New Roman 9 strikeout"
if police = 3 and style =5 then print #bloc, "font ariel 9 strikeout"
if police = 4 and style =5 then print #bloc, "font Courier_new 9 strikeout"
if police = 5 and style =5 then print #bloc, "font Comic_Sans_MS 9 strikeout"

'#bloc, "font Comic_Sans_MS 9 "

print #bloc.index ,var$
if openF = 1 then return
if openPARAMETRES = 1 then goto [parametres]
wait

[nf]
wait

[About]
notice " " + chr$(13) + "BlocNote ";version;" [09/06/2016]                                                                               Par UnLiMiTeD Corporation - Production 2014/2016                                 Logiciel gratuit"
wait

[close2]
if parametres = 1 then
    close #parametre
    parametres = 0
end if
wait

[preferences]
print #parametre.pref, "selectionindex? xVar"
police = xVar
goto [iniBIS]

[preferences2]
print #parametre.pref2, "selectionindex? xVar2"
style = xVar2
goto [iniBIS]

[preferences3]
print #parametre.pref3, "selectionindex? xVar3"
color = xVar3
text = 1
gosub [colorTXT]
goto [iniBIS]

[preferences4]
print #parametre.pref4, "selectionindex? xVar4"
color = xVar4
text = 0
gosub [colorTXT]
goto [iniBIS]

[preferences5]
print #parametre.pref5, "selectionindex? xVar5"
size = xVar5
gosub [size]
goto [iniBIS]

[parametres]
if parametres = 1 then
    close #parametre
    parametres = 0
end if
openPARAMETRES = 0
dim preferences1$ (4)
preferences$(0) = "Century Schoolbook"
preferences$(1) = "Times New Roman"
preferences$(2) = "Ariel"
preferences$(3) = "Courier_new"
preferences$(4) = "Comic_Sans_MS"

dim preferences2$ (4)
preferences2$(0) = "Normal"
preferences2$(1) = "Gras"
preferences2$(2) = "Italic"
preferences2$(3) = "Sous-ligné"
preferences2$(4) = "Barré"

dim preferences3$ (16)
preferences3$(1) = "Bleu"
preferences3$(2) = "Cyan"
preferences3$(3) = "Rouge"
preferences3$(4) = "Vert"
preferences3$(5) = "Rose"
preferences3$(6) = "Jaune"
preferences3$(7) = "Maron"
preferences3$(8) = "Blanc"
preferences3$(9) = "Noir"
preferences3$(10) = "Gris foncé"
preferences3$(11) = "Gris clair"
preferences3$(12) = "Rouge foncé"
preferences3$(13) = "Vert foncé"
preferences3$(14) = "Bleu foncé"
preferences3$(15) = "Cyan foncé"
preferences3$(16) = "Rose foncé"

dim preferences4$ (3)
preferences4$(0) = "Petite"
preferences4$(1) = "Moyenne"
preferences4$(2) = "Grande"
preferences4$(3) = "Plein écran"

parametres = 1
WindowWidth = 400 : WindowHeight = 300
UpperLeftX=int((DisplayWidth-WindowWidth)/2)
UpperLeftY=int((DisplayHeight-WindowHeight)/2)
statictext #parametre, "Police d'écriture :", 20, 195, 100, 15
combobox #parametre.pref, preferences$(), [preferences], 20, 220, 150, 50
statictext #parametre, "Style d'écriture :", 220, 195, 100, 15
combobox #parametre.pref2, preferences2$(), [preferences2], 220, 220, 150, 120
statictext #parametre, "Couleur texte :", 20, 15, 100, 15
combobox #parametre.pref3, preferences3$(), [preferences3], 20, 40, 150, 300
statictext #parametre, "Couleur arrière plan :", 20, 80, 100, 15
combobox #parametre.pref4, preferences3$(), [preferences4], 20, 105, 150, 300
statictext #parametre, "Dimension fenêtre", 230, 80, 180, 15
combobox #parametre.pref5, preferences4$(), [preferences5], 230, 105, 150, 50
open "Paramètres" for window_nf as #parametre
#parametre, "trapclose [close2]"
print #parametre, "font Times New Roman 10"
wait

[colorTXT]
select case color
    case 1
        if text = 1 then ForegroundColor$ = "blue"
        if text = 0 then TexteditorColor$ = "blue"
    case 2
        if text = 1 then ForegroundColor$ = "cyan"
        if text = 0 then TexteditorColor$ = "cyan"
    case 3
        if text = 1 then ForegroundColor$ = "red"
        if text = 0 then TexteditorColor$ = "red"
    case 4
        if text = 1 then ForegroundColor$ = "green"
        if text = 0 then TexteditorColor$ = "green"
    case 5
        if text = 1 then ForegroundColor$ = "pink"
        if text = 0 then TexteditorColor$ = "pink"
    case 6
        if text = 1 then ForegroundColor$ = "yellow"
        if text = 0 then TexteditorColor$ = "yellow"
    case 7
        if text = 1 then ForegroundColor$ = "brown"
        if text = 0 then TexteditorColor$ = "brown"
    case 8
        if text = 1 then ForegroundColor$ = "white"
        if text = 0 then TexteditorColor$ = "white"
    case 9
        if text = 1 then ForegroundColor$ = "black"
        if text = 0 then TexteditorColor$ = "black"
    case 10
        if text = 1 then ForegroundColor$ = "darkgray"
        if text = 0 then TexteditorColor$ = "darkgray"
    case 11
        if text = 1 then ForegroundColor$ = "lightgray"
        if text = 0 then TexteditorColor$ = "lightgray"
    case 12
        if text = 1 then ForegroundColor$ = "darkred"
        if text = 0 then TexteditorColor$ = "darkred"
    case 13
        if text = 1 then ForegroundColor$ = "darkgreen"
        if text = 0 then TexteditorColor$ = "darkgreen"
    case 14
        if text = 1 then ForegroundColor$ = "darkblue"
        if text = 0 then TexteditorColor$ = "darkblue"
    case 15
        if text = 1 then ForegroundColor$ = "darkcyan"
        if text = 0 then TexteditorColor$ = "darkcyan"
    case 16
        if text = 1 then ForegroundColor$ = "darkpink"
        if text = 0 then TexteditorColor$ = "darkpink"
end select
return

[size]
select case size
    case 1
        WindowWidth = 300 : WindowHeight = 300
        UpperLeftX=int((DisplayWidth-WindowWidth)/2)
        UpperLeftY=int((DisplayHeight-WindowHeight)/2)
    case 2
        WindowWidth = 600 : WindowHeight = 600
        UpperLeftX=int((DisplayWidth-WindowWidth)/2)
        UpperLeftY=int((DisplayHeight-WindowHeight)/2)
    case 3
        WindowWidth = 900 : WindowHeight = 600
        UpperLeftX=int((DisplayWidth-WindowWidth)/2)
        UpperLeftY=int((DisplayHeight-WindowHeight)/2)
    case 4
        WindowWidth = DisplayWidth : WindowHeight = DisplayHeight
end select
return

[save]
filedialog "Sauvegarder", "*.txt", fname$
if fname$ = "" then wait
print #bloc.index, "!contents? var$"
vp = val(var$)
open "";fname$;".txt" for output as #save
print #save ,var$
close #save
wait

[open]
openF = 1
close #bloc
on error goto [nf]
filedialog "Ouvrir", "*.txt", fname$
open fname$ for input as #1
gosub [ini]
openF = 0
[scan]
    for x = 1 to 100000
        input #1, ligne$
        print #bloc.index, ligne$
        on error goto [close1]
    x = x + 1
    next x
close #1
wait


[close1]
close #1
wait
[close]
close #bloc
if parametres = 1 then close #parametre
end
 
« Last Edit: Jan 3rd, 2018, 3:12pm by atomose » User IP Logged

- Atomose -
Jb 1.01 - LB 4.50

Win10 64bit, 12GB RAM, Gt730 2Go DDR3, 1To 7200t/m, Athlon 5350 4x2.3GHz (laptop)
Win10 64bit, 16 GB RAM, Nvidia 840M 2Go, SSD Samsung EVO 250Go, Intel i7 4510U @2.0-3.1 GHz (netbook)
atomose
Full Member
ImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 198
xx Re: NOTE-PAD JB 0.74 (UPGRADE)
« Reply #1 on: Jan 3rd, 2018, 3:11pm »

Upgrade smiley

DOWNLOAD
User IP Logged

- Atomose -
Jb 1.01 - LB 4.50

Win10 64bit, 12GB RAM, Gt730 2Go DDR3, 1To 7200t/m, Athlon 5350 4x2.3GHz (laptop)
Win10 64bit, 16 GB RAM, Nvidia 840M 2Go, SSD Samsung EVO 250Go, Intel i7 4510U @2.0-3.1 GHz (netbook)
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls