Page 1 of 1

Hide and show start button !

Posted: Mon May 10, 2004 3:51 pm
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 ?

Posted: Mon May 10, 2004 7:36 pm
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 

Re: Hide and show start button !

Posted: Tue May 11, 2004 6:12 am
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.

Posted: Tue May 11, 2004 12:07 pm
by omid-xp
Thanks PolyVector , your source good work :wink:

Thanks PB for your help :D

Posted: Thu May 13, 2004 1:39 pm
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....

Posted: Thu May 13, 2004 5:51 pm
by Fred
Yes, all IPs are tracked on this forum (of course).

Posted: Thu May 13, 2004 9:09 pm
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.

Posted: Thu May 13, 2004 9:50 pm
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:

Posted: Thu May 13, 2004 11:02 pm
by fweil
Does this forum have a recurrent function ?

viewtopic.php?t=10868

Posted: Thu May 13, 2004 11:09 pm
by Dare2
lol :lol:

Posted: Fri May 14, 2004 12:44 am
by omid-xp
Please read this :

viewtopic.php?p=57129#57129