Author |
Topic: Main Win, How to ..? (Read 293 times) |
|
SarmedNafi
Junior Member
member is offline
Posts: 93
|
|
Main Win, How to ..?
« Thread started on: May 8th, 2015, 7:52pm » |
|
Dear Richard,
I saw in your previous replay, how can we make the main win run in full screen, I make search in BBC tutorial I found nothing look like what you post. However now I am asking if there is a way to let the main win appears in the upper left corner after we run the program with LBB?
Thank you for your efforts in LBB. Sarmed
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: Main Win, How to ..?
« Reply #1 on: May 8th, 2015, 10:13pm » |
|
on May 8th, 2015, 7:52pm, SarmedNafi wrote:I am asking if there is a way to let the main win appears in the upper left corner |
|
If you know the window handle of the mainwin (for example by calling FindWindow, or using the !BBC-code escape) you can move it anywhere you like with the SetWindowPos API:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms633545.aspx
For example using the FindWindow method (for compatibility with LB4):
Code: title$ = "My Unique Window Title"
TITLEBAR title$
CALLDLL #user32, "FindWindowA", 0 AS LONG, _
title$ AS PTR, hwmain AS ULONG
flags = _SWP_NOSIZE OR _SWP_NOZORDER
CALLDLL #user32, "SetWindowPos", hwmain AS ULONG, _
0 AS LONG, 0 AS LONG, 0 AS LONG, 0 AS LONG, _
0 AS LONG, flags AS LONG, ret AS LONG
|
|
|
|
|