Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default disable maximizebox in Excel Title bar



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

how can i?

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default disable maximizebox in Excel Title bar


"x taol" schreef in bericht
...


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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default disable maximizebox in Excel Title bar

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 ***
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default disable maximizebox in Excel Title bar

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 ***
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default disable maximizebox in Excel Title bar


"x taol" schreef in bericht
...
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.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default disable maximizebox in Excel Title bar



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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Title bar AG Excel Worksheet Functions 0 April 25th 07 03:54 PM
Named range=Column title,comumn title in cellB6 use B6in equation Graham Excel Discussion (Misc queries) 2 July 21st 06 10:03 AM
Show full path title in title bar? Nor New Users to Excel 4 November 4th 05 06:00 PM
Pasting Objects into Chart title and Axis title Sam Charts and Charting in Excel 1 June 6th 05 08:50 PM
Excel add-in set title? S. Daum Excel Programming 1 July 31st 03 05:32 PM


All times are GMT +1. The time now is 07:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"