PC Review


Reply
Thread Tools Rate Thread

disable maximizebox in Excel Title bar

 
 
x taol
Guest
Posts: n/a
 
      7th Oct 2006


i want to disable the maximizebox of top,right of Excel application
title bar.

how can i?

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
moon
Guest
Posts: n/a
 
      7th Oct 2006

"x taol" <(E-Mail Removed)> schreef in bericht
news:e$O%(E-Mail Removed)...
>
>
> i want to disable the maximizebox of top,right of Excel application
> title bar.
>
> how can i?
>
> *** Sent via Developersdex http://www.developersdex.com ***



Use the windows API:

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _
(ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _
(ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As
Long

Public Sub DisableMaximizeButton()
Dim hWnd As Long
Dim hWndStyle As Long
hWnd = FindWindow("XLMAIN", Application.Caption)
hWndStyle = GetWindowLong(hWnd, -16)
hWndStyle = hWndStyle And Not &H10000
SetWindowLong hWnd, -16, hWndStyle
End Sub



 
Reply With Quote
 
x taol
Guest
Posts: n/a
 
      7th Oct 2006
Thank you very much moon.... but the big problem occured.
After the excel minimize, do the excel up again. and then the excel
enter down windows taskbar.

oooooo. please....



*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
x taol
Guest
Posts: n/a
 
      7th Oct 2006
Thank you very much moon.... but the big problem occured.
After the excel minimize, do the excel up again. and then the excel
enter down windows taskbar.

oooooo. please....



*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
moon
Guest
Posts: n/a
 
      7th Oct 2006

"x taol" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed)...
> Thank you very much moon.... but the big problem occured.
> After the excel minimize, do the excel up again. and then the excel
> enter down windows taskbar.
>
> oooooo. please....
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***



I don't have that problem here, here it works just fine. But you can switch
back to normal, using:

hWndStyle = hWndStyle Or &H10000


The only thing is that I first have to move my mouse over the titlebar
before the MaximizeBox appears or disappears, even after a setfocus.


 
Reply With Quote
 
x taol
Guest
Posts: n/a
 
      8th Oct 2006


no good. it doesn't work.
i want to work well.
my wanting is that the maximizebox disable and minimize and restore(up)
again and then the excel window be to appear normaly.
abnormaly, after minimize the excel window, the window enter down
windows taskbar, like full screen.

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MDIChild forms maximizebox. [ F e r n a n d o L o p e s ] Microsoft Dot NET Framework Forms 4 16th Dec 2004 10:03 AM
this.MaximizeBox (enable/ disable) Tim Bücker Microsoft C# .NET 1 29th Oct 2004 11:49 AM
MDI Child MaximizeBox, MinimizeBox Dishan Microsoft C# .NET 0 2nd Jan 2004 05:57 AM
Disable Title Bar Buttons... Johnathan Morlock Microsoft Windows 2000 0 19th Dec 2003 07:43 PM
Disable the Web site Description in the Title bar of IE jon Windows XP Internet Explorer 1 4th Oct 2003 02:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:45 AM.