|
-
Jul 17th, 2000, 08:49 PM
#1
Thread Starter
Junior Member
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]
-
Jul 17th, 2000, 08:53 PM
#2
Hyperactive Member
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
-
Jul 17th, 2000, 08:56 PM
#3
Fanatic Member
-
Jul 17th, 2000, 09:01 PM
#4
Thread Starter
Junior Member
Ugg, this is just to fusterating, I will try again later
-
Jul 17th, 2000, 09:10 PM
#5
Hyperactive Member
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.
-
Jul 17th, 2000, 09:23 PM
#6
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
-
Jul 18th, 2000, 04:04 PM
#7
Thread Starter
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|