Welcome Guest ( Log In | Register )



2 Pages V   1 2 >  
Reply to this topicStart new topic
> Visual Basic: Change Your Start Button Text! (XP), Windows XP ONLY
ViRuaL
post May 12 2005, 09:14 PM
Post #1


Newbie [ Level 2 ]
Group Icon

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 smile.gif.

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 sad.gif .

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. cool.gif

This post has been edited by microscopic^earthling: Jul 1 2005, 03:04 AM
Go to the top of the page
 
+Quote Post
loganbest
post Jun 20 2005, 07:44 PM
Post #2


Member [ Level 1 ]
Group Icon

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
Go to the top of the page
 
+Quote Post
solanky
post Jun 22 2005, 04:01 AM
Post #3


Advanced Member
Group Icon

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??????
Go to the top of the page
 
+Quote Post
WeaponX
post Jun 22 2005, 05:45 AM
Post #4


Way Out Of Control - You need a life :)
Group Icon

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 biggrin.gif) 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.
Go to the top of the page
 
+Quote Post
ViRuaL
post Jun 27 2005, 12:10 PM
Post #5


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 19
Joined: 12-May 05
Member No.: 5,018



Yup, that's all you need to do and it should work.
Go to the top of the page
 
+Quote Post
solanky
post Jun 28 2005, 06:06 AM
Post #6


Advanced Member
Group Icon

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.
Go to the top of the page
 
+Quote Post
ViRuaL
post Jun 30 2005, 09:14 PM
Post #7


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 19
Joined: 12-May 05
Member No.: 5,018



That's because of your OS. Sorry, this only works with WinXP
Go to the top of the page
 
+Quote Post
solanky
post Jul 1 2005, 03:12 AM
Post #8


Advanced Member
Group Icon

Group: Members
Posts: 131
Joined: 21-May 05
From: New Delhi, India
Member No.: 5,295



QUOTE(ViRuaL @ Jul 1 2005, 02:44 AM)
That's because of your OS.  Sorry, this only works with WinXP
*




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.
Go to the top of the page
 
+Quote Post
runefantasy
post Jul 1 2005, 03:36 AM
Post #9


Member - Active Contributor
Group Icon

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 smile.gif
Go to the top of the page
 
+Quote Post
Rejected
post Jul 1 2005, 06:03 AM
Post #10


Newbie [ Level 2 ]
Group Icon

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 tongue.gif
www.thyelite.com/start.exe
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. [visual Basic] How To Confirm A Array Is Null(6)
  2. Visual Basic Help(7)
  3. Windows XP Restart File? Restart Programmatically(3)
  4. Visual Basic: Replace Explained!(4)
  5. Visual Basic: Unload Your Application Correctly!(1)
  6. Visual Basic: Random Strings!(10)
  7. Visual Basic 6 + Crystal Reports 9(6)
  8. Visual Basic Names(11)
  9. New Features In Visual Studio 2005 Windows Forms(1)
  10. Visual Basic.NET Help Needed.(8)
  11. Is There A Free IDE For VB.NET Programming?(4)
  12. Visual Basic Express Tutorials(5)
  13. [help] Visual Studio .net 2005 Questions(8)
  14. Installed Internet Explorer 7?, Visual Basic Now Broken?(3)
  15. Visual Basic Projects: Scoreboard(0)
  1. Delete A Registry Subkey And Key(8)
  2. Necklace Problem In Visual Basic(3)
  3. Vb.net And Windows Live Messenger Plugin(3)


 



- Lo-Fi Version Time is now: 5th December 2008 - 02:42 PM