Click here to Skip to main content
15,910,981 members
Home / Discussions / C#
   

C#

 
GeneralRe: Retieve currenlty logged user details Pin
Manju.K.J7-Sep-04 0:30
Manju.K.J7-Sep-04 0:30 
GeneralRe: Retieve currenlty logged user details Pin
Heath Stewart7-Sep-04 6:24
protectorHeath Stewart7-Sep-04 6:24 
GeneralRe: Retieve currenlty logged user details Pin
Manju.K.J13-Sep-04 1:27
Manju.K.J13-Sep-04 1:27 
QuestionTo Dock or not to Dock? Whether tis nobler to Anchor instead? Pin
Al Gardner6-Sep-04 3:28
Al Gardner6-Sep-04 3:28 
AnswerRe: To Dock or not to Dock? Whether tis nobler to Anchor instead? Pin
mav.northwind6-Sep-04 4:16
mav.northwind6-Sep-04 4:16 
AnswerRe: To Dock or not to Dock? Whether tis nobler to Anchor instead? Pin
Heath Stewart6-Sep-04 9:40
protectorHeath Stewart6-Sep-04 9:40 
GeneralAutoScroll Puzzle Pin
Paul Griffin6-Sep-04 3:08
Paul Griffin6-Sep-04 3:08 
GeneralRe: AutoScroll Puzzle Pin
Heath Stewart6-Sep-04 10:00
protectorHeath Stewart6-Sep-04 10:00 
Simple math and the ScrollableControl.AutoScrollPosition (inheritted by derivative classes like Panel). Just be sure to read the .NET Framework SDK documentation about when to use client- and screen-based coordinates (which can be easily converted using methods like Control.PointToClient and Control.PointToScreen).

If you have a ComboBox that is partly hidden and want to make sure that it's completely visible without scrolling it to the client point 0,0 for its container, find out how much is hidden and offset the current AutoScrollPosition by that amount:
int offset = comboBox1.Bottom - this.Height;
Point p = this.AutoScrollPosition;
p.X -= offset;
this.AutoScrollPosition = p;
This is only an example, but hopefully gives you some idea. Also, do not simple set AutoScrollPosition.X to something. A Point is a value type - not a reference type - and needs to be copied first before being modified. If you set AutoScrollPosition.X to some offset, you'll notice no change because a copy was made but never assigned to AutoScrollPosition again.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles]
GeneralRe: AutoScroll Puzzle Pin
Paul Griffin6-Sep-04 23:25
Paul Griffin6-Sep-04 23:25 
GeneralRe: AutoScroll Puzzle Pin
Heath Stewart7-Sep-04 6:27
protectorHeath Stewart7-Sep-04 6:27 
GeneralRe: AutoScroll Puzzle Pin
Paul Griffin7-Sep-04 6:38
Paul Griffin7-Sep-04 6:38 
GeneralRe: AutoScroll Puzzle Pin
Heath Stewart7-Sep-04 6:42
protectorHeath Stewart7-Sep-04 6:42 
GeneralRe: AutoScroll Puzzle Pin
Paul Griffin8-Sep-04 1:14
Paul Griffin8-Sep-04 1:14 
GeneralRe: AutoScroll Puzzle Pin
Paul Griffin7-Sep-04 6:46
Paul Griffin7-Sep-04 6:46 
Generalfind the shortest path between two mouse clicks Pin
caspernjk6-Sep-04 2:14
caspernjk6-Sep-04 2:14 
Generalfind the shortest path between two mouse clicks Pin
caspernjk6-Sep-04 2:07
caspernjk6-Sep-04 2:07 
GeneralRe: find the shortest path between two mouse clicks Pin
pxp6-Sep-04 3:54
pxp6-Sep-04 3:54 
GeneralSockets and threads! How to scale well :P (Part II) Pin
6-Sep-04 2:01
suss6-Sep-04 2:01 
GeneralRe: Sockets and threads! How to scale well :P (Part II) Pin
Heath Stewart6-Sep-04 9:53
protectorHeath Stewart6-Sep-04 9:53 
GeneralUsing COM classes Pin
_Magnus_6-Sep-04 1:58
_Magnus_6-Sep-04 1:58 
GeneralRe: Using COM classes Pin
mav.northwind6-Sep-04 2:21
mav.northwind6-Sep-04 2:21 
GeneralRe: Using COM classes Pin
_Magnus_6-Sep-04 2:30
_Magnus_6-Sep-04 2:30 
QuestionFile.Exists question? Pin
jzb6-Sep-04 1:03
jzb6-Sep-04 1:03 
AnswerRe: File.Exists question? Pin
Tom Larsen6-Sep-04 4:13
Tom Larsen6-Sep-04 4:13 
AnswerRe: File.Exists question? Pin
Heath Stewart6-Sep-04 9:43
protectorHeath Stewart6-Sep-04 9:43 

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.