PDA

View Full Version : Solved: Start Button of Win XP Prof. Edit. Op. System



Erdin? E. Ka
10-17-2006, 02:27 PM
Hi there,

I saw that "Start Button of Win XP Prof. Edit. Op. System" is changed as "Trottle" instead of "Start" in a pc of one of my friend. :*)

I like it.

And i want to learn to change my pc's start button as "Erdin?".

Can someone tell me the way about it? :think:

Bob Phillips
10-17-2006, 03:09 PM
http://www.tweakxp.com/article36828.aspx

Erdin? E. Ka
10-17-2006, 04:04 PM
Just a little difficult solution for me but thank you very much for your kindly help XLD.:friends:

So, can we do it with VBA code or with an API calling? :think:

Erdin? E. Ka
10-17-2006, 07:56 PM
I have an API about Hide-Show Start Button.

Can we edit this codes for Rename the Start Button?
Or any ideas about it except a solution by an another application.


Const HideStart = 0
Const ShowStart = 1
Private Type BUTTON
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As BUTTON) As Long
Dim tWnd As Long, bWnd As Long, ncWnd As Long
Sub Hide_Button()
Dim R As BUTTON
tWnd = FindWindow("Shell_TrayWnd", vbNullString)
bWnd = FindWindowEx(tWnd, ByVal 0&, "BUTTON", vbNullString)
GetWindowRect bWnd, R
ShowWindow ncWnd, ShowStart
ShowWindow bWnd, HideStart
End Sub
Sub Show_Button()
ShowWindow bWnd, ShowStart
End Sub

Justinlabenne
10-18-2006, 05:21 AM
Option Explicit

Private Const WM_SETTEXT As Long = &HC


Private Declare Function FindWindow Lib "user32.dll" _
Alias "FindWindowA" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) _
As Long

Private Declare Function FindWindowEx Lib "user32.dll" _
Alias "FindWindowExA" ( _
ByVal hWnd1 As Long, _
ByVal hWnd2 As Long, _
ByVal lpsz1 As String, _
ByVal lpsz2 As String) _
As Long

Private Declare Function SendMessage Lib "user32.dll" _
Alias "SendMessageA" ( _
ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
ByVal lParam As String) _
As Long


Public Sub ChangeXPStartText(ByRef Caption As String)
Dim lHwnd As Long
Dim lStartHwnd As Long
Dim sCaption As String

' Get a handle to the tray
lHwnd = FindWindow("Shell_TrayWnd", vbNullString)

' Get a handle to the Start button on the tray
lStartHwnd = FindWindowEx(lHwnd, 0&, "button", vbNullString)

' Shorten the new caption so it fits
sCaption = Left$(Caption, 5)

' Change the style
SendMessage lStartHwnd, WM_SETTEXT, 256, sCaption
End Sub

Erdin? E. Ka
10-18-2006, 06:51 AM
Thank you Justin Labenne,

I should missing to do something, i couldn't do it.

Are there any extra code or some settings?:think:

Thanks in advance.

Bob Phillips
10-18-2006, 07:03 AM
Did you invoke the routine, like so



ChangeXPStartText "Erdin?"

Erdin? E. Ka
10-18-2006, 07:32 AM
Finally i did it.

I changed sCaption = Left$(Caption, 6)
instead of; sCaption = Left$(Caption, 5)

My Op.Sys. is Turkish and "Start" = "Başlat" in Turkish Edit.

So, now it's ok.


Sub JustChangeItAs()
ChangeXPStartText "Erdin?"
End Sub


Thank you very much Justin and xld.
:friends:

yogeshwarv
10-30-2006, 06:05 AM
can we increase width of the menu also??
how this can be done?? Please help

Bob Phillips
10-30-2006, 06:23 AM
As far as I understand, you are limited to the number of letters that your system starts with.

Erdin? E. Ka
10-30-2006, 08:11 AM
Yes xld, you are right. I was tried a lot times for more then leght of default name of start button (Başlat) (6 characters). But this codes do not let more then this.

But i saw in one of my friends PC's start button as "FixCafe" .. So it was 7 charcters... I think that there is a different way to do this...But i do not know it.

Have a nice day...

Bob Phillips
10-30-2006, 09:44 AM
Yes xld, you are right. I was tried a lot times for more then leght of default name of start button (Başlat) (6 characters). But this codes do not let more then this.

But i saw in one of my friends PC's start button as "FixCafe" .. So it was 7 charcters... I think that there is a different way to do this...But i do not know it.

Have a nice day...

When I researched it I saw somewhere that you are rsetricted to that number, and I coudn't change it. Myabe his language setting is not Turksih, and hsi Start text is 7 letters? We only get 5!

Ivan F Moala
11-02-2006, 01:49 AM
When I researched it I saw somewhere that you are rsetricted to that number, and I coudn't change it. Myabe his language setting is not Turksih, and hsi Start text is 7 letters? We only get 5!

You can alter the Text to suit any length, BUT you need to take into acount the different windows and there classes within the area of the Taskbar. There are 3 you need to alter to get any text length in and adjsut the button.

Let me know and I'll post the answer either here or to my site .....

Erdin? E. Ka
11-02-2006, 03:15 PM
Hi there,

Justin Labenne's codes works but, only when the file is open.

Can we do it permanent?

Ivan F Moala
11-02-2006, 05:48 PM
No, you can't make it permanent unless you alter the Explorer.exe which refreshes the start button text.

Erdin? E. Ka
11-05-2006, 08:05 PM
Thank you to kindly help Ivan.:hi: