Click here to Skip to main content
15,919,931 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to support right-click *on* WinForms context menu items? Pin
Nader Elshehabi20-Jul-06 22:40
Nader Elshehabi20-Jul-06 22:40 
QuestionMy ASP.NET 2.0 Web Pages do not run inside IIS Pin
tedhill1320-Jul-06 14:17
tedhill1320-Jul-06 14:17 
AnswerRe: My ASP.NET 2.0 Web Pages do not run inside IIS Pin
Andrei Ungureanu20-Jul-06 19:52
Andrei Ungureanu20-Jul-06 19:52 
GeneralRe: My ASP.NET 2.0 Web Pages do not run inside IIS Pin
tedhill1323-Jul-06 9:23
tedhill1323-Jul-06 9:23 
QuestionPictureBox in mdi form Pin
Saamir20-Jul-06 11:32
Saamir20-Jul-06 11:32 
AnswerRe: PictureBox in mdi form Pin
Ed.Poore20-Jul-06 12:50
Ed.Poore20-Jul-06 12:50 
QuestionRe: PictureBox in mdi form Pin
Saamir20-Jul-06 16:45
Saamir20-Jul-06 16:45 
AnswerRe: PictureBox in mdi form Pin
Ed.Poore20-Jul-06 21:07
Ed.Poore20-Jul-06 21:07 
Ok, of the two alternatives you can
  1. Set the Dock property of the PictureBox to DockStyle.Fill (or as in the properties window: Dock).  You can then set the BackgroundImage property of the PictureBox to what you want.  If you want it centred in the middle of the window then set the BackgroundImageLayout property to ImageLayout.Centre.
  2. Second method is more complex but basically if you handle the Resize event of the MdiForm.  Go into the code-window and start typing:
    protected override void OnResize...
    Then the designer should fill in the rest of the method for you.  This method is fired whenever the form is resized so in this you can perform some calculations to resize the PictureBox.  E.g. a simple example would be (simulating what happens when Dock is set to Fill):
protected override void OnResize(EventArgs e)
{
	pictureBox.Location = new Point(0, 0);
	pictureBox.Size = this.Size;
}
Hope that helps a bit.



The Welsh will always support two teams: The Welsh, and anyone playing England Smile | :)
Question.insert is inserting 2 entries instead of one... please help. Pin
jaman4dbz20-Jul-06 11:02
jaman4dbz20-Jul-06 11:02 
AnswerRe: .insert is inserting 2 entries instead of one... please help. Pin
Ed.Poore20-Jul-06 12:48
Ed.Poore20-Jul-06 12:48 
AnswerRe: .insert is inserting 2 entries instead of one... please help. Pin
Alexander Wiseman20-Jul-06 13:33
Alexander Wiseman20-Jul-06 13:33 
AnswerRe: .insert is inserting 2 entries instead of one... please help. Pin
jaman4dbz20-Jul-06 14:09
jaman4dbz20-Jul-06 14:09 
GeneralRe: .insert is inserting 2 entries instead of one... please help. Pin
Alexander Wiseman20-Jul-06 14:26
Alexander Wiseman20-Jul-06 14:26 
GeneralRe: .insert is inserting 2 entries instead of one... please help. Pin
jaman4dbz21-Jul-06 6:21
jaman4dbz21-Jul-06 6:21 
QuestionSecurity Permissions Pin
JuanAlbertoMD20-Jul-06 10:21
JuanAlbertoMD20-Jul-06 10:21 
QuestionAutomatic variable name incrementation [modified] Pin
The Big Bunny20-Jul-06 10:21
The Big Bunny20-Jul-06 10:21 
AnswerRe: Automatic variable name incrementation Pin
ankita patel20-Jul-06 11:00
ankita patel20-Jul-06 11:00 
AnswerRe: Automatic variable name incrementation Pin
led mike20-Jul-06 11:06
led mike20-Jul-06 11:06 
GeneralRe: Automatic variable name incrementation Pin
The Big Bunny21-Jul-06 8:51
The Big Bunny21-Jul-06 8:51 
Questionhelp file issue Pin
_tasleem20-Jul-06 9:42
_tasleem20-Jul-06 9:42 
AnswerRe: help file issue Pin
Ed.Poore20-Jul-06 12:41
Ed.Poore20-Jul-06 12:41 
GeneralRe: help file issue Pin
_tasleem21-Jul-06 1:06
_tasleem21-Jul-06 1:06 
GeneralRe: help file issue Pin
Ed.Poore21-Jul-06 12:09
Ed.Poore21-Jul-06 12:09 
GeneralRe: help file issue Pin
_tasleem21-Jul-06 20:30
_tasleem21-Jul-06 20:30 
QuestionDocumentation of DLL(.net) in design time Pin
mosquets20-Jul-06 9:16
mosquets20-Jul-06 9:16 

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.