Click here to Skip to main content
15,892,927 members
Home / Discussions / C#
   

C#

 
QuestionHow to solve 2 js script file crash problem Pin
Member 130563031-Jun-17 16:22
Member 130563031-Jun-17 16:22 
AnswerRe: How to solve 2 js script file crash problem PinPopular
Gerry Schmitz1-Jun-17 16:47
mveGerry Schmitz1-Jun-17 16:47 
GeneralRe: How to solve 2 js script file crash problem Pin
OriginalGriff1-Jun-17 20:25
mveOriginalGriff1-Jun-17 20:25 
AnswerRe: How to solve 2 js script file crash problem Pin
Pete O'Hanlon1-Jun-17 21:49
mvePete O'Hanlon1-Jun-17 21:49 
Questiondatagrid view to pdf by iTextsharp Pin
Member 130230281-Jun-17 9:07
Member 130230281-Jun-17 9:07 
AnswerRe: datagrid view to pdf by iTextsharp Pin
Afzaal Ahmad Zeeshan1-Jun-17 10:46
professionalAfzaal Ahmad Zeeshan1-Jun-17 10:46 
AnswerRe: datagrid view to pdf by iTextsharp Pin
Gerry Schmitz1-Jun-17 16:46
mveGerry Schmitz1-Jun-17 16:46 
QuestionHow can i effectively write the code for calling a function before and after execution of every function in a class. Pin
yeswanthkumar30-May-17 2:51
yeswanthkumar30-May-17 2:51 
AnswerRe: How can i effectively write the code for calling a function before and after execution of every function in a class. Pin
Pete O'Hanlon30-May-17 3:11
mvePete O'Hanlon30-May-17 3:11 
AnswerRe: How can i effectively write the code for calling a function before and after execution of every function in a class. Pin
Gerry Schmitz30-May-17 12:41
mveGerry Schmitz30-May-17 12:41 
AnswerRe: How can i effectively write the code for calling a function before and after execution of every function in a class. Pin
BillWoodruff1-Jun-17 6:06
professionalBillWoodruff1-Jun-17 6:06 
GeneralRe: How can i effectively write the code for calling a function before and after execution of every function in a class. Pin
yeswanthkumar1-Jun-17 20:31
yeswanthkumar1-Jun-17 20:31 
GeneralRe: How can i effectively write the code for calling a function before and after execution of every function in a class. Pin
BillWoodruff2-Jun-17 6:07
professionalBillWoodruff2-Jun-17 6:07 
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 

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.