Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2007
    Posts
    160

    Grin Application.Exit Question

    What I would like to do is to determine if a system is a 64-bit OS and display a message, if so, indicating that our application is not supported on a 64-bit OS at this time.

    I have the following in an OnShow script of our Welcome Page...

    if System.Is64BitOS() then
    Dialog.Message("Our App Support", "Our App is not supported on 64-bit Operating Systems.", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
    Application.Exit();
    end

    This seems to work OK in that a 64-bit OS is detected and the message displays immediately after our Welcome Page appears. What I would like to happen, if possible, is to have just the message display without seeing the Welcome Page in the background.

    I tried the snippet above in the Preload script, but what happens there is the message is displayed without the Welcome Page appearing. Once the message dialog is closed, the Welcome Page then flashes, but is closed.

    Let me know if displaying the message without seeing the Welcome page is possible.

    THANKS in advance!


  2. #2
    Join Date
    May 2005
    Posts
    1,115
    Add this as a first line in project's OnStartUp script:
    Application.SetRedraw(false);

    Then in the first page's OnShow script add:
    Application.SetRedraw(true);

    And yes, move your OS check to the Project's OnStartUp script.

    It will help a bit since page content should not be shown.
    Last edited by bule; 03-22-2007 at 06:56 AM.
    Never know what life is gonna throw at you.
    (Based on a true story.)

  3. #3
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Here's what I've used in the past. Throw the code in the Preload of your first page.

    Code:
    if System.Is64BitOS() then
    	Dialog.Message("Our App Support", "Our App is not supported on 64-bit Operating Systems.", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
    	-- set the window to flat style
    	nResult = DLL.CallFunction(_SystemFolder.."\\User32.dll", "SetWindowLongA", Application.GetWndHandle()..",-16,-1811415040", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
    	-- hide the window
    	Window.SetSize(Application.GetWndHandle(),0,0);
    	--exit the app
    	Application.Exit();
    end

  4. #4
    Join Date
    Jan 2007
    Posts
    160
    Both seem to work OK. The first proposed solution still has a bit of a page flash after I close the displayed message dialog. You can't really see the graphics of the page, but the outline of it flashes.

    The second solution seems to be more what I was after, but I have a concern. The use of _SystemFolder.., could this potentially cause problems on 64-bit systems due to the System32 and SysWOW64 folders, or is AutoPlay smart enough to handle this?

  5. #5
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    I don't have a 64 bit system to try it on, but a simple

    Dialog.Message("System Folder", _SystemFolder)

    should show you where the variable points.

  6. #6
    Join Date
    Jan 2007
    Posts
    160
    It worked on our 64-bit test system, so I'm probably OK. Even if this chokes at times, we don't support 64-bit for this app anyway.

    I'll check where its pointing though as you suggest.

    Thanks all for the help and guidance!

  7. #7
    Join Date
    Mar 2005
    Location
    WA 'wait a while' - Australia
    Posts
    872
    fyi:

    64 bit OSs redirect calls from 32 bit proggies, for system resources, to the WoW64 folder,
    so references - coding in IR runtimes to _SystemFolder are redirected to the wow64 folder
    (behind the scenes) but show in coding returns as: system32

    so as long as the function call is supported in the 32bit(Wow64) system resource,
    then eg: _SystemFolder.."\\targetfile.ext" should behave as expected under 64 bit OSs

    hth
    Last edited by Eagle; 03-22-2007 at 08:12 AM.

Similar Threads

  1. Math.RandomSeed() question
    By stickck in forum AutoPlay Media Studio 6.0
    Replies: 8
    Last Post: 06-09-2006, 09:42 AM
  2. Random question
    By tzkennedy in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 04-09-2005, 12:08 AM
  3. Basic Flash question
    By aae991 in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 03-09-2005, 09:46 PM
  4. Bug with Application.Exit and StatusDlg
    By arnaud in forum AutoPlay Media Studio 5.0
    Replies: 10
    Last Post: 01-22-2004, 04:22 PM
  5. FlashMX vs AMS5 Data Arrays question
    By Martin_SBT in forum AutoPlay Media Studio 5.0
    Replies: 1
    Last Post: 01-19-2004, 09:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts