Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - Controls
Forum to discuss usage & tips for SalesLogix controls and other 3rd party ActiveX controls. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Controls | New ThreadView:  Search:  
 Author  Thread: Form Placement
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Form PlacementYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Oct 09 3:06 PM
Any known way to control Where on a user's screen a form pops up?
[Reply][Quote]
john
Posts: 34
 
Re: Form PlacementYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Oct 09 3:47 AM
if you are using application.mainviews collection, then you can get an instance of the form, from which you can set top and left properties
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Form PlacementYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Oct 09 9:10 AM
Top and left in relationship to what, the application?

In other words, are you setting the MainView object's Top and Left? I can add the mainview object with a WindowStyle of 2....which means OnTop of SLX....

and then resizing?
[Reply][Quote]
john
Posts: 34
 
Re: Form PlacementYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Oct 09 9:22 AM
try it and find out! the help text says the edge of the container, whatever that means!
I would say it will be the screen, as opposed to the application (unless maybe its a modal form?).

let us know the answer though
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Form PlacementYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Oct 09 11:02 AM
OK setting the MainView left and top sets the ActiveForm left and top....that would be the form that you've placed IN the mainview container. Since I set the form's alignment to alClient that overrides any of that anyway.....

I do have Minimize Maximize and Resize working for an OnTop of SLX window (BorderStyle = 2, WindowStyle = 2).

Also SaveSize and RestoreSize works just fine.

OH, you have to make sure that the form's Close buttons have some kind of modality to them (mine were running scripts that eventually closed the window, but the mainview object overrides that).

Alt-F4 always shuts these windows/containers down....that's the 'X' button\icon in the upper right hand corner of the window.

Thanks for the help John!

Any other ideas: how to place a form/window/mainview object on to a user's computer screen??? Visual Studio and redo the whole thing.....
[Reply][Quote]
john
Posts: 34
 
Re: Form PlacementYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Oct 09 11:28 AM
well if I call something like:
Dim lReturn
Dim objMainView

Set objMainView = Application.MainViews.Add("Personal:frmJustAStandardActiveForm", 0, False)
objMainView.Caption = "Active Form Position Test"
objMainView.BorderStyle = 2
lReturn = objMainView.Show
objMainView.Top = 10
objMainView.Left = 10
Set objMainView = Nothing

then it positions the mainview in the correct place (ie in the top left hand corner of the screen)...
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Form PlacementYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Oct 09 9:08 AM
John: neither of these work:

objMainView.SaveSize
application.Debug.WriteLine "Show Modal "
MR = objMainView.ShowModal '''' return of the screen
objMainView.Top = 250
objMainView.Left = 100

OR
objMainView.Top = 250
objMainView.Left = 100
objMainView.SaveSize
application.Debug.WriteLine "Show Modal "
MR = objMainView.ShowModal '''' return of the screen

I thought that the physical Show or ShowModal was triggered when the screen was closed by the user....so I don't understand why you would change the top and left of the form AFTER the user has clicked on the close/cancel/OK/X buttons....
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Form PlacementYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Oct 09 9:52 AM
ShowModal is the method which displays the screen - and makes it modal. Your code pauses at this point while the screen is active.

After the user finishes with the screen and clicks OK/Cancel, the result is passed to MR (mrOK, mrCancel etc) and your code continues.

You need to set the size and position settings before calling ShowModal.
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Form PlacementYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Oct 09 3:12 PM
Got it, and that method doesn't work either (I tried both ways).....although John's example seems to support the setting of Left and Top after a .Show.

I think the key here is that a FORM (the Active Form) that sits in a mainview can have left and top positioned IN THE FORM.

This isn't based on which specific monitor that the SLX application is located on.....which is what I'm looking for.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/26/2024 9:21:03 AM