QB64.org Forum
QB64 Team Software => InForm-based programs => Topic started by: FellippeHeitor on February 26, 2018, 10:34:19 am
-
Of course there's no purpose recreating a system dialog other than it being a proof of concept. In this case I recreate Windows's "Run" dialog, with limited function (the Browse... button is disabled).
Unpack all files and compile Executar.bas
This was created using InForm beta 6. The hotsite for the project (http://www.qb64.org/inform) is still offering beta 5, but you can get the development preview from GitHub: https://github.com/FellippeHeitor/InForm/archive/development.zip
Notice that the InForm folder in the zip attached doesn't contain the full project (which includes the visual editor). These are the only files you need to include when you distribute a project created using InForm.
PS: "Run" in Portuguese is "Executar".
-
I'm going to try this in Windows 10 since Microsoft thoughtfully removed the "Run" dialog.
-
Let me know how that goes!
-
Hi Fellippe,
I bet it is possible to put Files / Folders tree in a list box and just click the desired File or Folder.
You guys with all your typing, sheez! ;D
-
A call to the default browse dialog should be easy enough to add, I just haven't: http://www.qb64.org/wiki/Windows_Libraries#File_Open_and_Save_Dialog
-
Can't get it to compile under Windows 10, I keep getting Library not found in line 15 of ***\inform.ui included on current line, although in the file manager I can see that it's there where it claims it can't find it. If I open the inform.ui file it says it can't find Library "falcon. " Does this by chance require the latest version of QB64, I'm still using 1.1 because I'm lazy.
-
Stupid me, forgot to add falcon.h to the zip. Here it is, place it in QB64's folder. Zip updated too.
-
That did the trick, works like a champ now!
-
Great to hear!
-
I have added the Browse... functionality by calling the default system Open dialog, using the code provided in the wiki by Jobert14 (http://qb64.org/wiki/Windows_Libraries#File_Open_and_Save_Dialog).
I updated the zip in the first post and you can see a screenshot attached below.
-
Hi Fellippe,
Now we're talking! (if that is what I think it is) Great idea!
*<|:-) I'm taking you off my naughty list.
-
Is the run dialog screenshot something you created in QB64 graphics, or is it a call to an existing box, through a Windows API call?
Also, what is the purpose?
Pete :)
-
The Run dialog has been recreated using InForm, that's all QB64. The Open dialog in the second screenshot is Windows native, via API call.
The purpose, as stated in the first post, is a proof of concept. Look how cool my form looks using InForm. That's the only goal with this.
But as soon as the dialog with the original goal was posted, I found out via phred that Windows 10 has extinguished the Run dialog, so my faux dialog was repurposed. Now you can have a basic OS functionality back with a program created using BASIC.
-
Yes Fellippe after this idiot figured out where to put Falcon.h the code Ran.
(I know, all I had to do was read the instruction to put it in the QB64 folder, yikes read!)
Guess who I ran into testing this dialog out?
Seriously, this is really nice demo with a use! a keeper!
-
I just tested the Browse part of the Run Dialog and YES you can do all kinds of File and Folder management while in the Browse screen.
I wish this feature were in the QB64 IDE Editor with Open, Save and Save as dialogs.
-
This is very impressive work! :D
-
That'll require a merge of TextBox controls and DropdownLists, but once the new type of control exists, it should be easy enough to add. Thanks for trying it!
-
You're filling up Fell with a lot of work, but strangely enough, it's probably less work than convincing those idiots at Microsoft that Win7 is a far better system then 10, although arguably not as tough as 10. Well, Maybe that's not a fair comparison. My 7 just has to put up with keyboard tapping while my 10 spends it day adding up frequent flyer miles and bouncing off walls.
Pete
-
Whatever happens in regards to Inform - my plea would be to remember to not exclude the other two major operating systems; it seems that so often, a project will start out as being "cross-platform", garnering a lot of support, only later to find itself shutting out everything except Windows (as an original kickstarter supporter for Oculus, their dropping support for Linux really ticked me off, as it was one of the main things that caused me to invest).
Now - I know this dialog is just a clone, and is likely (?) cross compatible and isn't specific to Windows - I'm just putting out a plea and reminder, that there are others out there who use other operating systems besides Windows (and QB64 always being cross-platform in this regard has been a breath of fresh air for so long).
-
Hi Fellippe,
Does the browse button still work for you with this?
I've tried with 3 versions of QB64 and nothing happens when I click browse. I am wondering if a Windows update changed something.
-
I haven’t checked in a while. I’ll let you know. Are you on Windows 10?
Update: I wrote this sample in a 32bit version of QB64, and it calls a 32bit library, which I assume won't work when we compile with QB64 64bit:
FUNCTION GetOpenFileNameA&
(DIALOGPARAMS
AS FILEDIALOGTYPE
) ' The Open file dialog FUNCTION GetSaveFileNameA&
(DIALOGPARAMS
AS FILEDIALOGTYPE
) ' The Save file dialog
-
I haven’t checked in a while. I’ll let you know. Are you on Windows 10?
Update: I wrote this sample in a 32bit version of QB64, and it calls a 32bit library, which I assume won't work when we compile with QB64 64bit:
FUNCTION GetOpenFileNameA&
(DIALOGPARAMS
AS FILEDIALOGTYPE
) ' The Open file dialog FUNCTION GetSaveFileNameA&
(DIALOGPARAMS
AS FILEDIALOGTYPE
) ' The Save file dialog
OK that was in there already. Oh this is Windows only, dang, what a great Browse it was.
-
@FellippeHeitor So is the Browse button still working for you?
-
I don't have QB64 32bit on this machine and download has been forbidden (corporate network), I'll try it at home tonight and let you know.
-
Oh! If this requires 32 bit version never mind, but would be interested in this for v1.4, if possible.
-
Does anyone know about comdlg for 64bit systems?
-
I have a program that stays 32 bit because of this problem.I have seen how to do it with VBA here: https://social.msdn.microsoft.com/Forums/en-US/1db77ef4-f363-4e60-b680-6cf1c44e22bd/office-32bit-vs-64bit-comdlg32dll?forum=accessdev (https://social.msdn.microsoft.com/Forums/en-US/1db77ef4-f363-4e60-b680-6cf1c44e22bd/office-32bit-vs-64bit-comdlg32dll?forum=accessdev)
But how to Declare PtrSafe Function in qb64 I do not know.