QB64.org Forum

QB64 Team Software => InForm Discussion => Topic started by: FellippeHeitor on May 30, 2018, 02:00:08 pm

Title: InForm Beta 7 is out now
Post by: FellippeHeitor on May 30, 2018, 02:00:08 pm
Update (November 2018): Beta 8 is now available (https://www.qb64.org/forum/index.php?topic=770.0)




InForm for QB64 (http://www.qb64.org/inform) Beta 7 brings a redesigned interface for an enhanced user experience as well as a handful of improvements, new functionality and bug fixes. Check out some of what's new:

(Check out this video to *see* some of what's new: https://www.youtube.com/watch?v=MIKjCM4eNNE (https://www.youtube.com/watch?v=MIKjCM4eNNE))

- Major interface overhaul, with control properties more easily accessible.

- Snap to edges feature improved to have controls detect each other snap by proximity.

- New auto-size feature for labels at design time.

- Right-click a button to "Set as default" so it can be triggered with Enter at runtime.

- New NumericTextBox control to get numeric input from your users without having to worry about validating its contents.

- The mask property can now be set and tested at design time so you can get user input in a specific format.

- Clipboard operations rewritten from the ground up: controls can now be copied, cut and pasted much more reliably. Copied controls now remain in memory even after a form or even InForm itself is closed, so that you can transfer controls between existing files easily.

- New SetFocus to change the focus to another control programmatically.

- InForm now attempts to preserve your existing code when you make edits, which makes it easier than ever to edit existing programs.

- To select multiple controls you can now click them while holding down the Ctrl key. You can now also use Shift to select a range of controls (click the first control, hold shift, then click the last control in the range you'd like to have selected at once).

- Menus items can be set to have a Bullet marker. Groups of menu items (separated by a hyphen) behave just like a group of Radio buttons in a form, allowing you to have options that mutually exclude each other in your menus.

- Right-click the form preview to "Add menu bar control".

- Beta 7 now includes an online updater. Whenever a new version is made available at our server, you will be notified and asked to update; That means that Beta 7 is the last version of InForm you will have to manually download. Auto-updating can be disabled in the Options menu.

Grab the latest version at qb64.org/inform (http://qb64.org/inform)
Title: Re: InForm Beta 7 is out now
Post by: bplus on May 30, 2018, 02:04:47 pm
That is one awesome list of improvements! Got to check it out!
Title: Re: InForm Beta 7 is out now
Post by: _vince on May 30, 2018, 06:23:26 pm
Very nice, one could say Steve-esque
Title: Re: InForm Beta 7 is out now
Post by: bplus on May 31, 2018, 09:40:03 am
Quick question, will InForm Beta 7 require anything newer from QB64 than version 1106, last version before 1.2 switch?
Title: Re: InForm Beta 7 is out now
Post by: FellippeHeitor on May 31, 2018, 09:43:38 am
InForm beta 7 requires QB64 version 1.2

However, the way we were developing QB64 until we changed the version number to 1.2 was by adding new things without changing version numbers until we thought there was enough change to justify the version bump. Now we changed that as we have the stable and development builds you can get at the landing page at www.qb64.org.

You already have 1.2, you're just lazy to download the official update
Title: Re: InForm Beta 7 is out now
Post by: bplus on May 31, 2018, 10:42:59 am
Lazy? yes, I've already confessed... If I weren't, I'd be programming in C or Masm maybe... if I really weren't lazy, maybe even Java, ha!

It is not just a matter of another download of QB64.exe and it's required supplements. It is also a matter of all those dang samples that I already have and have in various stages of change or thrown out because allot don't work. I am lazy because I do not want to keep different sets of samples or attempt to manage them. I also want to keep my own code developed under a version in that time zone. Lazy and not wasteful of space, though I probably have plenty to waste.

Yeah, why not just another QB64 folder? I could just load old files from the other folder... oh wait, that dang old file manager system the IDE uses, I can't see the files in the folders or see the whole path I am using or have used... Oh yeah, and I tried that with Walter's version and first ORG version I downloaded... what a nightmare trying to find something you remember doing in one of those versions.

Talk about lazy, who do I blame for out of date samples?

S'OK though, JB is just as bad about keeping samples current to download version and your Inform is starting to overtake and really outshine their version specially if we can move controls around and save code already written. You are catching up to what VB was doing in 1995. ;-))

Well enough of being lazy and cranky, back to coding...
Title: Re: InForm Beta 7 is out now
Post by: bplus on June 02, 2018, 05:22:37 pm
OK let's see if I can properly distribute my first test code with InForm beta 7.

Just a simple coder and decoder of a short text string.

I had trouble loading another text box with text code/decode from the other textbox*, so I went back, made the form bigger and added labels. The code for the event subs was saved but the code I had copy/pasted before all that was lost.

* Trying to change contents of textbox through code had 2 bad results either the previous text would not clear or the correct text would appear but in faded color?

Append: OK everything worked for me from the downloaded zip folder. Now I have to figure out why I have X's on many of my desktop folders???
Title: Re: InForm Beta 7 is out now
Post by: FellippeHeitor on June 02, 2018, 05:56:21 pm
Good to see you and InForm are getting along, bplus!

InForm attempts to preserve all the code below the line that reads:

Code: QB64: [Select]
  1. ': External modules: ---------------------------------------------------------------
  2.  

Anything above that is prone to be lost in this version, as that's the area where control IDs are initially defined, and that must be rewritten when you overwrite an existing module, as controls will probably have changed names or even have been deleted. Sorry you lost some code, but glad you found your way to get it back (the IDE's Ctrl+Z I assume? Because it goes back even across sections, it has saved me a bunch of times).

The problem you describe with the textboxes sound like a simple solution: you probably changed their Caption() instead of their Text(). These are two separate arrays and the editable text of a textbox is stored in Text(), while Caption() is for other types of controls (like Labels, CheckBoxes, Radio Buttons, MenuItems, etc). For a TextBox control, caption is what's shown when the box is empty, signaling what type of input that box is expecting.
Title: Re: InForm Beta 7 is out now
Post by: FellippeHeitor on June 02, 2018, 05:58:32 pm
What do you mean with "I have X's on many of my desktop folders"?
Title: Re: InForm Beta 7 is out now
Post by: bplus on June 02, 2018, 07:15:04 pm
I mean after a longish session with InForm, I discovered a light gray X on maybe half my desktop Folders when I went to test an extraction of a zip file and running code before trying it over the Internet.

They were in the bottom left corners of the folder and about half their height.

They were all cleared when I turned off and then restarted my laptop, and still are gone.

Maybe I should have taken a snapshot. It was peculiar!

PS I did not notice the external modules line, there was so much to see the first time but I will be looking for it from now on, thanks.

Confirmed: I was changing the Caption property not the Text. It does work as I originally intended. The message goes into the coded box with button press and vice versa. BTW, for some reason I did not think of control(handle) as an array item, I was thinking it was a function for some reason. dah!
Title: Re: InForm Beta 7 is out now
Post by: TempodiBasic on June 02, 2018, 07:54:09 pm
Hi Guys
Fine to meet you here.

I can never  believe  my eyes....in this evening I have read the mind of Bplus.... :-)
What? Why? When? I don't know!
That is what it is happened:
while I'm reading this forum... waiting that the master forum wakes up itself... I have looked at section programs.... so I see evolution of Inform to version 7beta.... well I have said to myself: let's go to see what's news... so I have looked  the  youtube video and I have decided to download this last version of Inform... and to try to do something of simple but interesting like crypting a simple text.
So with so poor efforts I drew the interface of the program and I have had to become familiar with Inform's structure of code and Inform's items....
I find very nice improvements from the last time I used it!

But by the hell!!! I go down to this thread and I find Bplus that already is making a similar program! :-) 
It seems that the Jung's collettive uncounscious is a reality! Or it maybe the telephaty?

Good Coding
And great job Fellippe!
Title: Re: InForm Beta 7 is out now
Post by: FellippeHeitor on June 02, 2018, 08:10:30 pm
Thanks TempodiBasic! I hope you have a good experience with this latest version of InForm.
Please let me know if you need any assistance with it.
Title: Re: InForm Beta 7 is out now
Post by: bplus on June 03, 2018, 10:16:25 am
Hi TempodiBasic,

I was going to say, "Great minds think alike.", but then I wondered from where that expression came.

And found this:
Quote
What it actually means
The original saying is as follows “Great minds think alike, though fools seldom differ.” Unlike the other sayings, this phrase isn’t used to teach a lesson, rather it is a humorous expression. The second half of the expression, “fools seldom differ.” suggests that the people that came to the same conclusion aren’t so smart after all.
https://mystudentvoices.com/4-quotes-that-you-have-been-terribly-misquoting-6b2233d3212d

I have to say, for me, the original saying is "Great minds think alike." since I learned it originally and liked it. I can see why the thing about fools might have been long forgotten (if that truely was the original which I doubt because how can one make a joke about fools with an unknown saying?)

Yikes more useless thoughts, got to respect the fools part. ;-))

I would like to see your program to compare just how close we were thinking (or not thinking).
Title: Re: InForm Beta 7 is out now
Post by: bplus on June 03, 2018, 11:00:11 am
BTW this is why I made the bonehead mistake of trying to modify the caption property in the text box control (see attached wiki snap).

The wiki does not speak of a Text property in the list of editable properties for Textbox and it wasn't listed in the Frm maker either (but I can understand that).

I did see this:
Quote
Var$ = Text(ControlID)
but as I said, I had the impression Text() was a function, not an array.


So, it was a huge hint to me (from very old VB experience) it is not
Control.Property = value in question

but
Property(ControlID) = value in question

So about Control arrays?
VB was Control(Index).Property   (I think)

So InForm is?
Property(ControlID(Index)) ? or no arrays of controls?

BTW, I noticed a VB for DOS reference in the code which I found very interesting.
Title: Re: InForm Beta 7 is out now
Post by: FellippeHeitor on June 03, 2018, 11:40:22 am
There are four arrays you manipulate directly: Text(), Caption(), Mask() and Tooltip().

For all other properties you use the Control() array with the control ID you want to manipulate like:

Code: QB64: [Select]
  1.     Control(TextBox1).Disabled = True

There are no native arrays of controls but there's nothing to stop you from creating one with a group of similar controls you may want to manipulate in a loop for example. Control IDs are of type LONG.

About VBDOS, I included an utility in InForm that will take a legacy VBDOS 1.000 form (provided it was saved as plain text and not binary) and output an InForm native form. Support is limited but some old projects may end up seeing new light with QB64 with less effort by using the converter.
Title: Re: InForm Beta 7 is out now
Post by: TempodiBasic on June 03, 2018, 11:50:19 am
Hi Friends

@Fellippe
sorry I must post this error, an old issue that was present in previous version...(many other issues  are been fixed)
see image Inform7.jpeg


@Bplus
Yes I agree that the great mind is your, mine is just medium...but I can increase it by coding and talking wiht great coders like you, Fellippe, Steve, Pete,   CodeGuy, SkyCharger,.... (oh damn I fall in the error of the list that is always uncomplete...)...
I apologize for all those other QB64 coders, very strong that for my poor memory and lazyness I have put out of this list
Title: Re: InForm Beta 7 is out now
Post by: FellippeHeitor on June 03, 2018, 12:45:35 pm
@Tempo:
It is an old known issue but it's a QB64 issue, not InForm's. I understand that chances of it happening are higher with InForm generated programs because of the minimum of 3 mandatory includes, but it's still an issue of QB64 that we are yet to be able to track down.

@bplus:
I understand you had the feeling that Text() was a function but it's clearly stated to be an array in the wiki, with even a link to a dedicated page explaining its use (https://github.com/FellippeHeitor/InForm/wiki/Text). I hope it's all clear now.
Title: Re: InForm Beta 7 is out now
Post by: bplus on June 03, 2018, 01:21:03 pm
Yes, Fellippe, I guess I missed Text() as an array thing in my first readings...

I do think I over compensated by imaging control.property was gone... too early in morning...

So as far as being clear, ha! but practice does make more perfect... I am glad for your help!

Append: err, ah, control(controlID).property, man half the battle is getting that understood. That, and then realizing Text() is not a property.
Title: Re: InForm Beta 7 is out now
Post by: TempodiBasic on June 03, 2018, 05:30:14 pm
Hi Fellippe
sorry but I think to need help about DropDownlist....
as in wiki  https://github.com/FellippeHeitor/InForm/wiki/Value (https://github.com/FellippeHeitor/InForm/wiki/Value) value brings the index of the item selected....but
when I click on a Dropdownlist I am NOT able to get the value (index) of the item leftclicked on...
here my code_example
Code: QB64: [Select]
  1. ': This program uses
  2. ': InForm - GUI library for QB64 - Beta version 7
  3. ': Fellippe Heitor, 2016-2018 - fellippe@qb64.org - @fellippeheitor
  4. ': https://github.com/FellippeHeitor/InForm
  5. '-----------------------------------------------------------
  6.  
  7. ': Controls' IDs: ------------------------------------------------------------------
  8. DIM SHARED coccoprova AS LONG
  9. DIM SHARED DropdownList1 AS LONG
  10. DIM SHARED DropdownList2 AS LONG
  11.  
  12. ': External modules: ---------------------------------------------------------------
  13. '$INCLUDE:'InForm\InForm.ui'
  14. '$INCLUDE:'InForm\xp.uitheme'
  15. '$INCLUDE:'coccoprova.frm'
  16.  
  17. ': Event procedures: ---------------------------------------------------------------
  18. SUB __UI_BeforeInit
  19.  
  20.  
  21. SUB __UI_OnLoad
  22.     '
  23.     AddItem DropdownList1, "Traslation simple fixed" 'a->d = a+3, b->e = b+3, c->f = c+3...z->c z+3-(maxletters=26)
  24.     AddItem DropdownList1, "Traslation simple progressive" 'a->d = a+3, b->f = b+4, c->h = c+5...z->c z+29-(maxletters=26)
  25.     AddItem DropdownList1, "Traslation alternate fixed" 'a->d = a+3, b->f = b+4, c->f = c+3,d->h= d+4...z->d z+4-(maxletters=26)
  26.     AddItem DropdownList1, "Traslation alternate progressive" 'a->d = a+3, b->f = b+4, c->f = c+3, d->i = i+5...z->d z+13-(maxletters=26)
  27.     AddItem DropdownList1, "Traslation bidirectional fixed" ' a->d = a+3, b->y = b-3+26, c->f = c+3,d->a= d-3....z->w= z-3
  28.  
  29.     '
  30.     AddItem DropdownList2, "Traslation simple fixed" 'a->d = a+3, b->e = b+3, c->f = c+3...z->c z+3-(maxletters=26)
  31.     AddItem DropdownList2, "Traslation simple progressive" 'a->d = a+3, b->f = b+4, c->h = c+5...z->c z+29-(maxletters=26)
  32.     AddItem DropdownList2, "Traslation alternate fixed" 'a->d = a+3, b->f = b+4, c->f = c+3,d->h= d+4...z->d z+4-(maxletters=26)
  33.     AddItem DropdownList2, "Traslation alternate progressive" 'a->d = a+3, b->f = b+4, c->f = c+3, d->i = i+5...z->d z+13-(maxletters=26)
  34.     AddItem DropdownList2, "Traslation bidirectional fixed" ' a->d = a+3, b->y = b-3+26, c->f = c+3,d->a= d-3....z->w= z-3
  35.  
  36.  
  37. SUB __UI_BeforeUpdateDisplay
  38.     'This event occurs at approximately 30 frames per second.
  39.     'You can change the update frequency by calling SetFrameRate DesiredRate%
  40.  
  41.  
  42. SUB __UI_BeforeUnload
  43.     'If you set __UI_UnloadSignal = False here you can
  44.     'cancel the user's request to close.
  45.  
  46.  
  47. SUB __UI_Click (id AS LONG)
  48.     SELECT CASE id
  49.         CASE coccoprova
  50.  
  51.         CASE DropdownList1
  52.             Caption(coccoprova) = STR$(value(DropdownList1)) + "-1"
  53.         CASE DropdownList2
  54.             Caption(coccoprova) = STR$(value(DropdownList2)) + " -2"
  55.     END SELECT
  56.  
  57. SUB __UI_MouseEnter (id AS LONG)
  58.     SELECT CASE id
  59.         CASE coccoprova
  60.  
  61.         CASE DropdownList1
  62.  
  63.         CASE DropdownList2
  64.  
  65.     END SELECT
  66.  
  67. SUB __UI_MouseLeave (id AS LONG)
  68.     SELECT CASE id
  69.         CASE coccoprova
  70.  
  71.         CASE DropdownList1
  72.  
  73.         CASE DropdownList2
  74.  
  75.     END SELECT
  76.  
  77. SUB __UI_FocusIn (id AS LONG)
  78.     SELECT CASE id
  79.         CASE DropdownList1
  80.  
  81.         CASE DropdownList2
  82.  
  83.     END SELECT
  84.  
  85. SUB __UI_FocusOut (id AS LONG)
  86.     'This event occurs right before a control loses focus.
  87.     'To prevent a control from losing focus, set __UI_KeepFocus = True below.
  88.     SELECT CASE id
  89.         CASE DropdownList1
  90.  
  91.         CASE DropdownList2
  92.  
  93.     END SELECT
  94.  
  95. SUB __UI_MouseDown (id AS LONG)
  96.     SELECT CASE id
  97.         CASE coccoprova
  98.  
  99.         CASE DropdownList1
  100.  
  101.         CASE DropdownList2
  102.  
  103.     END SELECT
  104.  
  105. SUB __UI_MouseUp (id AS LONG)
  106.     SELECT CASE id
  107.         CASE coccoprova
  108.  
  109.         CASE DropdownList1
  110.  
  111.         CASE DropdownList2
  112.  
  113.     END SELECT
  114.  
  115. SUB __UI_KeyPress (id AS LONG)
  116.     'When this event is fired, __UI_KeyHit will contain the code of the key hit.
  117.     'You can change it and even cancel it by making it = 0
  118.     SELECT CASE id
  119.         CASE DropdownList1
  120.  
  121.         CASE DropdownList2
  122.  
  123.     END SELECT
  124.  
  125. SUB __UI_TextChanged (id AS LONG)
  126.     SELECT CASE id
  127.     END SELECT
  128.  
  129. SUB __UI_ValueChanged (id AS LONG)
  130.     SELECT CASE id
  131.         CASE DropdownList1
  132.  
  133.         CASE DropdownList2
  134.  
  135.     END SELECT
  136.  
  137. SUB __UI_FormResized
  138.  
  139.  

and .FRM file
Code: QB64: [Select]
  1. ': This form was generated by
  2. ': InForm - GUI library for QB64 - Beta version 7
  3. ': Fellippe Heitor, 2016-2018 - fellippe@qb64.org - @fellippeheitor
  4. ': https://github.com/FellippeHeitor/InForm
  5. '-----------------------------------------------------------
  6. SUB __UI_LoadForm
  7.  
  8.     DIM __UI_NewID AS LONG
  9.  
  10.     __UI_NewID = __UI_NewControl(__UI_Type_Form, "coccoprova", 300, 300, 0, 0, 0)
  11.     SetCaption __UI_NewID, "coccoprova"
  12.     Control(__UI_NewID).Stretch = False
  13.     Control(__UI_NewID).Font = SetFont("segoeui.ttf", 12)
  14.  
  15.     __UI_NewID = __UI_NewControl(__UI_Type_DropdownList, "DropdownList1", 200, 23, 50, 138, 0)
  16.     AddItem __UI_NewID, "coccobello"
  17.     Control(__UI_NewID).Stretch = False
  18.     Control(__UI_NewID).HasBorder = True
  19.     Control(__UI_NewID).CanHaveFocus = True
  20.  
  21.     __UI_NewID = __UI_NewControl(__UI_Type_DropdownList, "DropdownList2", 200, 23, 50, 191, 0)
  22.     Control(__UI_NewID).Stretch = False
  23.     Control(__UI_NewID).HasBorder = True
  24.     Control(__UI_NewID).CanHaveFocus = True
  25.  
  26.  
  27. SUB __UI_AssignIDs
  28.     coccoprova = __UI_GetID("coccoprova")
  29.     DropdownList1 = __UI_GetID("DropdownList1")
  30.     DropdownList2 = __UI_GetID("DropdownList2")
  31.  

I think you needn't  the other two files:
'$INCLUDE:'InForm\InForm.ui'
'$INCLUDE:'InForm\xp.uitheme'.

Thank's for Inform and for your help

Title: Re: InForm Beta 7 is out now
Post by: FellippeHeitor on June 03, 2018, 06:12:52 pm
@Tempo:

If you want to know which item index was selected by the user:

    theItem% = Control(DropdownList1).Value

It you want to know the contents/text of the item selected:

    theItem$ = GetItem(DropdownList1, thisItem%)

Also, the best place for that would be the ValueChanged event instead of the Click event, but that's up to you.

Let me know how it goes.
Title: Re: InForm Beta 7 is out now
Post by: bplus on June 03, 2018, 07:20:21 pm
Hi Fellippe,

I started planning a less trivial app that requires one giant picture box 1200 x 700 and a number of controls: buttons, frames with radio buttons... on the right side of the screen. Is there a way to access the right side of the form to drag and drop controls and move them around? It seems the Frm window is stuck always to the right of the properties window.
Title: Re: InForm Beta 7 is out now
Post by: FellippeHeitor on June 03, 2018, 07:25:52 pm
In the View menu -> untick "Keep preview window attached".
Title: Re: InForm Beta 7 is out now
Post by: bplus on June 04, 2018, 02:30:00 am
Thanks, I have program worked out where everything should go.
Title: Re: InForm Beta 7 is out now
Post by: bplus on June 07, 2018, 01:00:15 pm
Here is some more testing / experimenting / demonstrating with InForm:

+ My first interest was to test the new undocumented MessageBox&() function, so I have notes included with code for copy/paste or reference later on in convenient place. While testing this function, I became curious how to get a really long title to display. I found an answer!

+ I also wanted to do more testing with the __UI_KEYHIT values being returned and make a handy utility for those numbers. So in this code I used code I found in Wiki under _KEYHIT and added modification of that to message box messages when you hit a key or key combination.

+ I also want to help Fellippe promote this marvelous effort, because I think it is an important step forward with QB and I think it should be supported with interest and questions and practice using.

Snips of important parts:
Code: QB64: [Select]
  1. 'Key_Message.bas for QB64 v1.1(last before number change to 1.2) B+ 2018-06-07
  2.  
  3. 'testing:
  4. ' 1. Message box - and how to get a really long title to show completely?
  5. '    answer: a really long string in message string that word wrap can't split!
  6. ' 2. SETFOCUS demo how it works and allows key presses to be acknowldeged (only my left hand is dyslexic!)
  7. '    maybe it is better used in repaint er ah,  BeforeUpdateDisplay event
  8. '    by setting focus on a control once on OnLoad event
  9. ' 3. What are the __UI_KeyHit values  being returned?
  10. '    Are they the same as code found under _KEYHIT at Wiki?
  11.  

This starts key press messages from get go but, if you take focus off button, you need to click it again (or just mouse over it).
Code: QB64: [Select]
  1. SUB __UI_OnLoad
  2.     SetFocus Button1
  3.  

And this is main event, so to speak:
Code: QB64: [Select]
  1. SUB __UI_KeyPress (id AS LONG)
  2.     'When this event is fired, __UI_KeyHit will contain the code of the key hit.
  3.     'You can change it and even cancel it by making it = 0
  4.  
  5.  
  6.     'test the not yet documented messageBox&
  7.     ' FUNCTION MessageBox& (Message$, Title$, Setup AS LONG)
  8.     'You can change it and even cancel it by making it = 0 <<<<<<<<<< oops ignore this repeated line from above
  9.  
  10.     'Setup is a combination (button + icon) of:
  11.     'Buttons, which can be MsgBox_OkOnly, MsgBox_OkCancel, MsgBox_AbortRetryIgnore, MsgBox_YesNoCancel,
  12.     'MsgBox_YesNo, MsgBox_RetryCancel, MsgBox_CancelTryagainContinue, MsgBox_CancelTryagainContinue.
  13.  
  14.     'Icons, which can be MsgBox_Critical, MsgBox_Question, MsgBox_Exclamation, MsgBox_Information
  15.  
  16.     'The possible return values are: MsgBox_Ok, MsgBox_Cancel, MsgBox_Abort, MsgBox_Retry, MsgBox_Ignore,
  17.     ' MsgBox_Yes, MsgBox_No, MsgBox_Tryagain, MsgBox_Continue.
  18.     DIM x AS LONG
  19.     x = __UI_KeyHit
  20.     m$ = STR$(x) + " = __UI_KeyHit Value," + CHR$(10) + "_KEYHIT Code from wiki came up with this:" + CHR$(10)
  21.  
  22.     '====   reference: https://www.qb64.org/wiki/KEYHIT
  23.     IF x < 0 THEN 'negative value means key released
  24.         m$ = m$ + "Released "
  25.         x = -x
  26.     ELSE
  27.         m$ = m$ + "Pressed " 'positive value means key pressed
  28.     END IF
  29.     IF x < 256 THEN 'ASCII code values
  30.         m$ = m$ + "ASCII" + STR$(x) + " "
  31.         IF x >= 32 AND x <= 255 THEN m$ = m$ + " [" + CHR$(x) + "] "
  32.     END IF
  33.     IF x >= 256 AND x < 65536 THEN '2 byte key codes
  34.         m$ = m$ + "2-BYTE-COMBO" + STR$(x AND 255) + " " + STR$(x \ 256) + " "
  35.         x2 = x \ 256
  36.         IF x2 >= 32 AND x2 <= 255 THEN m$ = m$ + " [" + CHR$(x2) + "] "
  37.     END IF
  38.  
  39.     'this helpful?  I can't get a small b difference with a B
  40.     IF x >= 100000 AND x < 200000 THEN 'QB84 Virtual Key codes
  41.         m$ = m$ + "SDL VK" + STR$(x - 100000) + " "
  42.     END IF
  43.     IF x >= 200000 AND x < &H40000000 THEN
  44.         m$ = m$ + "QB64 VK" + STR$(x - 200000) + " "
  45.     END IF
  46.     IF x >= &H40000000 THEN 'Unicode values (IME Input mode)
  47.         m$ = m$ + "UNICODE" + STR$(x - &H40000000) + " 0x" + HEX$(x - &H40000000) + " ..."
  48.     END IF
  49.  
  50.     'OK simple message box, also testing how to display a really long title in message box
  51.     ans& = MessageBox&(m$ + CHR$(10) + STRING$(150, "+"), "Testing __UI_KeyHit and message box and Wiki code for _KEYHIT.", MsgBox_OkCancel)
  52.     IF ans& = MsgBox_Ok THEN
  53.         'OK then
  54.     ELSE
  55.         END
  56.     END IF
  57.  
  58.     SELECT CASE id
  59.         CASE Button1
  60.  
  61.     END SELECT
  62.  

I was not expecting so many responses from one key press or key combo.

I am concerned about getting a capital B distinguished from a little b and similar combinations of keys eg Ctrl, Alt as well as Shift.

BTW, in this test program, if you click Cancel in the MessageBox, you will end the program.
Title: Re: InForm Beta 7 is out now
Post by: TempodiBasic on June 09, 2018, 10:08:41 am
Hi Fellippe
you are always very gentle...

yes I must miss the wikipage where I can get this manner to access to index value....

"  theItem% = Control(DropdownList1).Value"  while I have been able to capture the second formula that you have posted....

Following your suggestions about DropDownlList .... how can I get the value of this object in ValueChanged event?
The code example, posted by me, uses the click event only to get a fast feedback on caption of the form.
As you can see in code I have missed the way to access to value because I have imaged that it (property value) was like property text() and I am able to access to it directly as an array.
But that thought is wrong! Now, thank's to you I know how access to value of DropDownList.

As soon as I'll post the Inform version of a simple CryptoProgram

Thank's for help and for Inform
Title: Re: InForm Beta 7 is out now
Post by: FellippeHeitor on June 10, 2018, 11:04:45 am
Just move the code you wrote in the Click event to the ValueChanged event. Because a user may click a list box but not change its contents, the ValueChanged event is more suitable as it will only be triggered when a new item is actually selected, so that makes more sense in your case.
Title: Re: InForm Beta 7 is out now
Post by: TempodiBasic on June 14, 2018, 05:42:35 pm
Thank's Fellippe

I agree  and as soon as I'll post the new educational program that I have coded in Inform version....
for now in another thread I post the ASCII version

Thank's
Title: Re: InForm Beta 7 is out now
Post by: TempodiBasic on June 17, 2018, 09:35:50 am
Hi Fellippe

1. I need help:
label has an autosize property?
On run, changing the caption of a label
both directly using Caption(MyLabelLB)= "MyString"
both using SetCaption MyLabelLB, "MyString"
the label doesn't contain all the new string.

It is possible to do this in InForm?

2. Feedback on WIKI of Inform....
the link to WordWrap in this page https://github.com/FellippeHeitor/InForm/wiki/Label (https://github.com/FellippeHeitor/InForm/wiki/Label) bring me to the main page of wiki of Inform and not to the page "https://github.com/FellippeHeitor/InForm/wiki/WordWrap" that is pointed by the link

Thank's
Title: Re: InForm Beta 7 is out now
Post by: FellippeHeitor on June 17, 2018, 09:44:16 am
1. Labels will only autosize at design time (a feature I added after your request), but not at run time. I recommend that you make them big enough so that no text will be clipped. Or even better, make it not only long, but also tall, and set the .WordWrap feature to True.

2. You'll notice that the link to the WordWrap page is colored red for now, which means I didn't write that page yet. Thanks for reporting. I will be updating the wiki soon after your feedback (and also bplus's feedback).

Is this the text encoder you're writing?
Title: Re: InForm Beta 7 is out now
Post by: TempodiBasic on June 17, 2018, 09:57:06 am
Hi Fellippe
Thank's for answers...
I have tried also to setting to true the property WordWrap, Multiline and CanResize....
Code: QB64: [Select]
  1.     ' enlarging label of results
  2.     Control(MessageAtStartAsWrittenByUserLB).WordWrap = True
  3.     Control(MessageAtStartAsWrittenByUserLB).Multiline = True
  4.     Control(MessageAtStartAsWrittenByUserLB).CanResize = True
  5.  
  6.     Control(EncryptedMessageLB).WordWrap = True
  7.     Control(EncryptedMessageLB).CanResize = True
  8.     Control(EncryptedMessageLB).Multiline = True
  9.  
  10.     Control(DecryptedMessageLB).WordWrap = True
  11.     Control(DecryptedMessageLB).Multiline = True
  12.     Control(DecryptedMessageLB).CanResize = True
  13.  
but as you already knows it is unuseful.... OK I must program a good space/size of Label that I use for output at design time....
Thank's again

Yes I'm porting in  Inform the core of encrypt/decrypt ver 0.2 but I'm still learning to use with most efficacy Inform!
Thank's for this wonderful tool
Title: Re: InForm Beta 7 is out now
Post by: FellippeHeitor on June 17, 2018, 10:27:18 am
The Multiline property has not been implemented yet (and is only for TextBox controls, not labels) and the CanResize property is for the main form only. Go with WordWrap and a big label and you'll be just fine.

Quote
Thank's for this wonderful tool
I thank you for your interest and kind words! Looking forward to ver 0.2 of your encrypt tool.

Let me know what else you need assistance with, I'll be around all day :-)
Title: Re: InForm Beta 7 is out now
Post by: TempodiBasic on June 17, 2018, 07:27:07 pm
Yes Fellippe
 I'm glad to say that I post the InForm version of Encrypt/Decrypt
open to get suggestions and feedback
Title: Re: InForm Beta 7 is out now
Post by: TempodiBasic on June 20, 2018, 09:30:15 am
Hi Fellippe

just some help for me, please:

1. can I use multiple form in a program created by Inform?
  1.1 If yes there is a code sample to look at?
   1.2 If no can I hide disabled_other_items_grouped_for_window and show/hide different groups in the same form?

2.  How many items can I use in a project of Inform? (max number?)

3. Can modify aspect (size, position, backcolor etc etc) of  Window/Form at runtime?
   3.1 If yes are the effects at once or must I force by  _display?

4. If I create 3 forms with Inform, each at one time, then can I use them in the same code?
   4.1 Can I chain the 3 different forms?

For now these questions are just enough....
Thanks
Title: Re: InForm Beta 7 is out now
Post by: FellippeHeitor on June 20, 2018, 10:27:58 am
Hi TempodiBasic. For each point:

1. not yet;
    1.1 not yet;
    1.2 yes; InForm's editor uses that trick. When you click File->Open or Edit->Z-ordering, the new "dialog" is achieved by showing a frame that covers all the screen. That frame is hidden at -600, -600 during program execution and is only shown when requested. You can inspect UiEditor.bas to see how I did it. Look for "OpenFrame" and "ZOrdering" in the code.

2. I haven't tried pushing it to a limit yet. There are no constraints in code and you can probably have as many items as your system's memory allows. If you do hit a limit, please let me know.

3. Yes.
    3.1 No. You should never call _DISPLAY as InForm is already doing that at a regular interval. If some change doesn't show immediately, you must request a full redraw by setting __UI_ForceRedraw = True (global redraw) or by setting Control(ControlID).Redraw = True (per control) when needed.

4. Not yet, but that's planned (issue #20 at https://github.com/FellippeHeitor/InForm/milestone/3)
    4.1 not yet (see above).
Title: Re: InForm Beta 7 is out now
Post by: TempodiBasic on June 21, 2018, 01:27:28 pm
Hi Fellippe

Thanks for further specific information about Inform 7 Beta

I find very good (and master's tricky ;-) )  to take off screen items not used at the place of disable it , hide it , activate it,  show it every time you must use!

About point 2 I have had an idea_program that will do a good test about amout of Item_Ram used!

See again
Title: Re: InForm Beta 7 is out now
Post by: Unseen Machine on June 21, 2018, 09:09:25 pm
does it support GL windows yet?

Unseen
Title: Re: InForm Beta 7 is out now
Post by: FellippeHeitor on June 21, 2018, 10:36:48 pm
It will when qb64 does, so not yet.
Title: Re: InForm Beta 7 is out now
Post by: Unseen Machine on June 22, 2018, 07:03:49 pm
But i hacked one of your old versions of Inform to support GL windows remember!?

Unseen
Title: Re: InForm Beta 7 is out now
Post by: FellippeHeitor on June 22, 2018, 07:41:12 pm
Ah, you mean being able to use use SUB _GL de with InForm dialogs. Yeah, but it ended up interfering with some other routines I had to add, so I dropped it for the time being.

I thought you were talking about using multiple opengl windows, like multiple SCREENs.
Title: Re: InForm Beta 7 is out now
Post by: Unseen Machine on June 23, 2018, 06:05:59 pm
Lol, glad i cleared that up! And Qb64 does actually support multiple open gl windows if you use my SFML library, i made that allow you to use upto 5 screens!

Still, good work on the project mate! kudos!

Unseen
Title: Re: InForm Beta 7 is out now
Post by: FellippeHeitor on June 23, 2018, 06:21:29 pm
Where’s that SFML library again, btw?
Title: Re: InForm Beta 7 is out now
Post by: Unseen Machine on June 23, 2018, 06:35:33 pm
[abandoned, outdated and now likely malicious qb64 dot net website - don’t go there]! Which is down!

C++ Code, i cant find the DECLARE LIBRARY bit yet!!!

This is for SFML 1.6

Code: QB64: [Select]
  1. //SFML Wrapper for QB64 v.02 - By John Onyon a.k.a Unseen Machine
  2.  
  3. #include <SFML/Graphics.hpp>
  4. #include <SFML/Window.hpp>
  5. #include <SFML/Audio.hpp>
  6. #include <SFML/System.hpp>
  7.  
  8. sf::RenderWindow App;
  9. sf::Color BackgroundColor = sf::Color(0,0,0,255);
  10. sf::Color PaintColor = sf::Color(255,255,255,255);
  11. sf::SoundBufferRecorder Recorder;
  12. sf::SoundBuffer SndBuffer;
  13. sf::Sound Snd;
  14. sf::Font MyFont;
  15. sf::String Txt;
  16. sf::Shape Pixel;
  17.  
  18.  
  19. void SF_Screen_New(int width, int height, const char* title)
  20. {
  21.     App.Create(sf::VideoMode(width, height, 32), title);
  22.     App.PreserveOpenGLStates(true);
  23. }
  24.  
  25. void SF_Screen_Set_XY(int x, int y)
  26. {
  27.     App.SetPosition(x,y);
  28. }
  29.  
  30.  
  31. int SF_Screen_Exit()
  32. {
  33.     sf::Event Event;
  34.     while (App.GetEvent(Event))
  35.     {
  36.         if (Event.Type == sf::Event::Closed)
  37.         return(-1);
  38.     }
  39. }
  40.  
  41. void SF_Screen_Set_Size(int32 Width, int32 Height)
  42. {
  43.     App.SetSize(Width,Height);
  44. }
  45.  
  46.  
  47. void SF_Screen_Hide()
  48. {
  49.     App.Show(0);
  50. }
  51.  
  52.  
  53. void SF_Screen_Show()
  54. {
  55.     App.Show(-1);
  56. }
  57.  
  58.  
  59. void SF_Screen_Set_Active()
  60. {
  61.     App.SetActive();
  62. }
  63.  
  64.  
  65. void SF_Screen_CLS()
  66. {
  67.     App.Clear(BackgroundColor);
  68. }
  69.  
  70.  
  71. void SF_Screen_Set_MAXFPS(int32 fps)
  72. {
  73.     App.SetFramerateLimit(fps);
  74. }
  75.  
  76.  
  77. void SF_Screen_Close()
  78. {
  79.     App.Close();
  80. }
  81.  
  82.  
  83. void SF_Screen_Set_Width(int Width)
  84. {
  85.     int x = App.GetHeight();
  86.     App.SetSize(Width,x);  
  87. }
  88.  
  89.  
  90. int SF_Screen_Get_Width()
  91. {
  92.     return(App.GetWidth());
  93. }
  94.  
  95.  
  96. void SF_Screen_Set_Height(int Height)
  97. {
  98.     int x = App.GetWidth();
  99.     App.SetSize(x,Height);  
  100. }
  101.  
  102.  
  103. int SF_Screen_Get_Height()
  104. {
  105.     return(App.GetHeight());
  106. }
  107.  
  108.  
  109. void SF_Screen_Display()
  110. {
  111.     App.Display();
  112. }
  113.  
  114.  
  115. void SF_Screen_Set_Color(int r, int g, int b, int a)
  116. {
  117.     sf::Color col = sf::Color(r,g,b,a);
  118.     BackgroundColor = col;
  119. }
  120.  
  121.  
  122. // MOUSE
  123.  
  124. unsigned int SF_Mouse_Get_X()
  125. {
  126.     const sf::Input& Input = App.GetInput();
  127.     return(Input.GetMouseX());
  128. }
  129.  
  130. unsigned int SF_Mouse_Get_Y()
  131. {
  132.     const sf::Input& Input = App.GetInput();
  133.     return(Input.GetMouseY());
  134. }
  135.  
  136. unsigned int SF_Mouse_Get_LB()
  137. {
  138.     const sf::Input& Input = App.GetInput();
  139.     return(-Input.IsMouseButtonDown(sf::Mouse::Left));
  140. }
  141.  
  142. unsigned int SF_Mouse_Get_RB()
  143. {
  144.     const sf::Input& Input = App.GetInput();
  145.     return(-Input.IsMouseButtonDown(sf::Mouse::Right));
  146. }
  147.  
  148. void SF_Mouse_Set_XY(int x, int y)
  149. {
  150.     App.SetCursorPosition(x,y);
  151. }
  152.  
  153. void SF_Mouse_Hide()
  154. {
  155.     App.ShowMouseCursor(0);
  156. }
  157.  
  158.  
  159. void SF_Mouse_Show()
  160. {
  161.     App.ShowMouseCursor(1);
  162. }
  163.  
  164.  
  165. //Font and Text
  166.  
  167. void SF_Font_Load(const char* Filename, int res)
  168. {
  169.     MyFont.LoadFromFile(Filename, res);  
  170. }
  171.  
  172. void SF_Text_Print (int x, int y, const char* Text, int size)
  173. {
  174.     Txt.SetText(Text);
  175.     Txt.SetFont(MyFont);
  176.     Txt.SetSize(size);
  177.     Txt.SetX(x);
  178.     Txt.SetY(y);
  179.     App.Draw(Txt);
  180. }
  181.  
  182. void SF_Text_Set_Color (int r, int g, int b, int a)
  183. {
  184.     sf::Color col = sf::Color(r,g,b,a);
  185.     Txt.SetColor(col);
  186. }
  187.  
  188. void SF_Text_Set_Rotation(float Rot)
  189. {
  190.     Txt.SetRotation(Rot);  
  191. }
  192.  
  193. void SF_Text_Set_Center(float x, float y)
  194. {
  195.     Txt.SetCenter(x,y);
  196. }
  197.  
  198.  
  199. void SF_Mic_Get_Input(int SampleRate)
  200. {
  201.     Recorder.Start(SampleRate);    
  202. }
  203.  
  204. void SF_Mic_Stop_Input()
  205. {
  206.     Recorder.Stop();
  207. }
  208.  
  209. void SF_Mic_Play()
  210. {
  211.     const sf::SoundBuffer& Buffer = Recorder.GetBuffer();
  212.     sf::Sound Sound(Buffer);
  213.     Sound.Play();
  214.     while (Sound.GetStatus() == sf::Sound::Playing){}
  215. }
  216.  
  217. void SF_Mic_Save(const char* FileName)
  218. {
  219.     const sf::SoundBuffer& Buffer = Recorder.GetBuffer();
  220.     sf::Sound Sound(Buffer);
  221.     Buffer.SaveToFile(FileName);
  222. }
  223.  
  224. int SF_Sound_Buffer_Load_FromFile(const char* FileName1)
  225. {
  226.     if (SndBuffer.LoadFromFile(FileName1))
  227.             return(-1);
  228. }
  229.  
  230.  
  231. void SF_Sound_Buffer_Play()
  232. {
  233.     Snd.SetBuffer(SndBuffer);
  234.     Snd.Play();
  235. }
  236.  
  237.  
  238. int SF_Sound_Buffer_Get_SampleCount()
  239. {
  240.     return(SndBuffer.GetSamplesCount());
  241. }
  242.  
  243.  
  244. int SF_Sound_Buffer_Get_SampleRate()
  245. {
  246.     return(SndBuffer.GetSampleRate());
  247. }
  248.  
  249. bool SF_Sound_Buffer_Save(const char* FileName)
  250. {
  251.     return(SndBuffer.SaveToFile(FileName));
  252. }
  253.  
  254. void SF_Sound_Buffer_Load_SNDRAW(const sf::Int16* RawSnd)
  255. {
  256.     RawSnd = SndBuffer.GetSamples();
  257. }
  258.  
  259. // 2d drawing functions
  260. void SF_Paint_Set_Color(int r, int g, int b, int a)
  261. {
  262.     PaintColor = sf::Color(r, g, b, a);
  263. }
  264.  
  265. void SF_Pixel_Set(int x, int y)
  266. {
  267.     Pixel = sf::Shape::Rectangle(x, y, x+1, y+1, PaintColor);
  268.     App.Draw(Pixel);
  269. }
  270.  
  271. void SF_Circle(int x, int y, int Radius)
  272. {
  273.     Pixel = sf::Shape::Circle(x, y, Radius, PaintColor);
  274.     Pixel.EnableFill(true);
  275.     App.Draw(Pixel);
  276. }
  277.  
  278. void SF_Circle_NoFill(int x, int y, int Radius)
  279. {
  280.     Pixel = sf::Shape::Circle(x, y, Radius, PaintColor, 1, PaintColor);
  281.     Pixel.EnableFill(false);
  282.     Pixel.EnableOutline(true);
  283.     App.Draw(Pixel);
  284. }
  285.  
  286. void SF_Rectangle(int x, int y, int width, int height)
  287. {
  288.     Pixel = sf::Shape::Rectangle(x, y, x + width, y + height, PaintColor);
  289.     Pixel.EnableFill(true);
  290.     App.Draw(Pixel);
  291. }
  292.  
  293. void SF_Rectangle_NoFill(int x, int y, int width, int height)
  294. {
  295.     Pixel = sf::Shape::Rectangle(x, y, x + width, y + height, PaintColor, 1, PaintColor);
  296.     Pixel.EnableFill(false);
  297.     Pixel.EnableOutline(true);
  298.     App.Draw(Pixel);
  299. }
  300.  
  301. void SF_Line(int x, int y, int xx, int yy, int thick)
  302. {
  303.     Pixel = sf::Shape::Line(x, y, xx, yy, thick, PaintColor);
  304.     Pixel.EnableFill(true);
  305.     App.Draw(Pixel);
  306. }
  307.  
  308. //GamePad input
  309.  
  310. bool SF_GamePad_Button_Get_State(int GamePad, int Button)
  311. {
  312.     const sf::Input& Input = App.GetInput();
  313.     return(Input.IsJoystickButtonDown(GamePad, Button));
  314. }
  315.  
  316. int SF_GamePad_Axis_Get_X (int GamePad)
  317. {
  318.     const sf::Input& Input = App.GetInput();
  319.     return(Input.GetJoystickAxis(GamePad, sf::Joy::AxisX));
  320. }
  321.  
  322. int SF_GamePad_Axis_Get_Y (int GamePad)
  323. {
  324.     const sf::Input& Input = App.GetInput();
  325.     return(Input.GetJoystickAxis(GamePad, sf::Joy::AxisY));
  326. }
  327.  
  328. int SF_GamePad_Axis_Get_Z (int GamePad)
  329. {
  330.     const sf::Input& Input = App.GetInput();
  331.     return(Input.GetJoystickAxis(GamePad, sf::Joy::AxisZ));
  332. }
  333.  
  334. int SF_GamePad_Axis_Get_R (int GamePad)
  335. {
  336.     const sf::Input& Input = App.GetInput();
  337.     return(Input.GetJoystickAxis(GamePad, sf::Joy::AxisR));
  338. }
  339.  
  340. int SF_GamePad_Axis_Get_U (int GamePad)
  341. {
  342.     const sf::Input& Input = App.GetInput();
  343.     return(Input.GetJoystickAxis(GamePad, sf::Joy::AxisU));
  344. }
  345.  
  346. int SF_GamePad_Axis_Get_V (int GamePad)
  347. {
  348.     const sf::Input& Input = App.GetInput();
  349.     return(Input.GetJoystickAxis(GamePad, sf::Joy::AxisV));
  350. }
  351.  
  352. int SF_GamePad_Axis_Get_POV (int GamePad)
  353. {
  354.     const sf::Input& Input = App.GetInput();
  355.     return(Input.GetJoystickAxis(GamePad, sf::Joy::AxisPOV));
  356. }
  357.  
  358.  
  359. // Keyboard Input v.01
  360.  
  361. int SF_Key_Left()
  362. {
  363.     int kval =0;
  364.     const sf::Input& Input = App.GetInput();
  365.     if (Input.IsKeyDown(sf::Key::Left))
  366.         kval = -1;
  367.     else
  368.         kval = 0;
  369.     return(kval);
  370. }
  371.  
  372. int SF_Key_Right()
  373. {
  374.     int kval =0;
  375.     const sf::Input& Input = App.GetInput();
  376.     if (Input.IsKeyDown(sf::Key::Right))
  377.         kval = -1;
  378.     else
  379.         kval = 0;
  380.     return(kval);
  381. }
  382.  
  383. int SF_Key_Up()
  384. {
  385.     int kval =0;
  386.     const sf::Input& Input = App.GetInput();
  387.     if (Input.IsKeyDown(sf::Key::Up))
  388.         kval = -1;
  389.     else
  390.         kval = 0;
  391.     return(kval);
  392. }
  393.  
  394. int SF_Key_Down()
  395. {
  396.     int kval =0;
  397.     const sf::Input& Input = App.GetInput();
  398.     if (Input.IsKeyDown(sf::Key::Down))
  399.         kval = -1;
  400.     else
  401.         kval = 0;
  402.     return(kval);
  403. }
  404.  
  405. int SF_Key_A()
  406. {
  407.     int kval =0;
  408.     const sf::Input& Input = App.GetInput();
  409.     if (Input.IsKeyDown(sf::Key::A))
  410.         kval = -1;
  411.     else
  412.         kval = 0;
  413.     return(kval);
  414. }
  415.  
  416. int SF_Key_B()
  417. {
  418.     int kval =0;
  419.     const sf::Input& Input = App.GetInput();
  420.     if (Input.IsKeyDown(sf::Key::B))
  421.         kval = -1;
  422.     else
  423.         kval = 0;
  424.     return(kval);
  425. }
  426.  
  427. // Other Stuff
  428.  
  429. void SF_Push_Events()
  430. {
  431.     sf::Event Event;
  432.     while (App.GetEvent(Event))
  433.     {   }
  434. }

Ill dig about my dropbox and see if i can put together a proper package for you.

Unseen
Title: Re: InForm Beta 7 is out now
Post by: TempodiBasic on June 23, 2018, 07:45:26 pm
Hi Fellippe

I'm posting my Recipe program v0.1

So I have coded to Multiuse the same form in different aspect to emulate different forms...
and So I have discovered that InputBox/TextBox have no WordWrap properties so I can write one single long text in one raw, no in multiline!
Next step is to translate  TextBox into Label that let me use wordwrap and can show recipes in more lines.

See later Fellippe
Title: Re: InForm Beta 7 is out now
Post by: Unseen Machine on June 23, 2018, 08:13:46 pm
Here you go, files attached.

Code: QB64: [Select]
  1. DECLARE LIBRARY "SFML\libsfml-graphics", "SFML\libsfml-window", "SFML\libsfml-system", "UnseenGDK_GL", "sfml\libopengl32", "sfml\libglu32", "sfml\libsfml-audio"
  2.  
  3.     '    // SCREEN FUNCTIONS
  4.     FUNCTION GDK_GL_SCREEN% (BYVAL width&, BYVAL height&, title$, BYVAL ref&)
  5.     FUNCTION GDK_GL_SCREEN_WIDTH& (BYVAL ref&)
  6.     FUNCTION GDK_GL_SCREEN_HEIGHT& (BYVAL ref&)
  7.     FUNCTION GDK_GL_SCREEN_FRAMETIME! (BYVAL ref&)
  8.     FUNCTION GDK_GL_SCREEN_EXIT (BYVAL Ref&)
  9.  
  10.     '// SCREEN SUBS
  11.     SUB GDK_GL_SCREEN_CLOSE (BYVAL ref&)
  12.     SUB GDK_GL_SCREEN_SET_DEST (BYVAL ref&)
  13.     SUB GDK_GL_SCREEN_SET_XY (BYVAL X&, BYVAL Y&, BYVAL REF&)
  14.     SUB GDK_GL_SCREEN_SHOW (BYVAL ref&)
  15.     SUB GDK_GL_SCREEN_HIDE (BYVAL ref&)
  16.     SUB GDK_GL_SCREEN_SET_FPS (BYVAL FPS&, BYVAL ref&)
  17.     SUB GDK_GL_SCREEN_DISPLAY (BYVAL ref&)
  18.  
  19.  
  20.     '// Keyboard input
  21.     FUNCTION GDK_GL_KEY_Left (BYVAL REF&)
  22.     FUNCTION GDK_GL_KEY_Right (BYVAL REF&)
  23.     FUNCTION GDK_GL_KEY_Up (BYVAL REF&)
  24.     FUNCTION GDK_GL_KEY_Down (BYVAL REF&)
  25.     FUNCTION GDK_GL_KEY_A (BYVAL REF&)
  26.     FUNCTION GDK_GL_KEY_B (BYVAL REF&)
  27.     FUNCTION GDK_GL_KEY_C (BYVAL REF&)
  28.     FUNCTION GDK_GL_KEY_D (BYVAL REF&)
  29.     FUNCTION GDK_GL_KEY_E (BYVAL REF&)
  30.     FUNCTION GDK_GL_KEY_F (BYVAL REF&)
  31.     FUNCTION GDK_GL_KEY_G (BYVAL REF&)
  32.     FUNCTION GDK_GL_KEY_H (BYVAL REF&)
  33.     FUNCTION GDK_GL_KEY_I (BYVAL REF&)
  34.     FUNCTION GDK_GL_KEY_J (BYVAL REF&)
  35.     FUNCTION GDK_GL_KEY_K (BYVAL REF&)
  36.     FUNCTION GDK_GL_KEY_L (BYVAL REF&)
  37.     FUNCTION GDK_GL_KEY_M (BYVAL REF&)
  38.     FUNCTION GDK_GL_KEY_N (BYVAL REF&)
  39.     FUNCTION GDK_GL_KEY_O (BYVAL REF&)
  40.     FUNCTION GDK_GL_KEY_P (BYVAL REF&)
  41.     FUNCTION GDK_GL_KEY_Q (BYVAL REF&)
  42.     FUNCTION GDK_GL_KEY_R (BYVAL REF&)
  43.     FUNCTION GDK_GL_KEY_S (BYVAL REF&)
  44.     FUNCTION GDK_GL_KEY_T (BYVAL REF&)
  45.     FUNCTION GDK_GL_KEY_U (BYVAL REF&)
  46.     FUNCTION GDK_GL_KEY_V (BYVAL REF&)
  47.     FUNCTION GDK_GL_KEY_W (BYVAL REF&)
  48.     FUNCTION GDK_GL_KEY_X (BYVAL REF&)
  49.     FUNCTION GDK_GL_KEY_Y (BYVAL REF&)
  50.     FUNCTION GDK_GL_KEY_Z (BYVAL REF&)
  51.  
  52.     '// Mouse Input
  53.     FUNCTION GDK_GL_MOUSE_X (BYVAL Ref&)
  54.     FUNCTION GDK_GL_MOUSE_Y (BYVAL Ref&)
  55.     FUNCTION GDK_GL_MOUSE_LB (BYVAL Ref&)
  56.     FUNCTION GDK_GL_MOUSE_RB (BYVAL Ref&)
  57.     SUB GDK_GL_MOUSE_MOVE (BYVAL X&, BYVAL Y&, BYVAL Ref&)
  58.     SUB GDK_GL_MOUSE_HIDE (BYVAL Ref&)
  59.     SUB GDK_GL_MOUSE_SHOW (BYVAL Ref&)
  60.  
  61.     '>> GAMEPAD Input
  62.     FUNCTION GDK_GL_GAMEPAD_BUTTON (BYVAL GAMEPAD&, BYVAL Button&, BYVAL ref&)
  63.     FUNCTION GDK_GL_GAMEPAD_X (BYVAL GAMEPAD&, BYVAL ref&)
  64.     FUNCTION GDK_GL_GAMEPAD_Y (BYVAL GAMEPAD&, BYVAL ref&)
  65.     FUNCTION GDK_GL_GAMEPAD_Z (BYVAL GAMEPAD&, BYVAL ref&)
  66.     FUNCTION GDK_GL_GAMEPAD_R (BYVAL GAMEPAD&, BYVAL ref&)
  67.     FUNCTION GDK_GL_GAMEPAD_U (BYVAL GAMEPAD&, BYVAL ref&)
  68.     FUNCTION GDK_GL_GAMEPAD_V (BYVAL GAMEPAD&, BYVAL ref&)
  69.     FUNCTION GDK_GL_GAMEPAD_POV (BYVAL GAMEPAD&, BYVAL ref&)
  70.  
  71.     '// SHAPES LIBRARY
  72.     SUB GDK_GL_SPHERE (BYVAL Radius#, BYVAL Slices&, BYVAL Stacks&, BYVAL Texture&)
  73.  
  74.  
  75.  
  76.  

Unseen
Title: Re: InForm Beta 7 is out now
Post by: FellippeHeitor on June 23, 2018, 08:48:28 pm
Thanks a lot! I'll be studying it soon!
Title: Re: InForm Beta 7 is out now
Post by: Unseen Machine on June 23, 2018, 10:14:10 pm
FUNCTION Init (Width%, Height%, Title$, Detail%)
Screen1% = GDK_GL_SCREEN(Width%, Height%, Title$, 0) '// Create a screen
IF Screen1% THEN
   GDK_GL_SCREEN_SET_FPS 15, 0 '    // Set maximium frames per second
   glClearColor 0.0, 0.0, 0.0, 1.0 '// Set background (clear) color to black
   glClearDepth 1 '                 // Set clear depth value to farthest
   glEnable GL_DEPTH_TEST '         // Enables depth buffer for hidden surface removal
   glEnable GL_TEXTURE_2D '         // Enable texturing
   glEnable GL_CULL_FACE
   glFrontFace GL_CW

   SELECT CASE Detail%
      CASE 1, 2
         glHint GL_LINE_SMOOTH_HINT, GL_FASTEST
         glHint GL_TEXTURE_COMPRESSION_HINT, GL_FASTEST
         glHint GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST
      CASE 3
         glHint GL_LINE_SMOOTH_HINT, GL_NICEST
         glHint GL_TEXTURE_COMPRESSION_HINT, GL_NICEST
         glHint GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST
   END SELECT

   glShadeModel GL_FLAT
   glMatrixMode GL_PROJECTION
   AspectRatio! = GDK_GL_SCREEN_WIDTH(0) / GDK_GL_SCREEN_HEIGHT(0)
   gluPerspective 45, AspectRatio!, 1, 3600
   glMatrixMode GL_MODELVIEW
   glLoadIdentity
   SCREEN _NEWIMAGE(400, 768, 32)
   Init = -1
ELSE
   Init = 0
END IF
Title: Re: InForm Beta 7 is out now
Post by: TempodiBasic on June 24, 2018, 06:33:47 pm
Hi Fellippe

a little feedback

I call Inform to change some items in a form previously made.
So I open file .frm, change items, save only .frm and exit. On exit I choose to not save all (.frm+.bas)
and I get an error... going to look at into .frm I find a wrong code in .frm as showed by image attached.
This is the second time I get this, at first time I have thought that it was a mine error.


I hope it will be useful
Title: Re: InForm Beta 7 is out now
Post by: FellippeHeitor on June 24, 2018, 06:42:18 pm
Indeed a bug, Tempodi. Thanks for reporting.
Title: Re: InForm Beta 7 is out now
Post by: Dav on August 29, 2018, 09:03:28 pm
Hi Fillippe.  I grabbed the InForm zip package from the beta 7 download page.  When I run the UiEditor, its about box says it's beta 6.  The updater program say I have the latest version however.  But in the beta 7 video the interface looks a little different, so I was wondering if I got the wrong package somehow?

- Dav
Title: Re: InForm Beta 7 is out now
Post by: FellippeHeitor on August 29, 2018, 11:20:06 pm
You got beta 6 because stupid me forgot to update the precompiled package! /facepalm

If you can, just delete UiEditor.exe and the InForm folder and get the installer instead. That'll sure get the proper version (and give me time to repackage and fix the download page).

Thanks for pointing it out, Dav!

PS: I actually forgot to update the binaries in the zip; the code in the InForm folder is indeed Beta 7. You may also delete UiEditor.exe and InForm/UiEditorPreview.exe and then recompile UiEditor.bas (no need to recompile UiEditorPreview.bas as that'll be automatic).

PS2: Download page (http://www.qb64.org/inform/download/) updated. Thanks again.
Title: Re: InForm Beta 7 is out now
Post by: Dav on August 30, 2018, 09:10:53 am
Thanks, Fillippe!  I got the updated zip now and InForm works great.

- Dav