Click here to Skip to main content
15,902,735 members
Home / Discussions / C#
   

C#

 
GeneralThe Infragistics Web Grid Big BIG problem Pin
Anonymous2-Sep-04 4:20
Anonymous2-Sep-04 4:20 
GeneralRe: The Infragistics Web Grid Big BIG problem Pin
Dave Kreskowiak2-Sep-04 5:50
mveDave Kreskowiak2-Sep-04 5:50 
GeneralDouble Buffering API Theme paint problem Pin
Tristan Rhodes2-Sep-04 1:52
Tristan Rhodes2-Sep-04 1:52 
GeneralRe: Double Buffering API Theme paint problem Pin
Werdna2-Sep-04 6:06
Werdna2-Sep-04 6:06 
GeneralRe: Double Buffering API Theme paint problem Pin
Tristan Rhodes2-Sep-04 8:59
Tristan Rhodes2-Sep-04 8:59 
Generalscroll bars in a picture box Pin
gijoebijoe2-Sep-04 1:30
gijoebijoe2-Sep-04 1:30 
GeneralRe: scroll bars in a picture box Pin
Sebastian Schneider2-Sep-04 2:27
Sebastian Schneider2-Sep-04 2:27 
GeneralRe: scroll bars in a picture box Pin
Sebastian Schneider2-Sep-04 2:37
Sebastian Schneider2-Sep-04 2:37 
Like this:

...

this.panel1.Controls.Add(this.pictureBox1);

...

this.pictureBox1.Size = new System.Drawing.Size(pictureBox1.Image.Width,
pictureBox1.Image.Height);

this.panel1.AutoScroll = true;

...

These are the important lines.

The first line will add "pictureBox1" to "panel1" (it is now inside the panel)

The second line will set the pictureBox1.Size to the size of the loaded image.

The third line adds "AutoScroll" to the panel.

As soon as the panel is smaller than the image of the picturebox within, Scrollbars will appear.

Cheers
Sebastian
GeneralMy images are gone (c#) Pin
adnanh752-Sep-04 0:42
adnanh752-Sep-04 0:42 
GeneralRe: My images are gone (c#) Pin
exhaulted2-Sep-04 1:47
exhaulted2-Sep-04 1:47 
GeneralRe: My images are gone (c#) Pin
adnanh752-Sep-04 1:53
adnanh752-Sep-04 1:53 
GeneralRe: My images are gone (c#) Pin
exhaulted2-Sep-04 3:38
exhaulted2-Sep-04 3:38 
GeneralRe: My images are gone (c#) Pin
mav.northwind2-Sep-04 3:46
mav.northwind2-Sep-04 3:46 
GeneralRe: My images are gone (c#) Pin
adnanh752-Sep-04 5:08
adnanh752-Sep-04 5:08 
GeneralRe: My images are gone (c#) Pin
exhaulted2-Sep-04 6:16
exhaulted2-Sep-04 6:16 
GeneralRe: My images are gone (c#) Pin
mav.northwind2-Sep-04 10:07
mav.northwind2-Sep-04 10:07 
GeneralChanging style of panel's scrollbar Pin
SaravananPV1-Sep-04 18:51
SaravananPV1-Sep-04 18:51 
QuestionHow to call an external .exe file from C# Pin
pavanarza11-Sep-04 18:25
pavanarza11-Sep-04 18:25 
AnswerRe: How to call an external .exe file from C# Pin
Corinna John1-Sep-04 19:32
Corinna John1-Sep-04 19:32 
Generalhelp. Web Service Pin
intrigued1-Sep-04 14:42
intrigued1-Sep-04 14:42 
GeneralRe: help. Web Service Pin
Heath Stewart1-Sep-04 15:39
protectorHeath Stewart1-Sep-04 15:39 
Generalhelp. Web Service Pin
intrigued1-Sep-04 14:42
intrigued1-Sep-04 14:42 
GeneralRe: help. Web Service Pin
Pradeep.S2-Sep-04 20:30
sussPradeep.S2-Sep-04 20:30 
GeneralZooming on bitmaps using C# coding Pin
gijoebijoe1-Sep-04 13:26
gijoebijoe1-Sep-04 13:26 
GeneralRe: Zooming on bitmaps using C# coding Pin
Christian Graus1-Sep-04 13:38
protectorChristian Graus1-Sep-04 13:38 

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.