VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



to change the word on the little start green button at the bottom

by jamie da dude (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 23rd June 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)

to change the word on the little start green button at the bottom

Rate to change the word on the little start green button at the bottom



Private Const WM_GETTEXT = &HD
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
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 SendMessageSTRING Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long

Public Sub SetStartCaption(str As String)
   Dim StartBar As Long
   Dim StartBarText As Long
   Dim sCaption As String
   StartBar = FindWindow("Shell_TrayWnd", vbNullString)
   StartBarText = FindWindowEx(StartBar, 0&, "button", vbNullString)
   sCaption = Left(str, 5)
   SendMessageSTRING StartBarText, WM_SETTEXT, 256, sCaption
   Exit Sub
   End Sub
   Private Sub Command1_Click()
SetStartCaption Text1.Text
End Sub

Private Sub Text1_Change()
SetStartCaption Text1.Text
End Sub

Download this snippet    Add to My Saved Code

to change the word on the little start green button at the bottom Comments

No comments have been posted about to change the word on the little start green button at the bottom. Why not be the first to post a comment about to change the word on the little start green button at the bottom.

Post your comment

Subject:
Message:
0/1000 characters