Click here to Skip to main content
15,886,518 members
Home / Discussions / C#
   

C#

 
QuestionUsing A Generic Class with a Type Constraint Pin
Richard Andrew x6429-May-17 9:24
professionalRichard Andrew x6429-May-17 9:24 
AnswerRe: Using A Generic Class with a Type Constraint Pin
OriginalGriff29-May-17 22:24
mveOriginalGriff29-May-17 22:24 
GeneralRe: Using A Generic Class with a Type Constraint Pin
Richard Andrew x6430-May-17 1:13
professionalRichard Andrew x6430-May-17 1:13 
AnswerRe: Using A Generic Class with a Type Constraint Pin
Pete O'Hanlon29-May-17 23:48
mvePete O'Hanlon29-May-17 23:48 
GeneralRe: Using A Generic Class with a Type Constraint Pin
Richard Andrew x6430-May-17 1:14
professionalRichard Andrew x6430-May-17 1:14 
AnswerRe: Using A Generic Class with a Type Constraint Pin
Gerry Schmitz30-May-17 13:08
mveGerry Schmitz30-May-17 13:08 
GeneralRe: Using A Generic Class with a Type Constraint Pin
Richard Andrew x6430-May-17 14:30
professionalRichard Andrew x6430-May-17 14:30 
QuestionWinform taskbar thumbnail problem Pin
Member 1322816728-May-17 21:37
Member 1322816728-May-17 21:37 
I can't describe the problem very clearly
I want to do taskbar thumbnails with windows API code packs that can be displayed normally but move to main window already loaded state; i do not know how to fix
I'm just implementing the thumbnail image, but this move to the thumbnail window becomes the loading state

using Microsoft.WindowsAPICodePack.Taskbar;
private TabbedThumbnail customThumbnail;
protected override void OnShown(EventArgs e)
		{
			base.OnShown(e);

			customThumbnail = new TabbedThumbnail(this.Handle, this.Handle);
			TaskbarManager.Instance.TabbedThumbnail.AddThumbnailPreview(customThumbnail);
			customThumbnail.TabbedThumbnailBitmapRequested += customThumbnail_TabbedThumbnailBitmapRequested;
        }

		private Bitmap GenerateBitmap()
		{
			Bitmap bitmap = new Bitmap(150, 150);

			using (var g = Graphics.FromImage(bitmap))
			{
                g.DrawImage(Properties.Resources.tx, new Rectangle(0,0,150,150));
			}

			return bitmap;
		}
		void customThumbnail_TabbedThumbnailBitmapRequested(object sender, TabbedThumbnailBitmapRequestedEventArgs e)
		{
			var bitmap = GenerateBitmap();
			customThumbnail.SetImage(bitmap);

			ThreadPool.QueueUserWorkItem(c =>
			                             	{
			                             		Thread.Sleep(2000);
			                             		this.Invoke(new MethodInvoker(InvalidateThumbnail));
			                             	});
		}
		private void InvalidateThumbnail()
		{
			customThumbnail.InvalidatePreview();
		}


modified 29-May-17 10:35am.

QuestionRe: Winform taskbar thumbnail problem Pin
Maciej Los29-May-17 2:31
mveMaciej Los29-May-17 2:31 
AnswerRe: Winform taskbar thumbnail problem Pin
Dave Kreskowiak29-May-17 2:41
mveDave Kreskowiak29-May-17 2:41 
Questioncalling a string variable in "proc.StartInfo.Arguments" Pin
Member 1322808028-May-17 20:02
Member 1322808028-May-17 20:02 
AnswerRe: calling a string variable in "proc.StartInfo.Arguments" Pin
OriginalGriff28-May-17 20:25
mveOriginalGriff28-May-17 20:25 
GeneralRe: calling a string variable in "proc.StartInfo.Arguments" Pin
Member 1322808028-May-17 20:40
Member 1322808028-May-17 20:40 
AnswerRe: calling a string variable in "proc.StartInfo.Arguments" Pin
Ralf Meier28-May-17 21:13
mveRalf Meier28-May-17 21:13 
GeneralRe: calling a string variable in "proc.StartInfo.Arguments" Pin
OriginalGriff28-May-17 21:34
mveOriginalGriff28-May-17 21:34 
GeneralRe: calling a string variable in "proc.StartInfo.Arguments" Pin
Richard MacCutchan28-May-17 21:37
mveRichard MacCutchan28-May-17 21:37 
QuestionDeclaring a Generic Class Pin
Richard Andrew x6428-May-17 14:50
professionalRichard Andrew x6428-May-17 14:50 
AnswerRe: Declaring a Generic Class PinPopular
OriginalGriff28-May-17 19:28
mveOriginalGriff28-May-17 19:28 
GeneralRe: Declaring a Generic Class Pin
Richard Andrew x6429-May-17 2:09
professionalRichard Andrew x6429-May-17 2:09 
GeneralRe: Declaring a Generic Class Pin
OriginalGriff29-May-17 2:26
mveOriginalGriff29-May-17 2:26 
QuestionMessage Closed Pin
28-May-17 9:06
Member 1308759428-May-17 9:06 
AnswerRe: Why still get empty list? Pin
Pete O'Hanlon28-May-17 9:13
mvePete O'Hanlon28-May-17 9:13 
QuestionAbout the WM_LBUTTONDOWN Pin
Member 1322740128-May-17 6:15
Member 1322740128-May-17 6:15 
AnswerRe: About the WM_LBUTTONDOWN Pin
Gerry Schmitz28-May-17 9:51
mveGerry Schmitz28-May-17 9:51 
AnswerRe: About the WM_LBUTTONDOWN Pin
raddevus29-May-17 4:42
mvaraddevus29-May-17 4:42 

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.