Jump to content
xisto Community
Sign in to follow this  
ViRuaL

Visual Basic: Change Your Start Button Text! (XP) Windows XP ONLY

Recommended Posts

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 :D.

 

Here is all the code you'll need:

Private Const WM_SETTEXT = &HCPrivate Const WM_GETTEXT = &HDPrivate Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPrivate Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As LongPrivate Declare Function SendMessageSTRING Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As LongPublic 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.

Private Sub Command1_Click()SetStartCaption Text1.TextEnd 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 :D .

 

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. :(

Edited by microscopic^earthling (see edit history)

Share this post


Link to post
Share on other sites

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 :lol:) and add a command button and a textbox. No need to rename it since ViRuaL is just using the default names. Now run the VB program. It should open up a program with a textbox and a button. All you have to do is type in what you want to say in your Start button and hit the command button.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

That's because of your OS.  Sorry, this only works with WinXP

<{POST_SNAPBACK}>


It's my mistake friend. I have not seen the word xp in the brackets. Today only I have noticed that. Really sorry for that.

I will try this at my home where I have XP.

Share this post


Link to post
Share on other sites

Sure, here you go. Don't worry about wondering if it's a virus or keylogger or whatever, I'm a mod over a Xisto :lol:http://www.thyelite.com/start.exe

Share this post


Link to post
Share on other sites

Thanks Rejected for exe. It is working fine on my collegue's XP Machine. She does have less knowledge of computer so she is very happy seeing the application. ...lol

Share this post


Link to post
Share on other sites

ViRuaL,Was wondering if you it would be cool if I posted the .exe of your start button name changer on my Guildwars Guild site for the use of my guild. Its a cool program and with your permission I'd like to post it up there and I will give you full credit for it.

Share this post


Link to post
Share on other sites

HEH hEH how did you find out about this Rejected?lol, I can picture on TV in front of the nation saying with a serious voice "Virual is no longer with the Xisto community, you should email him.. virual@gmail.com."yea that was pretty random leave me alone

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.