transparent window

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • mgokkaya
    No longer a forum member
    • Apr 2006
    • 191

    transparent window

    how can i use this slider for transparency of window ???



    i need an example please !!!!
  • Worm
    Indigo Rose Customer
    • Jul 2002
    • 3971

    #2


    This one uses the slider plugin, but all you need to do is used the code in the slider in the custom event of the slider framework.

    Comment

    • mgokkaya
      No longer a forum member
      • Apr 2006
      • 191

      #3
      I Have That One But I Want To Use The Other One...
      I Tried But I Couldnt Manage It

      Comment

      • Worm
        Indigo Rose Customer
        • Jul 2002
        • 3971

        #4
        here's a start
        Attached Files

        Comment

        • mgokkaya
          No longer a forum member
          • Apr 2006
          • 191

          #5
          I Tried That But When I Touch The Slider It Disappears
          Attached Files

          Comment

          • TristanD
            Forum Member
            • Oct 2006
            • 314

            #6
            HINT: try not to make the window fully transparent as you will not be able to open see it anymore (so you cant close it)

            Comment

            • mgokkaya
              No longer a forum member
              • Apr 2006
              • 191

              #7
              Originally posted by TristanD View Post
              HINT: try not to make the window fully transparent as you will not be able to open see it anymore (so you cant close it)
              can i find a way to make people not to make fully transparent ???

              Comment

              • Worm
                Indigo Rose Customer
                • Jul 2002
                • 3971

                #8
                Couple things...

                If you are using a horizontal slider with the SliderFrameWork, the image names need to start with hslider_ and hknob_. If the slider is vertical, then it needs to start with vslider_ and vknob_.

                You were using a horizontal image set with the naming convention of a vertical slider, therefore the slider was moving up and down, not across, so it didn't take much to go from 0 to 100%. So change the image names to hknob_Opacity and hslider_Opacity.

                Also, the way the SliderFrameWork works is that 0 is at the left for horizontal and top for vertical. To start the slider knob on the left in this case, the Custom Event needs to be like this instead
                Code:
                -- Custom event 
                function On_Slider_Move(sCurrentSlider, nPercent)
                	--  use this event to make change the values the slider
                	-- is related too
                	if sCurrentSlider == "hknob_Opacity" then
                		sOS=String.Right(System.GetOSName(),2);
                		if (sOS == "XP" ) or (sOS == "00") or (sOS == "03") then
                			handle = Application.GetWndHandle();
                			nOpacity = Math.Floor(255 * (nPercent/100))
                			--makes the slider work in reverse
                			nOpacity = 255 - nOpacity
                			result = DLL.CallFunction("AutoPlay\\Docs\\wTrans.dll", "SetWindowTransparency", handle..","..nOpacity, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
                		end	
                	end
                end

                Comment

                • mgokkaya
                  No longer a forum member
                  • Apr 2006
                  • 191

                  #9
                  i dont want users make fully transparent so is there anyway to do it ???

                  Comment

                  • mgokkaya
                    No longer a forum member
                    • Apr 2006
                    • 191

                    #10
                    i found it WORM
                    thanks alot

                    Comment

                    • mgokkaya
                      No longer a forum member
                      • Apr 2006
                      • 191

                      #11
                      an other error is;

                      WHEN I TOUCH THE SLIDER WINDOW GOES BLACK AND THEN TURNS THE NORMAL...

                      HOW CAN I FIX IT ???

                      Comment

                      • Worm
                        Indigo Rose Customer
                        • Jul 2002
                        • 3971

                        #12
                        To make it so the window doesn't go completely transparent, I'd do this.

                        Code:
                        -- Custom event 
                        function On_Slider_Move(sCurrentSlider, nPercent)
                        	--  use this event to make change the values the slider
                        	-- is related too
                        	if sCurrentSlider == "hknob_Opacity" then
                        		sOS=String.Right(System.GetOSName(),2);
                        		if (sOS == "XP" ) or (sOS == "00") or (sOS == "03") then
                        			handle = Application.GetWndHandle();
                        			nOpacity = Math.Floor(220 * (nPercent/100))
                        			--makes the slider work in reverse
                        			nOpacity = 220 - nOpacity
                        			result = DLL.CallFunction("AutoPlay\\Docs\\wTrans.dll", "SetWindowTransparency", handle..","..nOpacity, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
                        		end	
                        	end
                        end
                        As for the brief window glitch. I don't know...

                        Comment

                        • mgokkaya
                          No longer a forum member
                          • Apr 2006
                          • 191

                          #13
                          Code:
                          -- Custom event 
                          function On_Slider_Move(sCurrentSlider, nPercent)
                          	--  use this event to make change the values the slider
                          	-- is related too
                          	if sCurrentSlider == "hknob_Opacity" then
                          		sOS=String.Right(System.GetOSName(),2);
                          		if (sOS == "XP" ) or (sOS == "00") or (sOS == "03") then
                          			handle = Application.GetWndHandle();
                          			nOpacity = Math.Floor(255 * (nPercent/180))
                          			--makes the slider work in reverse
                          			nOpacity = 255 - nOpacity
                          			result = DLL.CallFunction("AutoPlay\\Docs\\wTrans.dll", "SetWindowTransparency", handle..","..nOpacity, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
                          		end	
                          	end
                          end
                          thats what i did and it worked perfect

                          Comment

                          • mgokkaya
                            No longer a forum member
                            • Apr 2006
                            • 191

                            #14
                            but when i transparent the window and maximize the window the slider goes to the begining but it is still transparent

                            Comment

                            • Worm
                              Indigo Rose Customer
                              • Jul 2002
                              • 3971

                              #15
                              The code posted for resizing doesn't take into account that an object may move. The knob is moved back to the original position, because that where the resize code initially saw it. You either need to reset the tblOriginalPositions info for the slide, or handle it manually. The custom event is only fired if you manually move the slide. The on resize code moves it via code, so you too will have to fire that event via code.

                              Comment

                              Working...
                              X