basicprogramming.org


Welcome, Guest. Please login or register.
Did you miss your activation email?
Forum time; Jul 31. 2010, 05:11
Home Help Search Calendar Login Register
News: Have you got suggestions for BasicProgramming.org? Let's hear them!
Interested in creating your own programming language? Check out the QDepartment group!

+  BASIC programming forum
|-+  Basic Coding
| |-+  Basic Interpreters.
| | |-+  sdlBasic
| | | |-+  Windows Gui example
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Reply Print
Author Topic: Windows Gui example  (Read 120 times)
Arcap94
Newbie
*
Offline Offline

Posts: 12


« on: Feb 19. 2010, 11:51 » Reply with quote

Hi there,

I have another acount on this forum (Arnebcab94) but i forgot the password and the password of my email (new computer--->passwords arent saved anymore)
so i created a new one.Sorry for that.

anyway, I made a small application wich can copy a file to another path. it uses my new WinGui lib i will present later (it isn“t finished yet).
Here is it:
http://www.file-upload.net/download-2279112/guiexamples.rar.html

pls tell me what you think. With it i can make buttons, textfields, radiobuttons, textoutputs etc. really fast. There are more things i want to implement later

EDIT:

heres the code (only app, not lib):
Code:
include "WinGui v0.1.lib"

setdisplay(300,200,32,1)
ink(WinGray)
bar(0,0,400,300)

NewInput(2,150,260,"Path")
NewInput(2,125,260,"File")
NewButton(232,175,60,"Copy",15)
NewButton(5,175,60,"Exit",19)
NewCheckBox(30,107,"Check for errors")
NewLabel(30,20,250,WinGray,"line1")
NewLabel(30,35,250,WinGray,"line2")
NewLabel(30,50,250,WinGray,"line3")

while 1
If ButtonPressed("Exit") then : end : end if

If ButtonPressed("Copy") then
if BChecked("Check for errors") then
SetText("line1","Check if file exists...")
    if fileexists(getinput("File")) then : SetText("line1","Check if file exists...Ok!") : else : SetText("line1","Check if file exists...error!") : end if
    if fileexists(getinput("File")) then : SetText("line1","Check if file exists...Ok!") : else : SetText("line1","Check if file exists...error!") : end if
    SetText("line2","Copying file...")
             end if
             filecopy(getinput("File"),getinput("Path"))
             if BChecked("Check for errors") then
             If fileexists(getinput("Path")) then : SetText("line3","File has successfully been copied") : else : SetText("line3","Error: File couldn`t be copied")  : end if
end if
end if

GetInput("Path")
GetInput("File")
BChecked("Check for errors")
wend

[ekv-edit]addet code tags[/]
« Last Edit: Feb 20. 2010, 07:18 by Arcap94 » Report to moderator   Logged
Derek
Administrator
Hero Member
*****
Offline Offline

Posts: 1001



WWW
« Reply #1 on: Feb 19. 2010, 12:36 » Reply with quote

Hi,

that looks very nice indeed. Thanks for sharing. I'm just a little jealous of what you have achieved. I'm doing something similar for Yabasic but I've not been as productive as this.

Derek.
Report to moderator   Logged

wget http://*
aurelB
Hero Member
*****
Offline Offline

Posts: 663



WWW
« Reply #2 on: Feb 19. 2010, 15:09 » Reply with quote

Looks nice but do you can use native windows fonts (fnt) insted of true type?
This font is not clear type isnt?
However very good Smiley
Report to moderator   Logged

E.K.Virtanen
Blah
Hero Member
*****
Offline Offline

Posts: 2441



WWW
« Reply #3 on: Feb 20. 2010, 06:19 » Reply with quote

Nice piece of code. And welcome on board too  Smiley
Report to moderator   Logged

Arcap94
Newbie
*
Offline Offline

Posts: 12


« Reply #4 on: Feb 20. 2010, 07:19 » Reply with quote

Looks nice but do you can use native windows fonts (fnt) insted of true type?
This font is not clear type isnt?
However very good Smiley

Thanks for the Hint! It looks alot better now.
I updated the top post with the new download link. take a look
Report to moderator   Logged
aurelB
Hero Member
*****
Offline Offline

Posts: 663



WWW
« Reply #5 on: Feb 20. 2010, 11:16 » Reply with quote

Yeah,now looks realy good Wink
without ugly fonts.
Report to moderator   Logged

Pages: [1] Go Up Reply Print 
« previous next »
Jump to:  
Atom RDF RSS 0.91 RSS 2.0


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!