Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, February 23, 2025 
 
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 - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Wait CUrsor
Mark Richardson
Posts: 6
 
Wait CUrsorYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Feb 12 9:52 AM
fiogf49gjkf0d

Hi Community !


I have trawled this + other SLX Communities but have still not found a definitive answer for changing the cursor on large data-load events.


I am running v7.5.3 LAN clients, am launching a Form from the Toolbar that has a DataGrid control with a 20 second-ish load time.


I want the user to know the system is doing something by way of an HourGlass cursor...


Has anybody achieved this (NOT with Legacy code please..) ?


Thanks in advance,


Mark Richardson

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Wait CUrsorYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Feb 12 10:11 AM
fiogf49gjkf0d

Hi Mark


Unfortunately, as you've found. The animated glyphs and mouse cursor won't change during an event. What you are best to do is this (follow same format as the reporting module).


1) Using code invoke the form "System:SLX Loading Dialog"


2) Then Show this form (it will be non-modal)


3) Do your form (loading the grid). On the last event, close down the original form (it's tagged with 2006).


You can obviously use your own form/graphics etc. If you open SLX Report Manager View and look for cmdGenerateClick you will see all of the above and should be able to follow what it does.


The real question is "can't you optimise the SQL to make the grid load faster" !


Regards
Mike


 

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Wait CUrsorYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Feb 12 10:16 AM
fiogf49gjkf0d

It is possible, but there is one issue:


 


  The Cursor is set by Control....


  You can set it on the Form, but as soon as the User hovers onto a separate Tab, or a Control within the Form, the cursor will be set back to the Default Cursor for that control.


 


  So, in theory you could Create a Script that Cycles through Every Control on your Form (If held within a Main View with Tabs, you would have to go through every Form on your Main View) and then change each Control's cursor property to "crHourGlass"


  e.g. 


' If on a Main View, call this function for all the Forms that are part of the Main View (or that are visible to minimize processing time).


 


SetHourGlassOnForm frmAccountDetail, true     ' True will set the Hour Glass


SetHourGlassOnForm frmAccountDetail, false    ' False will remove the Hour Glass


 


Sub SetHourGlassOnForm(form, blHourGlass)


Dim selectedCursor


Dim i


Dim ctrl


  On Error Resume Next


  if blHourGlass Then


     selectedCursor  = crHourGlass


  Else


     selectedCursor  = crDefault


  End If


  form.Cursor = selectedCursor


 


  Do while i < form.ControlCount


    Set ctrl = form.Controls(i)


    ctrl.Cursor = selectedCursor


    i = i + 1


  Loop


End Sub

[Reply][Quote]
Mark Richardson
Posts: 6
 
Re: Wait CUrsorYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Feb 12 10:27 AM
fiogf49gjkf0d

Hehe - I like the last solution If you know Sage Line500 and the most efficient way to load a 'last price paid' by customer/product then I would definitely prefer this:


I've resorted to:



SELECT     product, val / quantity AS price, customer, dated, invoice


FROM         scheme.opsahistm AS op WITH (nolock)


WHERE     (invoice =


                          (SELECT     TOP (1) invoice


                            FROM          scheme.opsahistm AS ix WITH (nolock)


                            WHERE      (product = op.product) AND (customer = op.customer)


                            ORDER BY dated DESC)) AND (val <> 0) AND (quantity <> 0) AND (warehouse <> '') AND (invoice NOT LIKE 'OP/C%')


...



Any offers ? (I'm chancing my hand here of course!) Sealed


Otherwise Mike - thanks, i'll check out that Vanilla SLX Report Manager view's btn event...

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Wait CUrsorYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Feb 12 10:32 AM
fiogf49gjkf0d

Have you pushed that through Database Engine Tuning Advisor ? - I suspect it'll make that work a lot quicker (with new plans and indexes). I'm often delighted with how much better it makes my queries

[Reply][Quote]
Mark Richardson
Posts: 6
 
Re: Wait CUrsorYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Feb 12 10:44 AM
fiogf49gjkf0d

Hi again Mike - Inded I have with no recommendations alas...


Thanks again though for the first pointer - Looking at it now...

[Reply][Quote]
Mark Richardson
Posts: 6
 
Re: Wait CUrsorYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Feb 12 10:48 AM
fiogf49gjkf0d

Raul - Thanks for the reply. I have seen other posts using the iterate through form controls option but not liking that 'work-around'. Hey - I'm also aware beggars can't be choosers so my have to resort to that too! 


Thanks again,


Mark

[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 © 2025 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): 2/23/2025 4:13:55 PM