Click here to Skip to main content
15,895,557 members
Home / Discussions / C#
   

C#

 
GeneralRe: Sorted collection with alternate sort key Pin
originSH19-Jun-07 5:44
originSH19-Jun-07 5:44 
QuestionGrey Scale Image error?? Pin
Software_Specialist19-Jun-07 5:04
Software_Specialist19-Jun-07 5:04 
AnswerRe: Grey Scale Image error?? Pin
Giorgi Dalakishvili19-Jun-07 5:20
mentorGiorgi Dalakishvili19-Jun-07 5:20 
GeneralRe: Grey Scale Image error?? Pin
Software_Specialist19-Jun-07 5:30
Software_Specialist19-Jun-07 5:30 
GeneralRe: Grey Scale Image error?? Pin
Luc Pattyn19-Jun-07 5:40
sitebuilderLuc Pattyn19-Jun-07 5:40 
GeneralRe: Grey Scale Image error?? Pin
Software_Specialist19-Jun-07 5:57
Software_Specialist19-Jun-07 5:57 
GeneralRe: Grey Scale Image error?? Pin
Luc Pattyn19-Jun-07 6:08
sitebuilderLuc Pattyn19-Jun-07 6:08 
GeneralRe: Grey Scale Image error?? Pin
Software_Specialist21-Jun-07 4:46
Software_Specialist21-Jun-07 4:46 
ok now i know what you mean...

you mean to write as shown below:::

<br />
protected override void OnPaint (PaintEventArgs e)<br />
		{<br />
			Graphics g = e.Graphics;<br />
<br />
			g.DrawImage(m_Bitmap, new Rectangle(this.AutoScrollPosition.X, this.AutoScrollPosition.Y, (int)(m_Bitmap.Width*Zoom), (int)(m_Bitmap.Height * Zoom)));<br />
		}<br />


And for this i have to remove the picture box from the form. But i am writing an application for image viewer. i.e. Slide show and for that i need few of the image processing stuff..So for that i guess i need to have picture box ..

Moreover its not working out for me. I have just tried to load the picture with a following code

<br />
private void File_Load(object sender, System.EventArgs e)<br />
		{<br />
			OpenFileDialog openFileDialog = new OpenFileDialog();<br />
<br />
			openFileDialog.InitialDirectory = "c:\\" ;<br />
			openFileDialog.Filter = "Bitmap files (*.bmp)|*.bmp|Jpeg files (*.jpg)|*.jpg|All valid files (*.bmp/*.jpg)|*.bmp/*.jpg";<br />
			openFileDialog.FilterIndex = 2 ;<br />
			openFileDialog.RestoreDirectory = true ;<br />
<br />
			if(DialogResult.OK == openFileDialog.ShowDialog())<br />
			{<br />
				m_Bitmap = (Bitmap)Bitmap.FromFile(openFileDialog.FileName, false);<br />
				this.AutoScroll = true;<br />
				this.AutoScrollMinSize = new Size ((int)(m_Bitmap.Width * Zoom), (int)(m_Bitmap.Height * Zoom));<br />
				this.Invalidate();<br />
			}<br />
		}<br />


But it gives me a blinkin form..I mean photo is not stable. It comes and go off every msec...

Well i am referring http://www.codeproject.com/cs/media/csharpgraphicfilters11.asp

Any solution...???
Thanks
GeneralRe: Grey Scale Image error?? Pin
Luc Pattyn21-Jun-07 5:02
sitebuilderLuc Pattyn21-Jun-07 5:02 
GeneralRe: Grey Scale Image error?? Pin
Software_Specialist21-Jun-07 5:07
Software_Specialist21-Jun-07 5:07 
GeneralRe: Grey Scale Image error?? Pin
Luc Pattyn21-Jun-07 5:22
sitebuilderLuc Pattyn21-Jun-07 5:22 
GeneralRe: Grey Scale Image error?? Pin
Software_Specialist21-Jun-07 5:30
Software_Specialist21-Jun-07 5:30 
GeneralRe: Grey Scale Image error?? Pin
Luc Pattyn21-Jun-07 5:48
sitebuilderLuc Pattyn21-Jun-07 5:48 
GeneralRe: Grey Scale Image error?? Pin
Software_Specialist21-Jun-07 6:26
Software_Specialist21-Jun-07 6:26 
GeneralRe: Grey Scale Image error?? Pin
Amar Chaudhary19-Jun-07 6:25
Amar Chaudhary19-Jun-07 6:25 
QuestionAdding event handler to custom control Pin
berghain19-Jun-07 4:56
berghain19-Jun-07 4:56 
AnswerRe: Adding event handler to custom control Pin
Manas Bhardwaj19-Jun-07 5:03
professionalManas Bhardwaj19-Jun-07 5:03 
QuestionAvoid trailing while dragging control Pin
sinosoidal19-Jun-07 4:49
sinosoidal19-Jun-07 4:49 
AnswerRe: Avoid trailing while dragging control Pin
Alaric_19-Jun-07 5:08
professionalAlaric_19-Jun-07 5:08 
GeneralRe: Avoid trailing while dragging control Pin
sinosoidal19-Jun-07 5:10
sinosoidal19-Jun-07 5:10 
GeneralRe: Avoid trailing while dragging control Pin
Alaric_19-Jun-07 9:14
professionalAlaric_19-Jun-07 9:14 
GeneralRe: Avoid trailing while dragging control Pin
Alaric_19-Jun-07 9:14
professionalAlaric_19-Jun-07 9:14 
Question3D cube Pin
Noharyiasa19-Jun-07 4:03
Noharyiasa19-Jun-07 4:03 
AnswerRe: 3D cube Pin
Alaric_19-Jun-07 4:09
professionalAlaric_19-Jun-07 4:09 
GeneralRe: 3D cube Pin
Noharyiasa19-Jun-07 4:16
Noharyiasa19-Jun-07 4: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.