Results 1 to 7 of 7

Thread: Problam Still!

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Location
    none
    Posts
    19

    Unhappy

    Im trying to Change all the windows captions to "hello world" in VB5

    how would I do this?


    [Edited by Mr Mo Wha on 07-17-2000 at 09:56 PM]

  2. #2
    Hyperactive Member
    Join Date
    Dec 1999
    Posts
    321

    Umm.....


    Excuse me but... what in the whole world are you talking about??


    You know, if you wrote more than 9 words explaining your problem, someone might even be able to help you.
    Signed, Rodik ([email protected])
    Programmer,usesVB6ED
    ===========================
    Copyright©RodikCo,2002.

    Dont mind this signature ;] Its old

  3. #3
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    He's talking about an earlier post:http://forums.vb-world.net/showthrea...threadid=23027

    Laterz,
    D!m
    Dim

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Location
    none
    Posts
    19
    Ugg, this is just to fusterating, I will try again later

  5. #5
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    461
    Whats frustrating?

    That people aren't falling all over themselves to give you the answer on a silver platter?

    Or that someone doesn't have an answer for doing something completely stupid, totally useless and absolutely pointless?

    This is a place for learning VB "PROGRAMMING" not VB "HACKING"... The question you asked doesn't promote programming or visual basic but instead infuriates people when someone writes code that effectively "vandalizes" their computer such as what you are proposing.

    What I think is frustrating is people who come in here, drop a 9 word question about annoying people by vandalizing their computer and get all snotty when they don't get the answer they want.

  6. #6
    Guest
    Okay, refer to your other thread..Kedaman had a good example. By the way, why'd you ask this question again? What was wrong with Kedaman's answer?

    http://forums.vb-world.net/showthrea...threadid=22370

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Location
    none
    Posts
    19

    Post

    sorry everyone for being so snobby, been working out problams for 6 hours yesterday! I'm new and trying to learn VB until the summer is over. I already know alot about API, like find windows and such, but not enough. Kedaman's answer seemed right but I didn't test it until after I posted my message :/

    For this problam I have about changing all of the window captions to a string...

    I have this is my modual>>

    Private Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
    Private handles&(), counter&
    Private Function EnmWinProc(ByVal hwnd As Long, ByVal lParam As Long) As Long
    Dim sCaption As String * 255
    ReDim Preserve handles(counter)
    handles(counter) = hwnd
    counter = counter + 1
    EnumWindowsProc = hwnd
    End Function
    Public Function GetWindows()
    ReDim handles(0)
    counter = 0
    Call EnumWindows(AddressOf EnmWinProc, 0&)
    ListWindows = handles
    End Function

    <<<

    same thing that kedaman posted, but my problam is in the button command_click

    >>

    Dim n As Variant
    For Each n In GetWindows
    n = SetWindowText(n, "hello world!")
    Next n

    <<<

    It seems that there is a run time error "13". Everything is fine until I push the button.


    Mathew, this is a simple program for myself, I thought it would be neat to see if I could change my windows captions.


    (Im tring to learn Vb the best I can, I made my first API SPY for myself, I submited it to ZDnet, you can download it at

    http://hotfiles.zdnet.com/cgi-bin/te...s_utilities&b=


    it is only 28kb really small file. Please tell me what you think.)



    Thanks for your help,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width