| View previous topic :: View next topic |
| Author |
Message |
Luigi Grandmaster Cheater Supreme
Reputation: 1
Joined: 24 Mar 2008 Posts: 1082
|
Posted: Wed Jul 02, 2008 5:35 pm Post subject: Change start button text in VB6 |
|
|
You need:
1 text box
1 command button
-------------------------
In the command button you put:
| Code: |
Dim StartBar As Long
Dim StartBarText As Long
Dim sCaption As String
StartBar = FindWindow("Shell_TrayWnd", vbNullString)
StartBarText = FindWindowEx(StartBar, 0&, "button", vbNullString)
sCaption = Text1
SendMessageSTRING StartBarText, WM_SETTEXT, 256, sCaption |
above the code of the command1.click:
| Code: |
Option Explicit
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
Private Const WM_SETTEXT = &HC
Private Const WM_GETTEXT = &HD |
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
|
| Back to top |
|
 |
AndrewMan Grandmaster Cheater Supreme
Reputation: 0
Joined: 01 Aug 2007 Posts: 1257
|
Posted: Wed Jul 02, 2008 9:09 pm Post subject: |
|
|
| slovach wrote: | | http://www.astahost.com/visual-basic-change-start-button-text-xp-t5173.html |
LOL wow...
_________________
|
|
| Back to top |
|
 |
Luigi Grandmaster Cheater Supreme
Reputation: 1
Joined: 24 Mar 2008 Posts: 1082
|
Posted: Sat Jul 05, 2008 12:16 am Post subject: |
|
|
lol wrong site.
And wicaan, who said i reworded?
|
|
| Back to top |
|
 |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Sat Jul 05, 2008 12:26 am Post subject: |
|
|
| If I was a moderator, I would ban all people who even remotely copied and pasted. It's so fucking retarded that you can't write a simple tutorial on how to change the text of an object.
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
|
| Back to top |
|
 |
|