Author Topic: [InForm] Windows 7's run dialog clone  (Read 38961 times)

0 Members and 1 Guest are viewing this topic.

This topic contains a post which is marked as Best Answer. Press here if you would like to see it.

FellippeHeitor

  • Guest
[InForm] Windows 7's run dialog clone
« 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).

ScreenshotExecutar.PNG

Unpack all files and compile Executar.bas

This was created using InForm beta 6. The hotsite for the project 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".
* RunDialog.zip (Filesize: 118.08 KB, Downloads: 534)
« Last Edit: August 28, 2018, 12:01:30 am by FellippeHeitor »

Offline phred

  • Newbie
  • Posts: 11
    • View Profile
Re: [InForm] Windows 7's run dialog clone
« Reply #1 on: February 26, 2018, 11:10:44 am »
I'm going to try this in Windows 10 since Microsoft thoughtfully removed the "Run" dialog.

FellippeHeitor

  • Guest
Re: [InForm] Windows 7's run dialog clone
« Reply #2 on: February 26, 2018, 11:18:08 am »
Let me know how that goes!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: [InForm] Windows 7's run dialog clone
« Reply #3 on: February 26, 2018, 12:15:15 pm »
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

FellippeHeitor

  • Guest
Re: [InForm] Windows 7's run dialog clone
« Reply #4 on: February 26, 2018, 12:20:47 pm »
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

Offline phred

  • Newbie
  • Posts: 11
    • View Profile
Re: [InForm] Windows 7's run dialog clone
« Reply #5 on: February 26, 2018, 02:09:59 pm »
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.

FellippeHeitor

  • Guest
Re: [InForm] Windows 7's run dialog clone
« Reply #6 on: February 26, 2018, 02:17:18 pm »
Stupid me, forgot to add falcon.h to the zip. Here it is, place it in QB64's folder. Zip updated too.
* falcon.h (Filesize: 8.13 KB, Downloads: 561)

Offline phred

  • Newbie
  • Posts: 11
    • View Profile
Re: [InForm] Windows 7's run dialog clone
« Reply #7 on: February 26, 2018, 03:39:50 pm »
That did the trick, works like a champ now!

FellippeHeitor

  • Guest
Re: [InForm] Windows 7's run dialog clone
« Reply #8 on: February 26, 2018, 03:42:25 pm »
Great to hear!

FellippeHeitor

  • Guest
Re: [InForm] Windows 7's run dialog clone
« Reply #9 on: February 27, 2018, 11:11:02 am »
I have added the Browse... functionality by calling the default system Open dialog, using the code provided in the wiki by Jobert14.

I updated the zip in the first post and you can see a screenshot attached below.
Screenshot_RunDialogBrowse.PNG
* Screenshot_RunDialogBrowse.PNG (Filesize: 272.2 KB, Dimensions: 668x609, Views: 860)

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: [InForm] Windows 7's run dialog clone
« Reply #10 on: February 27, 2018, 01:05:30 pm »
Hi Fellippe,

Now we're talking! (if that is what I think it is) Great idea! 

*<|:-)  I'm taking you off my naughty list.




Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: [InForm] Windows 7's run dialog clone
« Reply #11 on: February 27, 2018, 03:32:36 pm »
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 :)
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

FellippeHeitor

  • Guest
Re: [InForm] Windows 7's run dialog clone
« Reply #12 on: February 27, 2018, 03:38:35 pm »
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.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: [InForm] Windows 7's run dialog clone
« Reply #13 on: February 27, 2018, 03:59:25 pm »
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!
Run Dialog test.PNG
* Run Dialog test.PNG (Filesize: 41.85 KB, Dimensions: 1047x648, Views: 839)
« Last Edit: February 27, 2018, 04:07:13 pm by bplus »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: [InForm] Windows 7's run dialog clone
« Reply #14 on: March 02, 2018, 10:52:10 pm »
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.