hide Notepad's menubar

Just starting out? Need help? Post your questions and find answers here.
User avatar
Alireza
Enthusiast
Enthusiast
Posts: 143
Joined: Sat Aug 16, 2008 2:02 pm
Location: Iran

hide Notepad's menubar

Post by Alireza »

Is there a way for hide Notepad's menubar?
i think in first, i get a handle of menu bar :?:

Code: Select all

RunProgram("Notepad.exe")
Delay(150)
hwnd = FindWindow_(#Null, "Untitled - Notepad") ;
If hwnd
   ShowWindow_(GetMenu_(hwnd), #SW_HIDE)
Else
  Debug "Notepad not found!"
EndIf

PB v 5.6 :D
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4946
Joined: Sun Apr 12, 2009 6:27 am

Re: hide Notepad's menubar

Post by RASHAD »

Alireza Hi
Very strange request
But......

Code: Select all

RunProgram("Notepad.exe")
Delay(150)
hwnd = FindWindow_(#Null, "Untitled - Notepad")
SetMenu_(hwnd,0)
Egypt my love
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: hide Notepad's menubar

Post by MachineCode »

And note that it won't disable the keyboard shortcuts for the removed menu items.
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
User avatar
Alireza
Enthusiast
Enthusiast
Posts: 143
Joined: Sat Aug 16, 2008 2:02 pm
Location: Iran

Re: hide Notepad's menubar

Post by Alireza »

Thank u my friends :D very gooooooooooooooood
PB v 5.6 :D
Post Reply