Announcement

Collapse
No announcement yet.

Wallpaper

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wallpaper

    How to change the wallpaper when pressed the button ??
    Like no need to restart i read a tutorial about wallpaper changing but it needs restart . Is it possible to change the wallpaper without needed restart ? Thanks

  • #2
    Re: Wallpaper

    Make a call to the USER32.DLLs SystemParametersInfoA function:

    %DLLResult% = File.CallDLLFunction ( "%SysDir%\User32.dll", "SystemParametersInfoA", "20,0,"C:\WINNT\FeatherTexture.bmp",1")


    Comment


    • #3
      Re: Wallpaper

      Worm : You re very good . Thanks for ur all help . This world needs more people like u [img]/ubbthreads/images/icons/smile.gif[/img] See you later. Thanks...

      Comment


      • #4
        Re: Wallpaper

        Nice tip Worm, very nice...

        Corey Milner
        Creative Director, Indigo Rose Software

        Comment


        • #5
          Re: Wallpaper

          Am I understanding this correctly?

          Dll being called: SysDir%\User32.dll

          Function within the Dll that is being called: SystemParametersInfoA

          Information passed to the function 20,0,"C:\WINNT\FeatherTexture.bmp",1

          What are these three things?

          20,0 - Looks like a desktop reference like what would be used in UNIX
          C:\WINNT\FeatherTexture.bmp - file you want to set your desktop to
          1 - no idea what this information is

          If you have a site that would give this info, I would be interested.
          TJ-Tigger
          "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
          "Draco dormiens nunquam titillandus."
          Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

          Comment


          • #6
            Re: Wallpaper

            Here ya go Tig.

            http://www.mentalis.org/apilist/Syst...tersInfo.shtml

            Comment


            • #7
              Re: Wallpaper

              So if I read this right these are the four parameters?

              ByVal uAction As Long - 20
              ByVal uParam As Long - 0
              ByVal lpvParam As Any - "bitmap you want to use"
              ByVal fuWinIni As Long - 1

              I will continue to look, but do they defind the above functions?

              Thanks
              TJ-Tigger
              "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
              "Draco dormiens nunquam titillandus."
              Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

              Comment


              • #8
                Re: Wallpaper

                Worm : Brother can u make a example project for this one too ?? Thanks for all
                cya

                Comment


                • #9
                  Re: Wallpaper

                  Here you go; my brother from another mother.

                  Download

                  Comment


                  • #10
                    Re: Wallpaper

                    This is the first time I've used the function. I knew it was possible from some sample VB projects I've seen. I haven't really looked past getting it to work to figure out what parameter do what. Which parameter doesn't make sense?

                    Comment


                    • #11
                      Re: Wallpaper

                      Hey Worm just so you know you can edit posts again, we turned it back on lately... I think it's within 15 min or something like that...

                      Corey Milner
                      Creative Director, Indigo Rose Software

                      Comment


                      • #12
                        Re: Wallpaper

                        Thanks, my brain can definitely go faster than my fingers, and it helps to let them catch up [img]/ubbthreads/images/icons/smile.gif[/img]. 15 minutes should be about enough time. Depending, of course, on how much caffeine I've had. [img]/ubbthreads/images/icons/smile.gif[/img]

                        Comment


                        • #13
                          Re: Wallpaper

                          The 20 tells the function that you are wanting to set the Desktop Wallpaper.

                          Then the filename as you suggested

                          The 1 is to tell Windows to update the INI file, if you set it to 0, it wouldn't

                          At least thats my interpretation.

                          Comment


                          • #14
                            Re: Wallpaper

                            Worm Brother : Tnx for ur project and whole work . But this project don't support *. jpg Media Player gives error . And i can't convert jpg-to-bmp cause BMP istoo many MB . I need just the button like when i click it load the image and set the wallpaper . How to do smt. like that ? Thnks

                            Comment


                            • #15
                              Re: Wallpaper

                              You won't be able to use .jpg files on the desktop unless ActiveDirectory is enabled, and even then I'm not sure if that DLL will be able to perform the switch. (That functionality depends on IE to some extent.)

                              You could perhaps convert the jpgs to bmps at run time...there are probably a few free command line image conversion programs out there that you could use.
                              --[[ Indigo Rose Software Developer ]]

                              Comment

                              Working...
                              X
                              😀
                              🥰
                              🤢
                              😎
                              😡
                              👍
                              👎