Consulting

Results 1 to 16 of 16

Thread: Solved: Start Button of Win XP Prof. Edit. Op. System

  1. #1
    VBAX Tutor Erdin? E. Ka's Avatar
    Joined
    Sep 2006
    Location
    Bursa
    Posts
    264
    Location

    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

  2. #2

  3. #3
    VBAX Tutor Erdin? E. Ka's Avatar
    Joined
    Sep 2006
    Location
    Bursa
    Posts
    264
    Location
    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

  4. #4
    VBAX Tutor Erdin? E. Ka's Avatar
    Joined
    Sep 2006
    Location
    Bursa
    Posts
    264
    Location
    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]
    Erdin? E. Kara?am | Loves from Bursa city in Republic of T?rkiye

  5. #5
    VBAX Mentor Justinlabenne's Avatar
    Joined
    Jul 2004
    Location
    Clyde, Ohio
    Posts
    408
    Location
    [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]
    Justin Labenne

  6. #6
    VBAX Tutor Erdin? E. Ka's Avatar
    Joined
    Sep 2006
    Location
    Bursa
    Posts
    264
    Location
    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

  7. #7
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Did you invoke the routine, like so

    [vba]

    ChangeXPStartText "Erdin?"
    [/vba]

  8. #8
    VBAX Tutor Erdin? E. Ka's Avatar
    Joined
    Sep 2006
    Location
    Bursa
    Posts
    264
    Location
    Finally i did it.

    I changed [VBA] sCaption = Left$(Caption, 6)[/VBA]
    instead of; [VBA]sCaption = Left$(Caption, 5)[/VBA]

    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]

    Thank you very much Justin and xld.
    Erdin? E. Kara?am | Loves from Bursa city in Republic of T?rkiye

  9. #9
    can we increase width of the menu also??
    how this can be done?? Please help

  10. #10
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    As far as I understand, you are limited to the number of letters that your system starts with.

  11. #11
    VBAX Tutor Erdin? E. Ka's Avatar
    Joined
    Sep 2006
    Location
    Bursa
    Posts
    264
    Location
    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

  12. #12
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    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!

  13. #13
    VBAX Contributor Ivan F Moala's Avatar
    Joined
    May 2004
    Location
    Auckland New Zealand
    Posts
    185
    Location
    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

  14. #14
    VBAX Tutor Erdin? E. Ka's Avatar
    Joined
    Sep 2006
    Location
    Bursa
    Posts
    264
    Location
    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

  15. #15
    VBAX Contributor Ivan F Moala's Avatar
    Joined
    May 2004
    Location
    Auckland New Zealand
    Posts
    185
    Location
    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

  16. #16
    VBAX Tutor Erdin? E. Ka's Avatar
    Joined
    Sep 2006
    Location
    Bursa
    Posts
    264
    Location
    Thank you to kindly help Ivan.
    Erdin? E. Kara?am | Loves from Bursa city in Republic of T?rkiye

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •