VBA Express Forum  
Google
 




Go Back   VBA Express Forum > VBA Code & Other Help > Excel Help
     Feedback     
Register FAQ Members Arcade KBase Articles

Reply
 
Thread Tools Display Modes
Old 10-17-2006, 05:27 PM   #1
Erdin? E. Ka
 
Erdin? E. Ka's Avatar

 
Joined: Sep 2006
Posts: 264
Kb Entries: 0
Articles: 0
Solved: Start Button of Win XP Prof. Edit. Op. System

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?



Erdin? E. Kara?am | Loves from Bursa city in Republic of T?rkiye

Local Time: 11:32 AM
Local Date: 07-30-2010
Location:

 
Reply With Quote Top
Old 10-17-2006, 06:09 PM   #2
xld
 
xld's Avatar
Distinguished Lord of VBAX

 
Joined: Apr 2005
Posts: 17,934
Kb Entries: 3
Articles: 0
http://www.tweakxp.com/article36828.aspx

Local Time: 10:32 AM
Local Date: 07-30-2010
Location:

 
Reply With Quote Top
Old 10-17-2006, 07:04 PM   #3
Erdin? E. Ka
 
Erdin? E. Ka's Avatar

 
Joined: Sep 2006
Posts: 264
Kb Entries: 0
Articles: 0
Just a little difficult solution for me but thank you very much for your kindly help XLD.

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



Erdin? E. Kara?am | Loves from Bursa city in Republic of T?rkiye

Local Time: 11:32 AM
Local Date: 07-30-2010
Location:

 
Reply With Quote Top
Old 10-17-2006, 10:56 PM   #4
Erdin? E. Ka
 
Erdin? E. Ka's Avatar

 
Joined: Sep 2006
Posts: 264
Kb Entries: 0
Articles: 0
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.


VBA:
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
VBA tags courtesy of www.thecodenet.com



Erdin? E. Kara?am | Loves from Bursa city in Republic of T?rkiye

Local Time: 11:32 AM
Local Date: 07-30-2010
Location:

 
Reply With Quote Top
Old 10-18-2006, 08:21 AM   #5
Justinlabenne
 
Justinlabenne's Avatar
Knowledge Base Approver

 
Joined: Jul 2004
Posts: 407
Kb Entries: 54
Articles: 0

VBA:
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
VBA tags courtesy of www.thecodenet.com



Justin Labenne

Local Time: 05:32 AM
Local Date: 07-30-2010
Location:

 
Reply With Quote Top
Old 10-18-2006, 09:51 AM   #6
Erdin? E. Ka
 
Erdin? E. Ka's Avatar

 
Joined: Sep 2006
Posts: 264
Kb Entries: 0
Articles: 0
Thank you Justin Labenne,

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

Are there any extra code or some settings?

Thanks in advance.



Erdin? E. Kara?am | Loves from Bursa city in Republic of T?rkiye

Local Time: 11:32 AM
Local Date: 07-30-2010
Location:

 
Reply With Quote Top
Old 10-18-2006, 10:03 AM   #7
xld
 
xld's Avatar
Distinguished Lord of VBAX

 
Joined: Apr 2005
Posts: 17,934
Kb Entries: 3
Articles: 0
Did you invoke the routine, like so


VBA:
ChangeXPStartText "Erdin?"
VBA tags courtesy of www.thecodenet.com

Local Time: 10:32 AM
Local Date: 07-30-2010
Location:

 
Reply With Quote Top
Old 10-18-2006, 10:32 AM   #8
Erdin? E. Ka
 
Erdin? E. Ka's Avatar

 
Joined: Sep 2006
Posts: 264
Kb Entries: 0
Articles: 0
Finally i did it.

I changed
VBA:
sCaption = Left$(Caption, 6)
VBA tags courtesy of www.thecodenet.com
instead of;
VBA:
sCaption = Left$(Caption, 5)
VBA tags courtesy of www.thecodenet.com

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

So, now it's ok.


VBA:
Sub JustChangeItAs() ChangeXPStartText "Erdin?" End Sub
VBA tags courtesy of www.thecodenet.com

Thank you very much Justin and xld.



Erdin? E. Kara?am | Loves from Bursa city in Republic of T?rkiye

Local Time: 11:32 AM
Local Date: 07-30-2010
Location:

 
Reply With Quote Top
Old 10-30-2006, 08:05 AM   #9
yogeshwarv

 
Joined: Aug 2004
Posts: 32
Kb Entries: 0
Articles: 0
can we increase width of the menu also??
how this can be done?? Please help

Local Time: 03:02 PM
Local Date: 07-30-2010

 
Reply With Quote Top
Old 10-30-2006, 08:23 AM   #10
xld
 
xld's Avatar
Distinguished Lord of VBAX

 
Joined: Apr 2005
Posts: 17,934
Kb Entries: 3
Articles: 0
As far as I understand, you are limited to the number of letters that your system starts with.

Local Time: 10:32 AM
Local Date: 07-30-2010
Location:

 
Reply With Quote Top
Old 10-30-2006, 10:11 AM   #11
Erdin? E. Ka
 
Erdin? E. Ka's Avatar

 
Joined: Sep 2006
Posts: 264
Kb Entries: 0
Articles: 0
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...



Erdin? E. Kara?am | Loves from Bursa city in Republic of T?rkiye

Local Time: 11:32 AM
Local Date: 07-30-2010
Location:

 
Reply With Quote Top
Old 10-30-2006, 11:44 AM   #12
xld
 
xld's Avatar
Distinguished Lord of VBAX

 
Joined: Apr 2005
Posts: 17,934
Kb Entries: 3
Articles: 0
Quote:
 
Originally Posted by: Erdin? E. Ka
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!

Local Time: 10:32 AM
Local Date: 07-30-2010
Location:

 
Reply With Quote Top
Old 11-02-2006, 03:49 AM   #13
Ivan F Moala
 
Ivan F Moala's Avatar

 
Joined: May 2004
Posts: 185
Kb Entries: 1
Articles: 0
Quote:
 
Originally Posted by: xld
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 .....



Kind Regards,
Ivan F Moala From the City of Sails

Local Time: 09:32 PM
Local Date: 07-30-2010
Location:

 
Reply With Quote Top
Old 11-02-2006, 05:15 PM   #14
Erdin? E. Ka
 
Erdin? E. Ka's Avatar

 
Joined: Sep 2006
Posts: 264
Kb Entries: 0
Articles: 0
Hi there,

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

Can we do it permanent?



Erdin? E. Kara?am | Loves from Bursa city in Republic of T?rkiye

Local Time: 11:32 AM
Local Date: 07-30-2010
Location:

 
Reply With Quote Top
Old 11-02-2006, 07:48 PM   #15
Ivan F Moala
 
Ivan F Moala's Avatar

 
Joined: May 2004
Posts: 185
Kb Entries: 1
Articles: 0
No, you can't make it permanent unless you alter the Explorer.exe which refreshes the start button text.



Kind Regards,
Ivan F Moala From the City of Sails

Local Time: 09:32 PM
Local Date: 07-30-2010
Location:

 
Reply With Quote Top
Old 11-05-2006, 10:05 PM   #16
Erdin? E. Ka
 
Erdin? E. Ka's Avatar

 
Joined: Sep 2006
Posts: 264
Kb Entries: 0
Articles: 0
Thank you to kindly help Ivan.



Erdin? E. Kara?am | Loves from Bursa city in Republic of T?rkiye

Local Time: 11:32 AM
Local Date: 07-30-2010
Location:

 
Reply With Quote Top
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 05:32 AM.


Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright @2004 - 2009 VBA Express