Click here to Skip to main content
15,891,943 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to make points well -distributed ? Pin
Broken God28-May-04 20:17
Broken God28-May-04 20:17 
GeneralSNMP MIB : How to use it with C# Pin
youssef27-May-04 12:28
youssef27-May-04 12:28 
GeneralRe: SNMP MIB : How to use it with C# Pin
Dave Kreskowiak28-May-04 3:18
mveDave Kreskowiak28-May-04 3:18 
GeneralRe: SNMP MIB : How to use it with C# Pin
youssef28-May-04 3:42
youssef28-May-04 3:42 
GeneralRe: SNMP MIB : How to use it with C# Pin
Dave Kreskowiak28-May-04 3:48
mveDave Kreskowiak28-May-04 3:48 
GeneralRe: SNMP MIB : How to use it with C# Pin
youssef28-May-04 3:58
youssef28-May-04 3:58 
GeneralDock two forms Pin
Guinness4Strength27-May-04 11:41
Guinness4Strength27-May-04 11:41 
GeneralRe: Dock two forms Pin
Heath Stewart27-May-04 12:27
protectorHeath Stewart27-May-04 12:27 
Extend Form and override OnLocationChanged. Also add a property to the class of type Form that you set the Form to be docked.

In your implementation, get the Location of each Form (don't forget to check for null before accessing the other Form). Some simple math will tell you which side the other Form is in relation to this. If the Left + Width of the other form is, for example, within a certain threshhold of your current Form, then adjust the Location* of the other Form in relation to your current Form.Location.

* Don't forget that since Location (a Point) is a value type, you must create a new Point and set the Location. Setting Form.Location.X and/or Form.Location.Y will not move the other Form.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Dock two forms Pin
Guinness4Strength27-May-04 19:19
Guinness4Strength27-May-04 19:19 
GeneralRe: Dock two forms Pin
Dave Kreskowiak28-May-04 1:21
mveDave Kreskowiak28-May-04 1:21 
GeneralRe: Dock two forms Pin
Guinness4Strength28-May-04 3:16
Guinness4Strength28-May-04 3:16 
GeneralRe: Dock two forms Pin
Heath Stewart30-May-04 6:06
protectorHeath Stewart30-May-04 6:06 
GeneralRe: Dock two forms Pin
Guinness4Strength1-Jun-04 6:45
Guinness4Strength1-Jun-04 6:45 
GeneralRe: Dock two forms Pin
Heath Stewart1-Jun-04 6:50
protectorHeath Stewart1-Jun-04 6:50 
GeneralRe: Dock two forms Pin
Guinness4Strength1-Jun-04 7:09
Guinness4Strength1-Jun-04 7:09 
GeneralRe: Dock two forms Pin
Heath Stewart1-Jun-04 8:45
protectorHeath Stewart1-Jun-04 8:45 
GeneralOn-Screen Keyboard Pin
raki100427-May-04 11:03
raki100427-May-04 11:03 
GeneralVSPackage load failure after incorporating a PLK for the vspackage. Pin
ManSus27-May-04 10:38
ManSus27-May-04 10:38 
QuestionHow do I copy a file and display progress? Pin
Tony Archer27-May-04 10:35
Tony Archer27-May-04 10:35 
AnswerRe: How do I copy a file and display progress? Pin
Guinness4Strength27-May-04 11:42
Guinness4Strength27-May-04 11:42 
AnswerRe: How do I copy a file and display progress? Pin
Dave Kreskowiak27-May-04 11:43
mveDave Kreskowiak27-May-04 11:43 
GeneralRe: How do I copy a file and display progress? Pin
Jonathan Slenders28-May-04 0:28
Jonathan Slenders28-May-04 0:28 
GeneralRe: wsdl converter Pin
mjmcinto27-May-04 10:12
mjmcinto27-May-04 10:12 
GeneralDataTable.Select and Expressions Pin
rog103927-May-04 9:18
rog103927-May-04 9:18 
GeneralRe: DataTable.Select and Expressions Pin
Heath Stewart27-May-04 10:03
protectorHeath Stewart27-May-04 10:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.