PDA

View Full Version : Window State



n8wex
2009-09-20, 04:09 AM
Is there a way of making all windows Maximized so there is now flicker when cycling through document windows?

I've tried to set all active docs windows but they dont stay Maximized



Private Sub MaxWindows()
Dim objDocs As DocumentCollection = AC_App.DocumentManager

For Each objDoc As Document In objDocs
If Not objDoc.Window.WindowState = Window.State.Maximized Then
ActiveDoc = objDoc
ActiveDoc.Window.WindowState = Window.State.Maximized
End If
Next
End Sub

n8wex
2009-09-21, 03:09 PM
Thanks will look into this may be able to use this http://www.codeproject.com/KB/bugs/MgdMDIClientActivation.aspx?msg=3120888

n8wex
2009-09-22, 12:50 PM
Tony can u share your implementation? understand if you cant. Thanks for your help!

n8wex
2009-09-26, 08:19 PM
Thats cool I'll have a go sometime soon cheers anyways.

n8wex
2009-09-27, 02:50 PM
If you're switching documents programmatically, you can avoid the flicker by sending a WM_MDINEXT window message to the document that preceeds the one you want to activate, but doing that is non-trivial.

Tony this is over my head but I have tried the following and still get the flicker

documents are already opened



Imports System.Runtime.InteropServices

<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
Private Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal Msg As UInteger, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As IntPtr
End Function

...

SendMessage(objDoc.Window.Handle, WM_MDINEXT, ActiveDoc.Window.Handle, 0)

ActiveDoc = objDoc

n8wex
2009-09-29, 02:12 PM
Ok I will I'm just confused as the article is related to forms and controls not autocad windows... Ill play around. Im getting there tho my app is getting better everyday. cheers.