Click here to Skip to main content
15,918,706 members
Home / Discussions / Windows Forms
   

Windows Forms

 
QuestionEncoding Mp3 File while uploading to FTP Server Pin
catchcnu22-Jun-08 22:01
catchcnu22-Jun-08 22:01 
Questionmodifying scroll box controls using compact framework SDK Pin
neilfed222-Jun-08 9:15
neilfed222-Jun-08 9:15 
GeneralComboBox in DataGridView Pin
Brady Kelly22-Jun-08 6:16
Brady Kelly22-Jun-08 6:16 
GeneralRe: ComboBox in DataGridView Pin
John_Adams23-Jun-08 4:22
John_Adams23-Jun-08 4:22 
QuestionOpen a windows form one project in other project Pin
C4ao521-Jun-08 7:40
C4ao521-Jun-08 7:40 
AnswerRe: Open a windows form one project in other project Pin
Christian Graus21-Jun-08 15:40
protectorChristian Graus21-Jun-08 15:40 
GeneralRe: Open a windows form one project in other project Pin
C4ao522-Jun-08 0:35
C4ao522-Jun-08 0:35 
QuestionHow to stop updating a PictureBox? [modified] Pin
MichaelCoder20-Jun-08 10:18
MichaelCoder20-Jun-08 10:18 
Hi...,

I want to write a zoom function for a PictureBox. Therefore I have to change some values (Left, Top, Width, and Height) of the PictureBox. The PictureBox is redrawn, when I just change one of theses values. So, when I change all 4 values the PictureBox gets flickering and jumping around.

How to stop/activate the Redrawing of a PictureBox.

This is my code:

private void CalcPictureBox1()
{
  // NEED: deactivate pictureBox, that no changes update PictureBox

  int zoomedWidth = (int)(bitmapDepthBuffer.Width * pBoxZoomFactor);
  int zoomedHeight = (int)(bitmapDepthBuffer.Height * pBoxZoomFactor);
  if (zoomedWidth > panelDepthBuffer.Width)
  {
    this.pBoxDepthBuffer.Left = 0;
  }
  else
  {
    this.pBoxDepthBuffer.Left = (panelDepthBuffer.Width - zoomedWidth) / 2;
  }
  if (zoomedHeight > panelDepthBuffer.Height)
  {
    this.pBoxDepthBuffer.Top = 0;
  }
  else
  {
    this.pBoxDepthBuffer.Top = (panelDepthBuffer.Height - zoomedHeight) / 2;
  }
  this.pBoxDepthBuffer.Width = zoomedWidth;
  this.pBoxDepthBuffer.Height = zoomedHeight;

  // NEED: activate pictureBox, that changes update PictureBox

}


Thank you in advance,

Michael

modified on Friday, June 20, 2008 4:33 PM

AnswerRe: How to stop updating a PictureBox? Pin
Matthew Butler21-Jun-08 3:14
Matthew Butler21-Jun-08 3:14 
GeneralRe: How to stop updating a PictureBox? Pin
MichaelCoder21-Jun-08 4:05
MichaelCoder21-Jun-08 4:05 
GeneralRe: How to stop updating a PictureBox? Pin
MichaelCoder21-Jun-08 5:28
MichaelCoder21-Jun-08 5:28 
AnswerRe: How to stop updating a PictureBox? Pin
Christian Graus21-Jun-08 12:39
protectorChristian Graus21-Jun-08 12:39 
GeneralCustom Combobox Pin
Brady Kelly20-Jun-08 5:30
Brady Kelly20-Jun-08 5:30 
GeneralRe: Custom Combobox Pin
Jaime Olivares20-Jun-08 12:17
Jaime Olivares20-Jun-08 12:17 
GeneralRe: Custom Combobox Pin
Thomas Stockwell23-Jun-08 15:28
professionalThomas Stockwell23-Jun-08 15:28 
QuestionConvert docx to PDF Pin
dhananjayamurthy20-Jun-08 0:30
dhananjayamurthy20-Jun-08 0:30 
AnswerRe: Convert docx to PDF Pin
Ashfield20-Jun-08 1:18
Ashfield20-Jun-08 1:18 
GeneralRe: Convert docx to PDF Pin
dhananjayamurthy20-Jun-08 3:34
dhananjayamurthy20-Jun-08 3:34 
GeneralRe: Convert docx to PDF Pin
Ashfield20-Jun-08 8:40
Ashfield20-Jun-08 8:40 
GeneralEditable Combobox Pin
Brady Kelly19-Jun-08 23:25
Brady Kelly19-Jun-08 23:25 
GeneralRe: Editable Combobox Pin
led mike20-Jun-08 7:03
led mike20-Jun-08 7:03 
GeneralRe: Editable Combobox Pin
Brady Kelly20-Jun-08 7:23
Brady Kelly20-Jun-08 7:23 
GeneralRe: Editable Combobox Pin
led mike20-Jun-08 8:31
led mike20-Jun-08 8:31 
QuestionProgressBar does show value Vista but not under XP Pin
J. Holzer19-Jun-08 21:39
J. Holzer19-Jun-08 21:39 
QuestionHow to override the Save button in Office Word 2007? Pin
csharpguy7619-Jun-08 16:18
csharpguy7619-Jun-08 16:18 

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.