Rebar dropdown with loading icon

Windows specific forum
User avatar
bbanelli
Enthusiast
Enthusiast
Posts: 543
Joined: Tue May 28, 2013 10:51 pm
Location: Europe
Contact:

Rebar dropdown with loading icon

Post by bbanelli »

Greetings to all,

I am aware that this search box is part of the rebar class, but is this entirely custom drawn part of Windows UI or can it be accessed somehow through API?

Image

I'm refering to "computing filters" part with rotating "loading" circle. It also contains "x" as a button.

Thanks in advance for any hints!

With my very best,

Bruno
"If you lie to the compiler, it will get its revenge."
Henry Spencer
https://www.pci-z.com/
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Rebar dropdown with loading icon

Post by RSBasic »

Would you like to have only the animate icon?
http://purebasic.fr/german/viewtopic.php?f=8&t=24780
(tested in Windows 7)

\\Edit:
Or you can import this png image from imageres.dll:
Image
Image
Image
User avatar
bbanelli
Enthusiast
Enthusiast
Posts: 543
Joined: Tue May 28, 2013 10:51 pm
Location: Europe
Contact:

Re: Rebar dropdown with loading icon

Post by bbanelli »

RSBasic wrote:Would you like to have only the animate icon?
Hi RSBasic,

thank you very much! This is exactly what I was searching for, everything else will be easy after that! :)

BTW, any reason why it isn't working in Windows 7+? Works great on XP, though...

With my very best,

Bruno
"If you lie to the compiler, it will get its revenge."
Henry Spencer
https://www.pci-z.com/
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Rebar dropdown with loading icon

Post by RSBasic »

If file "bthprops.cpl" exists:

Code: Select all

EnableExplicit

Define EventID
Define hanim
Define hshell

hshell = LoadLibrary_("bthprops.cpl")

If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  hanim = CreateWindowEx_(0, "SysAnimate32", "", #ACS_AUTOPLAY | #ACS_CENTER | #ACS_TRANSPARENT | #WS_CHILD | #WS_VISIBLE | #WS_CLIPCHILDREN | #WS_CLIPSIBLINGS, 10, 10, 280, 100, WindowID(0), 0, GetModuleHandle_(0), 0)
 
  SendMessage_(hanim, #ACM_OPEN, hshell, 140)
 
  Repeat
    EventID = WaitWindowEvent()
    If EventID = #PB_Event_CloseWindow
      FreeLibrary_(hshell)
      End
    EndIf
  ForEver
EndIf
(tested in Windows 10)
Image
Image
User avatar
bbanelli
Enthusiast
Enthusiast
Posts: 543
Joined: Tue May 28, 2013 10:51 pm
Location: Europe
Contact:

Re: Rebar dropdown with loading icon

Post by bbanelli »

It seems that pnpui.dll exist only in system32 on Windows 7, for example, which makes it unusable for 32 bit apps.

Your example with bthprops.cpl works like a charm, though! Shame it is missing in XP, and copying both W7 or W10 32bit version produces procedure entry point error in msvcrt.dll

In any case, since Microsoft doesn't support XP, users will have to live without that round animation! :)

Thank you once again for your help!

With my very best,

Bruno
"If you lie to the compiler, it will get its revenge."
Henry Spencer
https://www.pci-z.com/
Post Reply