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

focus problems in win2000


7 replies to this topic

chaitra

chaitra
  • Members
  • 2 posts

Posted 03 May 2001 - 11:38

whenever installshield application is launched in win2000, key board focus is losts from installshield application but the same application works fine in win98 /NT 4.0.
It is very  urgent , help me out.
Thanks in advance.


nraina

nraina
  • Members
  • 30 posts

Posted 20 May 2001 - 20:58

i am facing similar situation now ie when setup.exe is launched the focus goes to desktop instead of the dialog boxes ...
My OS is windows 2000.

If you found a solution to this pb please do let me know too...coz I am stuck
this is urgent!

Thanks


OKauhanen

OKauhanen
  • Members
  • 27 posts

Posted 22 May 2001 - 07:17

Hmm... I tried to post a reply half an hour ago, but it didn't seem to work. I have the same problem with focus as you do. I haven't tried this, but I think it will work. You could use a custom action that calls a Windows API function that activates and shows the MSI window. A suitable funciton can be found from user32.dll, which comes with every windows platform.

You could use for example ShowWindow.
ShowWindow(HWND hWnd, int nCmdShow)
Pass the MSI window handle to hWnd and you could use one of these for nCmdShow:
SW_SHOW
SW_MAXIMIZE
SW_RESTORE
I also looked up the values for the constants in case you need them.
SW_SHOW = 5
SW_MAXIMIZE = 3
SW_RESTORE = 9
If you still have problems post a reply.


OKauhanen

OKauhanen
  • Members
  • 27 posts

Posted 22 May 2001 - 07:26

You could also try using Enable(MSIWINDOW) and Disable(MSIWINDOW) to manipulate the window from InstallScript, but I didn't get that to work

nraina

nraina
  • Members
  • 30 posts

Posted 23 May 2001 - 02:03

I face the focus pb only when i add a billboard to my project and not otherwise..

What is happening is that when i build the
project and run setup.exe it shows a Billboard (green
color background on Desktop) followed by
WelcomeInstall dialog box. For one second the
billboard occupies the whole desktop covering taskbar
etc (as expected) but the next moment the taskbar
appears at bottom.
Also simultaneously, The WelcomeInstall dialog box
appears TWICE first time with focus and next time
without it (focus)...and finally focus goes to taskbar
instead of Dialog box. This happens with the
successive boxes too.

So there are two issues involved:
1. Focus pb: Focus goes to taskbar instead of
remaining on dialog boxes.
2. Welcome dialog box appearing twice.

Note:
1. The Billboard is NOT present in Billboard table
2. The BBControl table has no entry as well.
I tried to put values in these tables but was not sure
what values should be put.
3. There is a topic called 'BillBoard Properties' in
Installshield help which talks about several imp ones
but i could not find any table where i could give
these properties to my billboard.

Pl help...
will try your suggestion too.


nraina

nraina
  • Members
  • 30 posts

Posted 23 May 2001 - 03:44

Ok, i removed Billboard from my project and tried to get same effect ie having background as green color by calling SetColor(BACKGROUND,BK_SOLIDGREEN) in MyFunction which is attached with a custom control.
1. COntrol goes to this line of code but background color does not change
2. Also, about ShowWindow() in installscript, we want the focus on InstallWelcome dialog too (which is first dialog box) so what should i tie the custom control (which calls this function) with.

Pl help
i am stuck..
Pl note that if i remove billboard (which i have used only for its Background property) the focus pb is gone)..
there must be an easy way of doing this...


OKauhanen

OKauhanen
  • Members
  • 27 posts

Posted 23 May 2001 - 06:39

I'm afraid I can't help you with the focus problem after all. I got the first dialog to have focus when it appears, but all the dialogs after that don't have focus. It doesn't help very much, because the background images will be drawn over the dialogs if the dialogs don't have focus. It's VERY annoying.
I don't use billboards. To change the color of the background and the the background image I use code like this rather than billboards:

Enable( FULLWINDOWMODE );
SetColor(BACKGROUND,RGB (2, 40, 80));  
PlaceBitmap(szBmpDir,0,0,0, UPPER_LEFT);

You can also add this to the end if you like:
Enable(BACKGROUND);

This still doesn't fix the focus problem. Probably a bug in the MSI engine??????

I use an install wizard created with c++. I only use MSI for file copying so I don't have to worry if the MSI dialogs have focus.


nraina

nraina
  • Members
  • 30 posts

Posted 23 May 2001 - 16:55

So, does that mean that we cannot not have a background for our dialog boxes.

Btw, where do you write the script, i mean, you create a CustomAction and call all those functions but to which button (on which dialog box) will you tie the custom action..because we want the background right from beginning (on/before InstallWelcome dialog box appears).
ALso, on which verion of Installshield are you seeing this problem?

I am seeing couple of postings related to this topic.
I only wish that some Administrator would read our posting and verify if this is a bug in InstallShield (for InstallShield Professional Windows Installer Edition 2.0). That way we could close the topic and not waste more time and effort trying to find a work around.