User Tools

Site Tools


marquee_20style_20progress_20bar_20_28win_20xp_20and_20above_29

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

marquee_20style_20progress_20bar_20_28win_20xp_20and_20above_29 [2018/03/31 13:19]
127.0.0.1 external edit
marquee_20style_20progress_20bar_20_28win_20xp_20and_20above_29 [2018/04/15 19:09] (current)
tbest3112 Added syntax highlighting
Line 2: Line 2:
  
 //by Michael Hutton. May 2009//\\ \\  This style of progress bar is useful to show when you don't know the total time a process may take but you would like to inform the user something is going on. It requires Windows XP or above. See [[/​Marquee%20Style%20Progress%20Bar%20%28Win%20XP%20and%20above%29#​example|below]] for a full example program to copy into an IDE.\\ \\  You need WINLIB3 and some constants.\\ ​ //by Michael Hutton. May 2009//\\ \\  This style of progress bar is useful to show when you don't know the total time a process may take but you would like to inform the user something is going on. It requires Windows XP or above. See [[/​Marquee%20Style%20Progress%20Bar%20%28Win%20XP%20and%20above%29#​example|below]] for a full example program to copy into an IDE.\\ \\  You need WINLIB3 and some constants.\\ ​
 +<code bb4w>
   INSTALL @lib$ + "​WINLIB3"​   INSTALL @lib$ + "​WINLIB3"​
 +</​code>​ 
 +<code bb4w>
   PBS_MARQUEE = &8   PBS_MARQUEE = &8
   PBM_SETMARQUEE = 1034   PBM_SETMARQUEE = 1034
 +</​code>​
 Please note that these constants are not in the WINCONST utility database yet.\\ \\  Next, create and show the progress bar:​\\ ​ Please note that these constants are not in the WINCONST utility database yet.\\ \\  Next, create and show the progress bar:​\\ ​
 +<code bb4w>
   pb% = FN_createprogressbar(@hwnd%,​20,​200,​200,​20,​PBS_MARQUEE)   pb% = FN_createprogressbar(@hwnd%,​20,​200,​200,​20,​PBS_MARQUEE)
   PROC_showprogressbar(pb%,​100)   PROC_showprogressbar(pb%,​100)
 +</​code>​
 \\  To, start the animation of the prograss bar:​\\ ​ \\  To, start the animation of the prograss bar:​\\ ​
 +<code bb4w>
   SYS "​SendMessage",​ !pb%, PBM_SETMARQUEE,​ 1, 10   SYS "​SendMessage",​ !pb%, PBM_SETMARQUEE,​ 1, 10
 +</​code>​
 \\  where, !pb% is the handle to the progress bar, PBM_SETMARQUEE is the message, 1 is a Boolean (ie either 1 or 0) value to start and stop the animation, and 10 is an update time in milliseconds.\\ \\  You can now stop/start and change the speed of the progress bar anytime by sending the PBM_SETMARQUEE message.\\ \\  Don't forget to close the progress bar when you have finished with it.\\  \\  where, !pb% is the handle to the progress bar, PBM_SETMARQUEE is the message, 1 is a Boolean (ie either 1 or 0) value to start and stop the animation, and 10 is an update time in milliseconds.\\ \\  You can now stop/start and change the speed of the progress bar anytime by sending the PBM_SETMARQUEE message.\\ \\  Don't forget to close the progress bar when you have finished with it.\\ 
 +<code bb4w>
   PROC_removeprogressbar(pb%)   PROC_removeprogressbar(pb%)
 +</​code>​
 \\  Copy the code below into a new IDE:​\\ ​ \\  Copy the code below into a new IDE:​\\ ​
 +<code bb4w>
   REM Getting a MARQUEE Progress Bar   REM Getting a MARQUEE Progress Bar
   INSTALL @lib$ + "​WINLIB3"​   INSTALL @lib$ + "​WINLIB3"​
Line 62: Line 72:
  
   END   END
 +</​code>​
marquee_20style_20progress_20bar_20_28win_20xp_20and_20above_29.txt · Last modified: 2018/04/15 19:09 by tbest3112