Set working area, anyone please?

Hi,

See this thread.>>

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1116884&SiteID=1&mode=1

I was wondering if it's possible to SET the working area

at all please?

Regards,

S_DS

[498 byte] By [Spidermans_DarkSide] at [2007-12-28]
# 1

The following is a macro that uses the environment event "OnSTartupCompleted" to set the screen location...this sample sets the main VS window to the bounds of the primary screen...you can set MyScreen to which ever screen you want



Option
Strict Off
Option
Explicit Off
Imports
System

Imports EnvDTE

Imports EnvDTE80

Imports System.Diagnostics

Imports System.Windows.forms

Imports System.Drawing

Public Module EnvironmentEvents
#
Region "Automatically generated code, do not modify"

'Automatically generated code, do not modify
'Event Sources Begin

<System.ContextStaticAttribute()> Public WithEvents DTEEvents As EnvDTE.DTEEvents
<System.ContextStaticAttribute()>
Public WithEvents DocumentEvents As EnvDTE.DocumentEvents
<System.ContextStaticAttribute()>
Public WithEvents WindowEvents As EnvDTE.WindowEvents
<System.ContextStaticAttribute()>
Public WithEvents TaskListEvents As EnvDTE.TaskListEvents
<System.ContextStaticAttribute()>
Public WithEvents FindEvents As EnvDTE.FindEvents
<System.ContextStaticAttribute()>
Public WithEvents OutputWindowEvents As EnvDTE.OutputWindowEvents
<System.ContextStaticAttribute()>
Public WithEvents SelectionEvents As EnvDTE.SelectionEvents
<System.ContextStaticAttribute()>
Public WithEvents SolutionItemsEvents As EnvDTE.ProjectItemsEvents
<System.ContextStaticAttribute()>
Public WithEvents MiscFilesEvents As EnvDTE.ProjectItemsEvents
<System.ContextStaticAttribute()>
Public WithEvents DebuggerEvents As EnvDTE.DebuggerEvents

'Event Sources End
'End of automatically generated code

#End Region

Public Sub SetScreen()
Dim MyScreen As Screen = Screen.PrimaryScreen
Dim rect As Rectangle = MyScreen.Bounds
DTE.MainWindow.Left = rect.Left
DTE.MainWindow.Top = rect.Top

DTE.MainWindow.Height = rect.Height
DTE.MainWindow.Width = rect.Width

End Sub

Private Sub DTEEvents_OnStartupComplete() Handles DTEEvents.OnStartupComplete
SetScreen()
End Sub
End
Module

DMan1 at 2007-9-4 > top of Msdn Tech,Visual Basic,Visual Basic IDE...