Liberty BASIC Community Forum
« Search Results »

Welcome Guest. Please Login or Register.
May 28th, 2017, 10:56pm


Rules|Home|Help|Search|Recent Posts|Notification

--Liberty BASIC Resources--
Liberty BASIC Community WikiSpace
Frequently Asked Questions
Bay Six Software Forum
Liberty BASIC Home Page
Carl Gundel's Blog
Official Liberty BASIC Support
Liberty BASIC Programmer's Encyclopedia
Liberty BASIC on Rosetta Code

Search Results

Total results: 10


 1   Game and Graphic Programming / Re: OPEN more GUI windows ?  on: Today at 9:14pm
Started by Zabo | Post by Brandon Parker
You can use the same Subroutine to close both windows when you set their TrapClose events as subroutines and use the handle passed to the subroutine to close the window.

This will allow only the window being closed by the user to actually close.

Note that you will need to figure out how/ where to place an "End" command for your entire program so that when the program is complete it ends correctly.

Code:
Open "GUI-Window" For Window As #first
Open "GUI-Window2" For Window As #second
Print #first, "TrapClose Quit"
Print #second , "TrapClose Quit"
Wait

Sub Quit handle$
    Close #handle$
End Sub 


I hope this helps....


{:0)

Brandon
 
  Reply Quote Notify of replies

 2   Liberty BASIC Code / Coding LB-ready DLLs.  on: Today at 8:41pm
Started by raymcal | Post by raymcal
Hi, ok, this is not Liberty BASIC code, I know, but I don't know where to ask it. I wish to learn how to take the C++ I'm learrning and write dlls that I can call from LB. I stated looking over dll sites, and it was all this loadtime and runtime stuff, and I don't know what you want for LB. what I want to use it for is fast drawing of fractals. any ideas of where to go online to learn this? Thanks.
 
  Reply Quote Notify of replies

 3   Announcements, Software and Websites / New Liberty BASIC Videos  on: Today at 7:01pm
Started by CarlGundel | Post by CarlGundel
I have posted a couple of new Liberty BASIC videos on YouTube.

One is on installation and starting Liberty BASIC, and also the registration dialog.

https://youtu.be/EvpU8Li8rYg

The second one is a tour of features, including starting up, running example programs, creating and saving programs, the debugger, and editor preferences.

https://youtu.be/QczH_jJGrPo

Enjoy,

-Carl
 
  Reply Quote Notify of replies

 4   Game and Graphic Programming / Re: OPEN more GUI windows ?  on: Today at 3:20pm
Started by Zabo | Post by Zabo
thanks for attention ,


Code:
 nomainwin
button #win.bttn, "Hello",[hello],UL,10,70
checkbox #win.cbox, "Goodbye",[quit],[quit],10,160,120,24
menu #win, "&Main","&Show",[doShow],_
"&Hide",[doHide],"E&xit",[quit]
open "Show and Hide" for window as #win
wait
[quit] close #win:end



[doShow]
#win.bttn "!Show"
#win.cbox "Show"
wait
[doHide]
#win.bttn "!Hide"
#win.cbox "Hide"
wait
[hello] wait


 

This is the show and hide

========================================

Code:
Rem GUI
 nomainwin
open "GUI-Window" for window as #first
open "GUI-Window2" for window as #second
print #first, "trapclose [quit]"
print #second , "trapclose [quit]"
wait

[quit]
       close #first
       close #second
       end

 





here two mainwin are open. if one is closed the other must be closed too.


Let me explain :

i am working on my database.

1. the main window is open
2. there is a button in the main window which has
a path to a label called [input] for example.
3. if i klick the button , a second main window should be
open too.
4. in the new window are 10 textbox for input seen
5. after the input ans saving the second window will
close and the main window is still there.
____________________________________________

the point is to have textbox for input additional and optional to a opened mainwindow.
not IN the main window.
because the stuff in the main window is enough.

i only have done this with the :
open "mynextWindow" for text as #2
that works but is a GREAT EDITOR. not a plain entry field.

=======================================

thats the point.

and if it is not possible the simplest thing for me is to
close the mainwin1 and start a new mainwin2 on the
same position with the new input handler stuff.

You see the show and hide code here for example.

show and hide i don't want to use in this matter.
it's a little bit confusing and my opinion is to use it
only in special circumstances when the GUI is extremly full. not the case is my database application.


WBR
Zabo



 
  Reply Quote Notify of replies

 5   Game and Graphic Programming / Re: OPEN more GUI windows ?  on: Today at 2:36pm
Started by Zabo | Post by Rod
It is perfectly possible to have many windows of various size open at any one time. Perhaps if you showed us some code we could better understand the difficulty you are having.
 
  Reply Quote Notify of replies

 6   Game and Graphic Programming / Re: OPEN more GUI windows ?  on: Today at 1:51pm
Started by Zabo | Post by BeeTrap
May not be exactly what you want. I don't know whether you are using the "nomainwindow" command or not. Look at Newsletter 128 for files "CMWDemo1.bas" and "CMWDemo2.bas".
 
  Reply Quote Notify of replies

 7   Game and Graphic Programming / OPEN more GUI windows ?  on: Today at 1:04pm
Started by Zabo | Post by Zabo
Hi programmers ,

the main code to open a window is:

open "myWindow" for window as #1

Then the Main Window is open.

If i want to open another MAIN Window that is not possible.
open "mynextWindow" for window as #2

Only ONE main Window could be make !
=======================================

what possible is is that :

open "mynextWindow" for text as #2

then a textbox is opening while the main Window is still
there.
========================================

My question is :

what kind of GUI window could also be open During

the one MAIN Window of the program remains OPEN.


WBR
Zabo


grin
 
  Reply Quote Notify of replies

 8   Database Applications / First GUI for my rapid database is ready !  on: Yesterday at 3:36pm
Started by Zabo | Post by Zabo
Hi ,
i have the first GUI Input Window for my rapid database ready. The user can decide the field names and category name.
The complete program takes a while.

Yes , it works on small screens.

Hope you like it.

ZABO

_____________________________________________


Code:
 
100 Rem database_prototype     HS Soft  Freakman Hans Schueren Germany
200 nomainwin                                'this is the prototype for the INPUT GUI for a new Category by the user
                                                           'before he make a new record in that category.

300 WindowWidth = (DisplayWidth/100) *75
400 WindowHeight = (DisplayHeight/100) *50
500 UpperLeftX = (DisplayWidth/100) *12.5  :  X = WindowWidth/75
600 UpperLeftY = (WindowHeight/100)*12.5 :  Y = WindowHeight/75

700  textbox #first.1, X, Y, 300, 30
710  textbox #first.2, X, Y+30, 300, 30
720  textbox #first.3, X, Y+60, 300, 30
730  textbox #first.4, X, Y+90, 300, 30
740  textbox #first.5, X, Y+120, 300, 30
750  textbox #first.6, X, Y+150, 300, 30
760  textbox #first.7, X, Y+180, 300, 30
770  textbox #first.8, X, Y+210, 300, 30
780  textbox #first.9, X, Y+240, 300, 30
790  textbox #first.10, X, Y+270, 300,30

800  textbox #first.11, X+300, Y, 600, 30
810  textbox #first.12, X+300, Y+30, 600, 30
820  textbox #first.13, X+300, Y+60, 600, 30
830  textbox #first.14, X+300, Y+90, 600, 30
840  textbox #first.15, X+300, Y+120, 600, 30
850  textbox #first.16, X+300, Y+150, 600, 30
860  textbox #first.17, X+300, Y+180, 600, 30
870  textbox #first.18, X+300, Y+210, 600, 30
880  textbox #first.19, X+300, Y+240, 600, 30
890  textbox #first.20, X+300, Y+270, 600,30



895 statictext #first.30, "NEW CATEGORY SETUP !", X*3+230, Y+360, 400, 50

900  button #first.35, "CANCEL AND BACK", [label1], UL, X*2, Y+360, 200, 50
910  button #first.36, "SAVE AND OUT",        [label2], UL, X*3+650,Y+360, 200, 50


998  BackgroundColor$="black"
999   ForegroundColor$ = "red"
1000 open "GUI-Window_75%-of-machinescreensize" for window as #first

1100 print #first.1 , "!font Times_New_Roman 11 , bold"
1110 print #first.2 , "!font Times_New_Roman 11 , bold"
1120 print #first.3 , "!font Times_New_Roman 11 , bold"
1130 print #first.4 , "!font Times_New_Roman 11 , bold"
1140 print #first.5 , "!font Times_New_Roman 11 , bold"
1150 print #first.6 , "!font Times_New_Roman 11 , bold"
1160 print #first.7 , "!font Times_New_Roman 11 , bold"
1170 print #first.8 , "!font Times_New_Roman 11 , bold"
1180 print #first.9 , "!font Times_New_Roman 11 , bold"
1190 print #first.10 ,"!font Times_New_Roman 11 , bold"

1300 print #first.11 , "!font Times_New_Roman 11 , bold" : print #first.11 , "Insert the name for the first field of your new created data category in the left box"
1310 print #first.12 , "!font Times_New_Roman 11 , bold" : print #first.12 , "Insert the name for the second field of your new created data category in the left box"
1320 print #first.13 , "!font Times_New_Roman 11 , bold" : print #first.13 , "Insert the name for the third field of your new created data category in the left box"
1330 print #first.14 , "!font Times_New_Roman 11 , bold" : print #first.14 , "Insert the name for the fourth field of your new created data category in the left box"
1340 print #first.15 , "!font Times_New_Roman 11 , bold" : print #first.15 , "Insert the name for the fifth field of your new created data category in the left box"
1350 print #first.16 , "!font Times_New_Roman 11 , bold" : print #first.16 , "Insert the name for the sixth field of your new created data category in the left box"
1360 print #first.17 , "!font Times_New_Roman 11 , bold" : print #first.17 , "Insert the name for the seventh field of your new created data category in the left box"
1370 print #first.18 , "!font Times_New_Roman 11 , bold" : print #first.18 , "Insert the name for the eigths field of your new created data category in the left box"
1380 print #first.19 , "!font Times_New_Roman 11 , bold" : print #first.19 , "Insert the name for the nineth field of your new created data category in the left box"
1390 print #first.20 , "!font Times_New_Roman 11 , bold"  : print #first.20 , "Insert the name for the tenth field of your new created data category in the left box"

1400 print #first.30, "!font Times_New_Roman 24 , bold"
1500 print #first.35, "!font Times_New_Roman 12 bold"
1600 print #first.36, "!font Times_New_Roman 12 bold"


2000 print #first, "trapclose [quit]"
3000 wait

[quit]
       close #first
       end


[label1]           'label will follow and get back to main GUI
close #first
end



[label2]           'label will follow and will save the data from every field to a string variable and written to a file for recall on every new record which is
                         'written in this new category.
                         'The USER decide what the field names in every category are. 10 altogether for one record.
                         'AND the link to the file Folder for that record ! Unlimited files of every kind can take place in the records folder.
                         '100 categories are possible. individual setted. every category can hold 1000 records.  Means : 100000 records. ha
                         'Sledge Hamme : Trust me.  I know what i am doing !"
close #first
end
    




 
  Reply Quote Notify of replies

 9   Liberty BASIC Code / Reading midi in data stream  on: Yesterday at 10:39am
Started by studioman | Post by Rod
Ok, getting a little better at interpreting the MIM_DATA message. In this message the whole midi status message is packed into a four byte double word returned in dwParam1. dwParam2 contains the microseconds value since the start function was called.


Code:
dwParam1=3624596
mm=dwParam1
if mm>0 then highword=int(mm/65536) else highword=0
lowword=mm-highword*65536
if highword>0 then highwordhighorderbyte=int(highword/256) else highwordhighorderbyte=0
highwordloworderbyte=highword-highwordhighorderbyte*256
if lowword>0 then lowwordhighorderbyte=int(lowword/256) else lowwordhighorderbyte=0
lowwordloworderbyte=lowword-lowwordhighorderbyte*256
print "midi status ";lowwordloworderbyte
print "data 1      ";lowwordhighorderbyte
print "data 2      ";highwordloworderbyte
print "not used    ";highwordhighorderbyte
 

 
  Reply Quote Notify of replies

 10   Liberty BASIC Code / Re: using liberty basic to read sysex midi data  on: Yesterday at 08:51am
Started by studioman | Post by Rod
I got hold of a midi keyboard, I too am getting strange data. But I think it is not strange I just need to interpret it correctly.

It seems to be a MIM_DATA message, much different to midi format messages we have been talking about. it explains where the timing info is coming from.

Quote:
MIM_DATA
963
The MIM_DATA message is sent to a MIDI input callback function when a MIDI message is received by a MIDI input device.

Parameters:

param1
MIDI message that was received. The message is packed into a doubleword value as follows:
High word: High-order byte: Not used. Low-order byte: Contains a second byte of MIDI data (when needed).
Low word: High-order byte: Contains the first byte of MIDI data (when needed). Low-order byte: Contains the MIDI status.
The two MIDI data bytes are optional, depending on the MIDI status byte.
param2
Time that the message was received by the input device driver. The time stamp is specified in milliseconds, beginning at zero when the MIDI_InStart(IntPtr) function was called.

MIDI messages received from a MIDI input port have running status disabled; each message is expanded to include the MIDI status byte.
This message is not sent when a MIDI system-exclusive message is received.
You might used the MidiShortMessage class to construct and or unpack the message into it's components.


Will keep exploring but I don't think it is getting us any nearer to the timing data. Since my dumb keyboard does not output and time info it will be hard to experiment but I do want to get the midi in message interpreted.

The 963 is the number for MIM_DATA message 961 is open message 962 is the close message.

http://www.bass.radio42.com/help/html/7237d143-02f9-cf27-63b2-f9bef9c693a7.htm
 
  Reply Quote Notify of replies


Rules|Home|Help|Search|Recent Posts|Notification



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