LB Booster
« Search Results »

Welcome Guest. Please Login or Register.
Sep 23rd, 2017, 11:40pm


Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
LB Umbrella forum
Liberty BASIC forum (the original)

Search Results

Total results: 10


 1   Liberty BASIC language / Re: Minimize or Maximize from within the program  on: Sep 21st, 2017, 3:03pm
Started by flotulopex | Post by flotulopex
Thanks Richard,

As always, you provide the needed help ;)

So this is the code I added to my code.

Code:
[MINIMIZE_WINDOW]
   hMain = hwnd(#Main)
   CallDLL #user32, "ShowWindow",_
   hMain as uLong,_        'handle of window
   _SW_MINIMIZE As Long,_  'message to minimize window
   r As Long
   WAIT
 

 
  Reply Quote Notify of replies

 2   Liberty BASIC language / Re: Minimize or Maximize from within the program  on: Sep 20th, 2017, 06:40am
Started by flotulopex | Post by flotulopex
Thanks Richard,

I'll give it a try this evening.

I see, I have to get used to use those APIs....
 
  Reply Quote Notify of replies

 3   Liberty BASIC language / Re: Minimize or Maximize from within the program  on: Sep 19th, 2017, 11:27am
Started by flotulopex | Post by Richard Russell
on Sep 18th, 2017, 6:40pm, flotulopex wrote:
But what would the command look like?

I linked to suitable code at LBPE in my reply.

Richard.


 
  Reply Quote Notify of replies

 4   Liberty BASIC language / Re: Minimize or Maximize from within the program  on: Sep 19th, 2017, 09:51am
Started by flotulopex | Post by RobM
on Sep 18th, 2017, 6:40pm, flotulopex wrote:
I would use a received command to minimize the window. But what would the command look like?


https://msdn.microsoft.com/en-us/library/windows/desktop/ms633548(v=vs.85).aspx

Code:
nCmdShow=_SW_MINIMIZE
calldll #user32, "ShowWindow",_
h as ulong,_
nCmdShow as long,_
result As boolean 

 
  Reply Quote Notify of replies

 5   Liberty BASIC language / Re: Minimize or Maximize from within the program  on: Sep 18th, 2017, 6:40pm
Started by flotulopex | Post by flotulopex
Hi,

Sorry for my late reply - I was on travel.

Okay, my question is some kind of fuzzy.

My program's main window doesn't have the title bar appearing so I cannot click on the "minimize" button to get the Window's desktop. Nevertheless, I'd like to minimize the window like I would use the keys "Windows+Down".

Either I could create a button "Minimize" or, since my program is remotely controlled, I would use a received command to minimize the window. But what would the command look like?

Forget about the "maximize" question - this one is completely s****d grin
 
  Reply Quote Notify of replies

 6   Announcements / Re: LB Booster version 3.09 released  on: Sep 15th, 2017, 4:59pm
Started by Richard Russell | Post by net2014
Richard, thanks for your continued support. Still running LBB in linux/wine, remembering to manually create the 'lib' folder! Everything working fine. cool
 
  Reply Quote Notify of replies

 7   Liberty BASIC language / Re: Minimize or Maximize from within the program  on: Sep 10th, 2017, 9:09pm
Started by flotulopex | Post by Richard Russell
on Sep 10th, 2017, 7:45pm, flotulopex wrote:
I'd like to know if there is a way to Minimize or Maximize the program's window from within the program itself.

Which window? Programs typically have multiple windows.

If it's a GUI window (such as a graphics window or a text window) then of course it's just a case of calling the ShowWindow API function with the appropriate parameter: _SW_MINIMIZE or _SW_MAXIMIZE respectively. LBB is no different from LB 4 in this respect and you can use code such as that documented at the Liberty BASIC Programmer's Encyclopedia.

On the other hand if you are referring to the mainwin somewhat different considerations apply. Maximizing the mainwin is straightforward but minimizing it is most easily achieved using code which is LBB-specific.

So which window are you referring to?

Richard.

 
  Reply Quote Notify of replies

 8   Liberty BASIC language / Minimize or Maximize from within the program  on: Sep 10th, 2017, 7:45pm
Started by flotulopex | Post by flotulopex
Hey there,

I'd like to know if there is a way to Minimize or Maximize the program's window from within the program itself.

I've made a program using a remote sending serial information.

I would like my remote to be able to Minimize or Maximize the program's window.

Is this feasible?
 
  Reply Quote Notify of replies

 9   Announcements / Re: LB Booster version 3.09 released  on: Sep 9th, 2017, 5:04pm
Started by Richard Russell | Post by Richard Russell
on Sep 9th, 2017, 1:18pm, Jack Kelly wrote:
In my opinion DefaultDir$ should always report the 'Start in' folder of the shortcut.

It does, of course, when the shortcut points to a compiled LB program. DefaultDir$ refers to the 'current directory' when the compiled program (i.e. the EXE file) is run. If it's run from a shortcut it will be the 'Start in' property. If not, it will often be the directory from which the EXE was launched.

If you are running a BASIC program from the LBB IDE the 'start in' property of the shortcut has no meaning since it will be the same for every BASIC program you run! In that case LBB makes the best guess it can as to the 'proper' DefaultDir$, which is the folder in which the BASIC program itself resides. For example this makes the sample programs supplied with Liberty BASIC 4 work correctly.

Quote:
I thought you had made this change in version 3.08, but 3.09 still reports the Windows Temp folder.

I don't recollect the issue having been raised previously, but if it was I no doubt gave the same answer. LBB is working as designed, which is to set DefaultDir$ 'correctly' for compiled programs and to make an 'intelligent guess' as to the wanted DefaultDir$ when programs are run from the IDE.

Richard.

 
  Reply Quote Notify of replies

 10   Announcements / Re: LB Booster version 3.09 released  on: Sep 9th, 2017, 1:18pm
Started by Richard Russell | Post by Jack Kelly
I always check to see what happens when I 'print DefaultDir$' immediately after starting LBB from the shortcut. In my opinion it should always report the 'Start in' folder of the shortcut. I thought you had made this change in version 3.08, but 3.09 still reports the Windows Temp folder.

I know you have told me many reasons why this was impossible or difficult in LBB, but I remain hopeful.

Jack

 
  Reply Quote Notify of replies


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