Code Error in Start button Renamer menu

Shout-Out

User Tag List

Results 1 to 8 of 8
  1. #1
    Jonthe838's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2008
    Posts
    373
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Code Error in Start button Renamer

    hi i have followed a guide how to create a Windows Start Button Renamer but there is somthing wrong with my code... can some1 take a look?
    Code:
    Public Class Form1
        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(ByVal 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(TextBox1.Text)
        End Sub
    
    End Class

    As u can see have i done the Left word red becous there is somethign wrong with it? ^^ i dont understand the error :P ^^ thx
    Lines of Coding: |||||||||| Goal 1000
    Current: 677 Achived Goals: 500 Lines


    Code Error in Start button Renamer
  2. #2
    visitor's Avatar Contributor
    Reputation
    174
    Join Date
    Mar 2008
    Posts
    307
    Thanks G/R
    16/15
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    Public Class Form1
        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(ByVal 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 = Microsoft.VisualBasic.Left(str, 5)
            SendMessageSTRING(StartBarText, WM_SETTEXT, 256, sCaption)
            Exit Sub
        End Sub
        Private Sub Command1_Click()
            SetStartCaption(TextBox1.Text)
        End Sub
    
    End Class
    the simple left worked in the prev versions
    Hey I just met you

  3. #3
    Jonthe838's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2008
    Posts
    373
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh! ^^ thank u so much!!
    i have another question... how do i do so a textbox shows some information?
    Last edited by Jonthe838; 04-28-2009 at 11:44 PM.
    Lines of Coding: |||||||||| Goal 1000
    Current: 677 Achived Goals: 500 Lines


  4. #4
    ReidE96's Avatar Archer Authenticator enabled
    Reputation
    470
    Join Date
    Dec 2006
    Posts
    1,625
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Textbox1.Text = "Blah blah blah"

  5. #5
    visitor's Avatar Contributor
    Reputation
    174
    Join Date
    Mar 2008
    Posts
    307
    Thanks G/R
    16/15
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    and textbox1.readonly = true (optional)
    Hey I just met you

  6. #6
    Jonthe838's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2008
    Posts
    373
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice! thx +rep after that i have spread :/
    Lines of Coding: |||||||||| Goal 1000
    Current: 677 Achived Goals: 500 Lines


  7. #7
    Garosie's Avatar Active Member
    Reputation
    18
    Join Date
    Jul 2007
    Posts
    68
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I cant make it work in Visual Basic 2008 (Have changed button codes and such) so its vb 2008 codes, but nothing happens when i press.

  8. #8
    Jonthe838's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2008
    Posts
    373
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i got the same problem... im going to try to solve it but im not sure if i will able to :/
    Lines of Coding: |||||||||| Goal 1000
    Current: 677 Achived Goals: 500 Lines


Similar Threads

  1. error when starting server with pics!
    By finger in forum WoW EMU Guides & Tutorials
    Replies: 1
    Last Post: 08-31-2008, 05:46 AM
  2. Error When Starting Ascent-World... Please Help!
    By Monarch in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 07-22-2008, 09:30 PM
  3. Error when starting my MaNGOSx server (mac)
    By deethis in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 06-03-2008, 03:40 AM
  4. Error when starting Logonserver
    By joober in forum World of Warcraft Emulator Servers
    Replies: 18
    Last Post: 05-17-2008, 12:47 PM
  5. Change the text on your start button!
    By TwiceoveR in forum Community Chat
    Replies: 3
    Last Post: 02-01-2007, 09:15 PM
All times are GMT -5. The time now is 12:11 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search