Click here to Skip to main content
15,881,424 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Problems with using series of PNG files as animations Pin
molesworth7-Jun-09 1:37
molesworth7-Jun-09 1:37 
GeneralRe: Problems with using series of PNG files as animations Pin
Skymir19-Jun-09 9:47
Skymir19-Jun-09 9:47 
AnswerRe: Problems with using series of PNG files as animations Pin
Henry Minute7-Jun-09 4:53
Henry Minute7-Jun-09 4:53 
QuestionParameter is not valid Pin
JediKnight26-Jun-09 5:17
JediKnight26-Jun-09 5:17 
AnswerRe: Parameter is not valid Pin
musefan8-Jun-09 2:29
musefan8-Jun-09 2:29 
GeneralRe: Parameter is not valid Pin
JediKnight29-Jun-09 16:16
JediKnight29-Jun-09 16:16 
GeneralRe: Parameter is not valid Pin
musefan11-Jun-09 2:32
musefan11-Jun-09 2:32 
GeneralRe: Parameter is not valid Pin
JediKnight212-Jun-09 5:30
JediKnight212-Jun-09 5:30 
Here you go...

This is the picture box creation code:
PictureBox pictureBox = new PictureBox();
pictureBox.Left = (i % 10) * 36 + 4;
pictureBox.Top = ((i / 10) + startRow) * 36 + 4 - galleryScroll;
pictureBox.Width = 32;
pictureBox.Height = 32;
pictureBox.BorderStyle = BorderStyle.FixedSingle;
pictureBox.ContextMenuStrip = pictureMenu;
pictureBox.Click += galleryPictureBox_Click;
pictureBox.Visible = true;
panel1.Controls.Add(pictureBox);


Below is the image loading thread:
delegate void SetupGalleryBoxCallback(PictureBox box, Image image, bool showError, string tooltip);
private void setupGalleryBox(PictureBox box, Image image, bool showError, string tooltip)
{
if (this.InvokeRequired)
{
SetupGalleryBoxCallback d = new SetupGalleryBoxCallback(setupGalleryBox);
this.Invoke(d, new object[] { box, image, showError, tooltip });
}
else
{
if (image != null)
{
box.SizeMode = PictureBoxSizeMode.Zoom;
box.Image = image;
}
else if(showError)
{
box.SizeMode = PictureBoxSizeMode.CenterImage;
box.Image = box.ErrorImage;
}
Program.tooltip.SetToolTip(box, tooltip);
}
}
void imageLoadingThread()
{
int count = (_galleryItems != null) ? _galleryItems.Count : 0;
Image errorImage = galleryLargePictureBox.ErrorImage;
for (int i = 0; i < _galleryPictureBoxes.Count; i++)
{
if (i < count)
{
object[] galleryItem = (Object[])_galleryItems[i];
String imagePath = (string)galleryItem[0];
String toolTip = (string)galleryItem[2];
if(imagePath != null)
imagePath = imagePath.Trim();
if (imagePath != null && imagePath.Length > 0)
{
try
{
Image image = Image.FromFile(imagePath.Trim());
setupGalleryBox(_galleryPictureBoxes[i], image, false, toolTip);
}
catch (Exception)
{
setupGalleryBox(_galleryPictureBoxes[i], errorImage, true, toolTip);
}
if (i == _galleryPictureBoxes.Count - 1 && imagePath != null)
addPictureBoxes(1);
}
else
setupGalleryBox(_galleryPictureBoxes[i], null, false, toolTip);
//Console.WriteLine("Comment={0}", (string)((object[])_galleryItems[i])[2]);
}
else
_galleryPictureBoxes[i].ImageLocation = null;
}

}
QuestionMicrosoft.VisualStudio.Shell.9.0 namespace is not resolved by VS2008 Pin
Member 7510145-Jun-09 11:16
Member 7510145-Jun-09 11:16 
AnswerRe: Microsoft.VisualStudio.Shell.9.0 namespace is not resolved by VS2008 Pin
Mark Salsbery5-Jun-09 12:54
Mark Salsbery5-Jun-09 12:54 
Questioncommunication between device and asp.net Pin
yrishi4-Jun-09 23:39
yrishi4-Jun-09 23:39 
AnswerAttempt to bump post. Pin
Pete O'Hanlon4-Jun-09 23:41
mvePete O'Hanlon4-Jun-09 23:41 
GeneralRe: Attempt to bump post. Pin
yrishi4-Jun-09 23:48
yrishi4-Jun-09 23:48 
GeneralRe: Attempt to bump post. Pin
0x3c04-Jun-09 23:57
0x3c04-Jun-09 23:57 
GeneralRe: Attempt to bump post. Pin
yrishi5-Jun-09 0:15
yrishi5-Jun-09 0:15 
GeneralRe: Attempt to bump post. Pin
Pete O'Hanlon5-Jun-09 0:34
mvePete O'Hanlon5-Jun-09 0:34 
GeneralRe: Attempt to bump post. Pin
yrishi5-Jun-09 0:38
yrishi5-Jun-09 0:38 
GeneralRe: Attempt to bump post. Pin
led mike5-Jun-09 5:03
led mike5-Jun-09 5:03 
AnswerRe: communication between device and asp.net Pin
saanj9-Jun-09 0:18
saanj9-Jun-09 0:18 
AnswerRe: communication between device and asp.net Pin
Baran M9-Jun-09 1:33
Baran M9-Jun-09 1:33 
Questionimplementing progressbar while saving data database Pin
TARAK NATH ROY4-Jun-09 20:08
TARAK NATH ROY4-Jun-09 20:08 
AnswerRe: implementing progressbar while saving data database Pin
Pete O'Hanlon4-Jun-09 22:19
mvePete O'Hanlon4-Jun-09 22:19 
QuestionStyle of a DataGridView.Row by using DataSet Pin
C-Scharbe4-Jun-09 9:22
C-Scharbe4-Jun-09 9:22 
AnswerRe: Style of a DataGridView.Row by using DataSet Pin
C-Scharbe4-Jun-09 22:30
C-Scharbe4-Jun-09 22:30 
AnswerRe: Style of a DataGridView.Row by using DataSet Pin
Venkatesh Ellur7-Jun-09 19:34
Venkatesh Ellur7-Jun-09 19:34 

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.