Jump to content



Photo

GUICtrlCreateProgress styles with win7 ?


  • Please log in to reply
4 replies to this topic

#1 tobi95

tobi95

    Seeker

  • Active Members
  • 16 posts

Posted 16 April 2012 - 09:08 PM

when i create a progress control in default style, i get a segmented bar in win xp. in win7 it is always smooth. $PBS_VERTICAL style works with win7, and i get a marquee effect with style=8. but is it possible to get the original progress bar with segments in win7 ?

thx in advance t.

(example script is the SampleControls.au3 in autoit examples directory)

Posted Image

Edited by tobi95, 16 April 2012 - 09:12 PM.








#2 BrewManNH

BrewManNH

    באָבקעס מיט קודוצ׳ה

  • MVPs
  • 6,877 posts

Posted 16 April 2012 - 10:36 PM

You may have to turn off theme support for the progressbar control:
Func _ControlSetTheme($iControl = -1)     Local $aReturn = DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($iControl), "wstr", 0, "wstr", 0)     If @error Then Return SetError(1, 1, 0)     Return $aReturn[0] EndFunc   ;==>_ControlSetTheme

Or, you may have to make sure that you're not using the $PBS_SMOOTH variable for style parameter.

How to ask questions the smart way!

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.

Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.

_FileGetProperty - Retrieve the properties of a file SciTE Toolbar - A toolbar demo for use with the SciTE editorGUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.

GUIToolTip UDF Demo - Demo script to show how to use the GUIToolTip UDF to create and use customized tooltips.

Posted Image


#3 tobi95

tobi95

    Seeker

  • Active Members
  • 16 posts

Posted 16 April 2012 - 10:49 PM

hmm thanx but no ;) doesn't change anything.

the uxthemes have to be turned off in winxp to enable a smooth ($PBS_SMOOTH) progress bar.

but i want a segmented progress bar (default style) in win7. i do not use $PBS_SMOOTH style. it seems win7 always draws smooth bars.

#4 BrewManNH

BrewManNH

    באָבקעס מיט קודוצ׳ה

  • MVPs
  • 6,877 posts

Posted 16 April 2012 - 11:13 PM

I don't think you can do it without some kind of user made version of the progress bar, the native Vista/7 progress bar doesn't seem to allow that without changing the theme, i.e. skinning the GUI.

How to ask questions the smart way!

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.

Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.

_FileGetProperty - Retrieve the properties of a file SciTE Toolbar - A toolbar demo for use with the SciTE editorGUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.

GUIToolTip UDF Demo - Demo script to show how to use the GUIToolTip UDF to create and use customized tooltips.

Posted Image


#5 tobi95

tobi95

    Seeker

  • Active Members
  • 16 posts

Posted 16 April 2012 - 11:22 PM

yes, this is true. it's not so complicated to create a selfmade segmented one. ;) good idea.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users