![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Basic4ppc Wishlist Missing any feature? |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
When user launched a Basic4PPC-compiled as Windows app, the application will starts in the center of the desktop screen. When user moves the app to a different location, subsequent forms will move back to the center. However, subsequently when the same form is being accessed, the position where the form was previously is used. A request here.. when the app is moved to a different location, it would be great to have all forms shown on the same location in the first instance, rather than in the center. |
|
|||
|
Hi All,
Thanks... I think saving to a file or registry is better as users can move the app from 'any form'.. and need not be in Form1... as it's all transparent to them.. this way, regardless of which Form they're in.. it will be displayed in the 'last moved position'. Thanks to all!!! |
|
|||
|
Hi Erel,
I tried using the methods suggested. It works.. but noticed there was 'flashing' of the windows from center to the position moved. This is obvious when the Form is displayed the first time. Subsequently it will not. In your example.. Sub Button1_Click form2.Show form2.Left = form1.Left form2.Top = form1.Top End Sub Form2 was shown before the 'moving' was done. If I changed it to: Sub Button1_Click form2.Left = form1.Left form2.Top = form1.Top form2.Show End Sub the Form2 will not moved to the new coordinate the first time Form2 was shown, however it will recognise the coordinate on subsequent display of Form2. Is there a way to prevent the 'windows flashing' from being seen? |
|
||||
|
This code will prevent the flashing (door is a Door object):
Code:
Sub App_Start
Form1.Show
door.New1(false)
door.FromControl("form2")
door.SetProperty("StartPosition","Manual")
' door.FromControl("form3")
' door.SetProperty("StartPosition","Manual")
' ...
End Sub
Sub Button1_Click
form2.left = form1.left
form2.top = form1.top
form2.Show
End Sub
|
|
||||
|
Hi Erel and WZSun,
Works fine ! I modified the code a bit to postion also the first form, in some programs I have only one form. Code:
Sub App_Start
LoadInit ' reads the position of the main form frmTop and frmLeft
door.New1(false)
If Not(CPPC) Then
door.FromControl("form1")
door.SetProperty("StartPosition","Manual")
End If
Form1.Top=frmTop ' sets the position
Form1.Left=frmLeft
Form1.Show
If Not(CPPC) Then
door.FromControl("form2")
door.SetProperty("StartPosition","Manual")
' door.FromControl("form3")
' door.SetProperty("StartPosition","Manual")
End If
' ...
End Sub
__________________
Klaus Switzerland Last edited by klaus : 05-12-2008 at 11:27 AM. |
|
||||
|
The code in my previous post has been modified.
It must be Code:
If Not(CPPC) Then
door.FromControl("form1")
door.SetProperty("StartPosition","Manual")
End If
Best regards
__________________
Klaus Switzerland |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pass Text into other application at current cursor position...? | TWELVE | Questions & Help Needed | 2 | 04-30-2008 07:49 AM |
| Tables - column position | LineCutter | Questions & Help Needed | 6 | 02-22-2008 02:30 PM |
| Position TextBox or Button in centre of form | burd27 | Questions & Help Needed | 6 | 02-16-2008 05:12 AM |
| Not losing cursor position after running/compiling | Woinowski | Basic4ppc Wishlist | 0 | 01-16-2008 07:18 AM |
| Position of form designer | pixelpoint | Basic4ppc Wishlist | 0 | 08-16-2007 12:51 PM |