Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Show a dialog while doing a lengthy process


8 replies to this topic

pauldavidson

pauldavidson
  • Full Members
  • 22 posts

Posted 05 December 2012 - 15:55

I know how to create a custom dialog, and show it.

But what I was hoping to do, was show a dialog with a message (Doing something, please wait...) on it, disable any buttons, and call a method that will take a while to return. Then when the method has returned, enable the buttons and/or move to the next step etc

How would I go about this? Or is there a better way to do this?

Basically I have a bunch of stuff that will take a short while to do, and want to show the user that I am doing x, y, z.

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 05 December 2012 - 16:58

A better way to do such status updates is to use the built-in SdShowMsg() functionality, so here's some example code:

CODE
SdShowMsg("Doing something, please wait ...", TRUE); // TURN ON INSTALL'S STATUS MESSAGE
// DO SOME WORK
SdShowMsg("", FALSE); // TURN OFF INSTALL'S STATUS MESSAGE

user posted image

pauldavidson

pauldavidson
  • Full Members
  • 22 posts

Posted 05 December 2012 - 17:16

Brilliant, that is a lot easier than what I was attempting to do. If any windows are showing at the same time, can a user click the cancel/back/next?

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 06 December 2012 - 15:47

I know that click handling still works for non-InstallShield dialogs and I think that would be true of any IS dialogs too.

Edited by Taco Bell, 06 December 2012 - 16:03.

user posted image

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 06 December 2012 - 17:24

Before SdShowMsg you may want to call
Disable(DIALOGCACHE);

pauldavidson

pauldavidson
  • Full Members
  • 22 posts

Posted 11 December 2012 - 17:40

QUOTE (Stefan Krueger @ 2012-12-06 17:24)
Before SdShowMsg you may want to call
Disable(DIALOGCACHE);

What does this do Stefan?

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 12 December 2012 - 18:36

I've never had to call it, but according to the InstallShield documentation, Disable(DIALOGCACHE) does the following:
QUOTE
Disables the dialog cache mechanism which normally eliminates the screen flash that appears between the display of dialogs. This screen flash is most noticeable in the title bar of setups running in window mode. Note that the dialog caching mechanism works only for dialogs that have BACK and NEXT buttons.

Edited by Taco Bell, 12 December 2012 - 18:36.

user posted image

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 14 December 2012 - 16:22

It will remove the previous dialog from the screen, so that the SdShowMsg is not displayed on top of it.

pauldavidson

pauldavidson
  • Full Members
  • 22 posts

Posted 19 December 2012 - 17:07

Thanks.