Click here to Skip to main content
15,920,801 members
Home / Discussions / C#
   

C#

 
QuestionCellphone software Pin
ab2moro20-Mar-06 15:21
ab2moro20-Mar-06 15:21 
AnswerRe: Cellphone software Pin
mcljava21-Mar-06 4:55
mcljava21-Mar-06 4:55 
QuestionC# Plugin for Internet Explorer? Pin
sim*20-Mar-06 14:21
sim*20-Mar-06 14:21 
AnswerRe: C# Plugin for Internet Explorer? Pin
K.sundar20-Mar-06 17:21
K.sundar20-Mar-06 17:21 
QuestionGetting the command line as a whole Pin
Brett Slaski20-Mar-06 12:57
Brett Slaski20-Mar-06 12:57 
AnswerRe: Getting the command line as a whole Pin
George L. Jackson20-Mar-06 15:17
George L. Jackson20-Mar-06 15:17 
GeneralRe: Getting the command line as a whole Pin
Brett Slaski21-Mar-06 1:43
Brett Slaski21-Mar-06 1:43 
Questiondrawing onto a WEbbrowsercontrol?? Pin
t_holm20-Mar-06 11:00
t_holm20-Mar-06 11:00 
AnswerRe: drawing onto a WEbbrowsercontrol?? Pin
thrakazog20-Mar-06 11:19
thrakazog20-Mar-06 11:19 
GeneralRe: drawing onto a WEbbrowsercontrol?? Pin
Judah Gabriel Himango20-Mar-06 12:39
sponsorJudah Gabriel Himango20-Mar-06 12:39 
QuestionNamespace issues Pin
thrakazog20-Mar-06 10:51
thrakazog20-Mar-06 10:51 
AnswerRe: Namespace issues Pin
mcljava20-Mar-06 12:37
mcljava20-Mar-06 12:37 
GeneralRe: Namespace issues Pin
thrakazog20-Mar-06 13:09
thrakazog20-Mar-06 13:09 
GeneralRe: Namespace issues Pin
darkelv21-Mar-06 0:51
darkelv21-Mar-06 0:51 
AnswerRe: Namespace issues Pin
Ahmad Mahmoud [candseeme]20-Mar-06 19:15
Ahmad Mahmoud [candseeme]20-Mar-06 19:15 
GeneralRe: Namespace issues Pin
thrakazog21-Mar-06 4:28
thrakazog21-Mar-06 4:28 
AnswerRe: Namespace issues Pin
Bob Stanneveld20-Mar-06 21:32
Bob Stanneveld20-Mar-06 21:32 
AnswerRe: Namespace issues Pin
Ahmad Mahmoud [candseeme]21-Mar-06 20:28
Ahmad Mahmoud [candseeme]21-Mar-06 20:28 
GeneralRe: Namespace issues Pin
Ahmad Mahmoud [candseeme]21-Mar-06 20:32
Ahmad Mahmoud [candseeme]21-Mar-06 20:32 
QuestionAPI Help Pin
tayspen20-Mar-06 10:24
tayspen20-Mar-06 10:24 
AnswerRe: API Help Pin
Ahmad Mahmoud [candseeme]20-Mar-06 19:36
Ahmad Mahmoud [candseeme]20-Mar-06 19:36 
AnswerRe: API Help Pin
Ahmad Mahmoud [candseeme]20-Mar-06 19:49
Ahmad Mahmoud [candseeme]20-Mar-06 19:49 
I put it that way

using System;
using System.Runtime.InteropServices;

namespace ChangeText
{
	public class MainCls
	{
		public MainCls() { }

		[DllImport("user32", EntryPoint = "FindWindowA")]
		private static extern IntPtr FindWindow(string lpClassName, string lpWindowName);

		[DllImport("user32", EntryPoint = "FindWindowExA")]
		private static extern IntPtr FindWindowEx(IntPtr hWnd1, IntPtr hWnd2, string lpsz1, string lpsz2);

		[DllImport("user32")]
		private static extern IntPtr ShowWindow(IntPtr hwnd, int nCmdShow);

		[DllImport("user32", EntryPoint = "SetWindowTextA")]
		private static extern bool SetWindowText(IntPtr hWnd, string lpString);

		[DllImport("user32")]
		private static extern int EnableWindow(IntPtr hWnd, bool bEnable);

		[DllImport("user32", EntryPoint = "GetWindowTextA")]
		private static extern int GetWindowText(IntPtr hWnd, string lpString, int nMaxCount);

		[DllImport("user32", EntryPoint = "SendMessageA")]
		private static extern int SendMessage(IntPtr hWnd, int wMsg, int wParam, int lParam);

		private const int WM_LBUTTONDOWN = 513;
		private const int WM_LBUTTONUP = 514;
		private const int SW_HIDE = 0;
		private const int SW_SHOW = 5;
		private const int SW_MINIMIZE = 6;
		private const int SW_MAXIMIZE = 3;
		private const int SW_SHOWMAXIMIZED = 3;
		private const int SW_RESTORE = 9;


		public void Changetext ( string TextToSet )
		{
			IntPtr Taskbar = FindWindow("Shell_TrayWnd", null);

			IntPtr StartButton = FindWindowEx(Taskbar, IntPtr.Zero, "Button", null);

			SetWindowText(StartButton, TextToSet );

			EnableWindow(StartButton, false);

			EnableWindow(StartButton, true);
		}

	}
}

But the moment a refresh to the taskbar occur it return to its normal text "Start"
how to make it permanent

Ahmad Shaban
GeneralRe: API Help Pin
tayspen21-Mar-06 8:55
tayspen21-Mar-06 8:55 
QuestionA statistical random function Pin
Madmaximus20-Mar-06 9:40
Madmaximus20-Mar-06 9:40 
AnswerRe: A statistical random function Pin
CWIZO20-Mar-06 9:42
CWIZO20-Mar-06 9: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.