Hide and show start button !

Windows specific forum
omid-xp
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Jan 27, 2004 2:17 pm

Hide and show start button !

Post by omid-xp »

I today work with this source file for hide start button but can't restore it again and must restart windows for restored it .

it code is :

Code: Select all


handle=FindWindow_("Shell_TrayWnd",0) 
If handle 
  handle=GetWindow_(handle,#GW_CHILD) 
  If handle 
    class$=Space(1024): 
    GetClassName_(handle,@class$,Len(class$)) 
    If Left(class$,Len(class$))="Button" 
      PostMessage_(handle,#WM_CLOSE,0,0) 
    EndIf 
  EndIf 
EndIf 


I know this code close button and can't restore it but i want know can i do this without #WM_CLOSE for just hide and show it again ?
PolyVector
Enthusiast
Enthusiast
Posts: 499
Joined: Wed Sep 17, 2003 9:17 pm
Location: Southern California
Contact:

Post by PolyVector »

Is this what you mean?
EDIT:

Code: Select all

handle=FindWindow_("Shell_TrayWnd",0) 
If handle 
  handle=GetWindow_(handle,#GW_CHILD) 
  If handle 
    class$=Space(1024): 
    GetClassName_(handle,@class$,Len(class$)) 
    If Left(class$,Len(class$))="Button" 
      ShowWindow_(handle,#SW_HIDE)
      Delay(2000)
      ShowWindow_(handle,#SW_SHOW)
    EndIf 
  EndIf 
EndIf 
Last edited by PolyVector on Tue May 11, 2004 7:35 pm, edited 1 time in total.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Hide and show start button !

Post by PB »

> I today work with this source file for hide start button but can't restore
> it again and must restart windows for restored it

PostMessage_(handle,#WM_CLOSE,0,0) will destroy (close) the window,
so it's no wonder you can't restore it -- it's gone, destroyed by you! :)

You need to use ShowWindow_(handle,#SW_HIDE) instead, as PolyVector
said, to hide the window. And call it with #SW_SHOW to show it again.
omid-xp
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Jan 27, 2004 2:17 pm

Post by omid-xp »

Thanks PolyVector , your source good work :wink:

Thanks PB for your help :D
dell_jockey
Enthusiast
Enthusiast
Posts: 767
Joined: Sat Jan 24, 2004 6:56 pm

Post by dell_jockey »

Omid,

am I far off when assuming that the above code snippet should take care of preventing your users (?) to start (and abort...) anything while your 'other stuff' gets executed?

Somehow, I can't shake of this shudder. Your questions are, well, peculiar.

I sincerely hope there's some sort of IP & access time logging on this forum....
cheers,
dell_jockey
________
http://blog.forex-trading-ideas.com
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Yes, all IPs are tracked on this forum (of course).
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

This kid has clearly been working on something I'm sure he or she thinks is great fun and "elite" but will cost some unsuspecting user time and money once they encounter it.

One of these days you'll figure out it is a lot harder to make good software than to make these silly trojans/virus/worms. Most of us here have every bit of knowledge to write something to wipe out hard drives with a single click but we choose to channel that energy and knowledge into something more constructive.

I urge you to do the same, omind-xp, before you wind up costing someone a lot of money and end up behind bars.
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Doobrey
Enthusiast
Enthusiast
Posts: 218
Joined: Sat Apr 26, 2003 4:47 am
Location: Dullsville..population: me
Contact:

Post by Doobrey »

Well, with any luck he`ll be stupid enough to test it on his own computer first and loose his source.. :twisted:
Then we`ll see a new post in the request forum asking for an InstallVirus() command... :roll:
fweil
Enthusiast
Enthusiast
Posts: 725
Joined: Thu Apr 22, 2004 5:56 pm
Location: France
Contact:

Post by fweil »

Does this forum have a recurrent function ?

viewtopic.php?t=10868
My avatar is a small copy of the 4x1.8m image I created and exposed at 'Le salon international du meuble à Paris' january 2004 in Matt Sindall's 'Shades' designers exhibition. The original laminated print was designed using a 150 dpi printout.
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

lol :lol:
omid-xp
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Jan 27, 2004 2:17 pm

Post by omid-xp »

Please read this :

viewtopic.php?p=57129#57129
Post Reply