|
|
|
|
![]() ![]() |
May 12 2005, 09:14 PM
Post
#1
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 19 Joined: 12-May 05 Member No.: 5,018 |
Personally, I love this program I made for myself. What the following code will allow you to do is change the text of your start button (Duh). You can make it whatever you want, your name, a hobby, or even do some extra programming and get it to randomly cycle through captions every 30 seconds or so
Here is all the code you'll need: CODE Private Const WM_SETTEXT = &HC 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 All this code does is find the start button in the explorer process, then there's a little code to send a string to it to change it's text. To use this, create a TextBox, where the user can enter what he wants it to be renamed to, and a command button, which the user will press to change the text. CODE Private Sub Command1_Click() SetStartCaption Text1.Text End Sub And that's all you'll need to change your start button to whatever you want, with the restriction of about 5-6 letter words, due to size of the button. Sorry guys If you need any help, or want specific information about what each line does, I can fully explain to you all you need to know. Just send an e-mail to ViRuaL@gmail.com Thanks, and I hope you enjoy playing around with this. This post has been edited by microscopic^earthling: Jul 1 2005, 03:04 AM |
|
|
|
Jun 20 2005, 07:44 PM
Post
#2
|
|
|
Member [ Level 1 ] Group: Members Posts: 48 Joined: 18-June 05 Member No.: 6,357 |
Awesome dude I will be sure to use this.
I code in VB all of the time but I usually do API's for programs.I might do some extra coding to make it cycle through captions |
|
|
|
Jun 22 2005, 04:01 AM
Post
#3
|
|
|
Advanced Member Group: Members Posts: 131 Joined: 21-May 05 From: New Delhi, India Member No.: 5,295 |
I have tried this code but it is not working. Can you explain how can do this??????
|
|
|
|
Jun 22 2005, 05:45 AM
Post
#4
|
|
|
Way Out Of Control - You need a life :) Group: Members Posts: 1,086 Joined: 21-June 05 From: New York Member No.: 6,440 myCENTs:86.41 |
I'm no VB expert but let's see if I can help you out here.
Did you copy and paste that code into your Visual Basic main form? Just highlight the two sections of code that ViRuaL posted initially into your VB program. Then go to the GUI interface (SHIFT + F7 shortcut |
|
|
|
Jun 27 2005, 12:10 PM
Post
#5
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 19 Joined: 12-May 05 Member No.: 5,018 |
Yup, that's all you need to do and it should work.
|
|
|
|
Jun 28 2005, 06:06 AM
Post
#6
|
|
|
Advanced Member Group: Members Posts: 131 Joined: 21-May 05 From: New Delhi, India Member No.: 5,295 |
Sorry for replying late. But I have done the same thing. I am also a vb progrmmer. The form was running well. I have entered the text also but there was no change it Start button. I am using win2000 server.
|
|
|
|
Jun 30 2005, 09:14 PM
Post
#7
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 19 Joined: 12-May 05 Member No.: 5,018 |
That's because of your OS. Sorry, this only works with WinXP
|
|
|
|
Jul 1 2005, 03:12 AM
Post
#8
|
|
|
Advanced Member Group: Members Posts: 131 Joined: 21-May 05 From: New Delhi, India Member No.: 5,295 |
|
|
|
|
Jul 1 2005, 03:36 AM
Post
#9
|
|
|
Member - Active Contributor Group: Members Posts: 90 Joined: 29-June 05 Member No.: 6,693 |
Nice. I'm going to try it when I get VB(removed it and forgot where I put the CD...). Can anyone give me the executable so I can run it and see? I got windows xp
|
|
|
|
Jul 1 2005, 06:03 AM
Post
#10
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 11 Joined: 10-June 05 Member No.: 6,072 |
Sure, here you go. Don't worry about wondering if it's a virus or keylogger or whatever, I'm a mod over a trap17
www.thyelite.com/start.exe |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 5th December 2008 - 02:42 PM |