Archive: How to add background images in UltraModern UI ?


How to add background images in UltraModern UI ?
  hi,
i like to create installer with changing background images, like what we seen while installing the games, Using UltramodernUI without side image and i don't like that much size of window while installing files, during the installation window show contain one progress bar with file installation details.

i refereed UMUI help file, able to use Custom bg but i want to position the image as default size 800 x 600 in screen center and the background color should be black, how can i do that.

i hope explained everything clearly.:D


No reply means no one understand my question?

Ok this is the script i using

;Background Image
!macro UMUI_BG
SetOutPath "$PLUGINSDIR"
File "C:\Users\AnandhaRaja\Desktop\MY Program\BackGround.bmp"
BgImage::SetBg /NOUNLOAD /GRADIENT 00 000 000 00 000 000
BgImage::AddImage /NOUNLOAD "$PLUGINSDIR\BackGround.bmp" 200 150
CreateFont $1 "Verdana" 30 700
BgImage::AddText /NOUNLOAD "$(^Name)" $1 255 255 255 10 65 -1 -1
BgImage::Redraw /NOUNLOAD
!macroend

!macro UMUI_BG_Destroy
BgImage:: Destroy
!macroend

;_--------------------------------------

everything is ok but i want to position the 1024 X 768 image in center of the screen in all resolution. and during the installation the window should be small and want to position in bottom of the screen.
hope now you understand my problem.

I do not see any problem: if these lines


BgImage::SetBg /NOUNLOAD /GRADIENT 00 000 000 00 000 000

BgImage
::AddImage /NOUNLOAD "$PLUGINSDIR\BackGround.bmp" 200 150
>
are working for you fine then why for 1024*768 px picture they should not?

If you need a little clue for all steps, here you are:
Simply calculate each image position (X, Y) based on image dimensions and screen resolution.
Create simple timer (running in separated thread) which will pick one image (by random or as sequence 1-2-3-...) and simply show it using BgImage plug-in.
Move main window to the right-lower corner (I would use this simple function: http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx)
If you want to change dimensions of NSIS window then simply modify UI .exe file using ResHacker (or do it programatically) - there may be a little problem if you want to have exactly the same kind of progress bar window like InstallShield - based on your decision.

And that is all. As easy as pie.
We cannot wrote whole code/installer for you! :)

Thanks T.Slappy for your reply

Yes, i want create window like installshield during installation. my screen resolution is 1920 X 1080 but the background image is 1024 x 768 size, so want to position the image in center of the screen what ever may be the resolution, is possible?

ThankYou


hi,
i want the change installation window size of UMUI using resource hacker, which dialog i want to modify and the rest of the windows size is same.


This is the tricky part:
you can change UI file for whole installer but not for separated page.
So I suggest to use default UI and when installation begins [executing Sections] then hide whole installer and show window with progress bar - which will be created with simple plug-in.