Click here to Skip to main content
15,895,370 members
Home / Discussions / C#
   

C#

 
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 

API Help
Posted: 19 Mar 2006 07:25 PM
Hi, I use this --

[System.Runtime.InteropServices.DllImport("user32", EntryPoint = "FindWindowA")]
private static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[System.Runtime.InteropServices.DllImport("user32", EntryPoint = "FindWindowExA")]
private static extern IntPtr FindWindowEx(IntPtr hWnd1, IntPtr hWnd2, string lpsz1, string lpsz2);
[System.Runtime.InteropServices.DllImport("user32")]
private static extern IntPtr ShowWindow(IntPtr hwnd, int nCmdShow);
[System.Runtime.InteropServices.DllImport("user32", EntryPoint = "SetWindowTextA")]
private static extern bool SetWindowText(IntPtr hWnd, string lpString);
[System.Runtime.InteropServices.DllImport("user32")]
private static extern int EnableWindow(IntPtr hWnd, bool bEnable);
[System.Runtime.InteropServices.DllImport("user32", EntryPoint = "GetWindowTextA")]
private static extern int GetWindowText(IntPtr hWnd, string lpString, int nMaxCount);
[System.Runtime.InteropServices.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()
{
IntPtr Taskbar = FindWindow("Shell_TrayWnd", null);
IntPtr StartButton = FindWindowEx(Taskbar, IntPtr.Zero, "Button", null);
SetWindowText(StartButton, "Blah");
EnableWindow(StartButton, false);
EnableWindow(StartButton, true);

}

To change the text on the start button, and it works fine. But it can only have like 5 letters. could i use SetWindowPos to change the width of the start button, to allow for more letters? I have seen code in other langs that do this, And im pretty sire thats the method they take. If so could I see an example please Smile | :) .
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 
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 
GeneralRe: A statistical random function Pin
Madmaximus20-Mar-06 10:23
Madmaximus20-Mar-06 10:23 
GeneralRe: A statistical random function Pin
Dan Neely20-Mar-06 10:30
Dan Neely20-Mar-06 10:30 
Questionadding xml schema location to serialized xml file Pin
Dan Neely20-Mar-06 9:32
Dan Neely20-Mar-06 9:32 
AnswerRe: adding xml schema location to serialized xml file Pin
Dan Neely20-Mar-06 10:01
Dan Neely20-Mar-06 10:01 
Questionperl and C# Pin
allenmpcx20-Mar-06 9:11
allenmpcx20-Mar-06 9:11 
AnswerRe: perl and C# Pin
Tom Larsen20-Mar-06 10:19
Tom Larsen20-Mar-06 10:19 
QuestionRe: perl and C# Pin
allenmpcx25-Mar-06 10:16
allenmpcx25-Mar-06 10:16 
QuestionIBMDA400 OLE DB Provider, data connection Pin
enasromios20-Mar-06 8:16
enasromios20-Mar-06 8:16 
QuestionLabels at runtime Pin
alexdg0420-Mar-06 8:03
alexdg0420-Mar-06 8:03 
AnswerRe: Labels at runtime Pin
CWIZO20-Mar-06 9:26
CWIZO20-Mar-06 9:26 
GeneralRe: Labels at runtime Pin
alexdg0420-Mar-06 9:29
alexdg0420-Mar-06 9:29 
AnswerRe: Labels at runtime Pin
CWIZO20-Mar-06 9:32
CWIZO20-Mar-06 9:32 

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.