Old 19th June 2002, 11:25   #1
and1k
Senior Member
 
and1k's Avatar
 
Join Date: Apr 2001
Location: 6" from my screen.
Posts: 410
Another VB question.

I want to control Winamp from a Visual Basic Application that I'm making, unfortunately the code from this page doesn't work.

Visual Basic (6) highlights the class name of the program, (Winamp v1.x) and says "Invalid outside procedure"

I assume that this means that VB canb't find Winamp, even though it's running at the time.

and1k. Very confused.

I would thank you kindly not to sniff my chicken
and1k is offline   Reply With Quote
Old 19th June 2002, 18:06   #2
liquidmotion
Smokes Two Joints
Beta Team
 
liquidmotion's Avatar
 
Join Date: Feb 2001
Location: SFBA
Posts: 3,680
Send a message via ICQ to liquidmotion
are you calling it correctly?

if you send me the project, i could take a look.

For a good time: shup | stashbox | my homepage
liquidmotion is offline   Reply With Quote
Old 19th June 2002, 20:27   #3
and1k
Senior Member
 
and1k's Avatar
 
Join Date: Apr 2001
Location: 6" from my screen.
Posts: 410
I'll send it to you as an attachment to a PM when I'm next on my other computer, the on with VB on it.

I actually just copied and pasted the VB code into a module, then pressed F5 to run it, and it highlighted the class name, then said Invalid Outside Process (or whatever, I can't remember)

and1k.

I would thank you kindly not to sniff my chicken
and1k is offline   Reply With Quote
Old 19th June 2002, 20:43   #4
eleet-2k2
Forum King
 
eleet-2k2's Avatar
 
Join Date: Aug 2001
Location: Mobil Ave.
Posts: 5,381
Quote:
Originally posted by and1k
If it's giving you a message "Invalid outside procedure" then that means you must put that bit of code into a proceudre, like a button_Click event, or Form_Load.

From MSDN Help:

nvalid outside procedure


The statement must occur within a Sub or Function, or a property procedure (Property Get, Property Let, Property Set). This error has the following cause and solution:

An executable statement, Static or ReDim, appears atmodule level.
Static is unnecessary at module level, since all module-levelvariables are static. Use Dim instead of ReDim at module level. To create a dynamicarray at module level, declare it with Dim using empty parentheses.

Note At module level, you can use onlycomments and declarative statements, such as Const, Declare, Deftype, Dim, Option Base, Option Compare, Option Explicit, Option Private, Private, Public, and Type. The Sub, Function, and Property statements occur outside the body of theirprocedures, but within the procedure declaration.

"Welcome to the Island of people who know too much."..."Did you really think balloons would stop him?!"
See what I'm listening too.
eleet-2k2 is offline   Reply With Quote
Old 20th June 2002, 02:55   #5
xincale
Junior Member
 
Join Date: Jun 2002
Posts: 3
hi

If you need,I can send a ClASS to you that have been modified
It work well
xincale is offline   Reply With Quote
Old 20th June 2002, 07:51   #6
and1k
Senior Member
 
and1k's Avatar
 
Join Date: Apr 2001
Location: 6" from my screen.
Posts: 410
Quote:
Originally posted by 31337-2k2
If it's giving you a message "Invalid outside procedure" then that means you must put that bit of code into a proceudre, like a button_Click event, or Form_Load.
Thanks, I'll try that.

I thought it meant that I was trying to access something that was a procedure (i.e. program) outside Visual Basic! d'oh!

and1k

I would thank you kindly not to sniff my chicken
and1k is offline   Reply With Quote
Old 20th June 2002, 13:51   #7
and1k
Senior Member
 
and1k's Avatar
 
Join Date: Apr 2001
Location: 6" from my screen.
Posts: 410
How to output

I'm trying to write a custom function in Visual Basic, that encrypts a string of text (using a VERY basic alogrythm) and outputs the encrypted text. Only trouble is that I don't know how to output the text. Do I assign it to a variable called Output? Do I let it run by itself, and hope that it'll output the encrypted text by itself?

here's the code, if it helps:

code:

Sub Decrypt(Str As String, Level As Integer)
Dim StartPoint As Integer
For StartPoint = 1 To Len(Str) Step 1
Output = Output & Chr(Asc(Mid(Str, StartPoint, 1) - (Level)))
Next StartPoint
End Sub



In the code above, the code returns a variable called Output.
The variable StartPoint is simply the first thing that came to mind when I wanted something to make a loop with.

and1k.

I would thank you kindly not to sniff my chicken
and1k is offline   Reply With Quote
Old 20th June 2002, 18:51   #8
eleet-2k2
Forum King
 
eleet-2k2's Avatar
 
Join Date: Aug 2001
Location: Mobil Ave.
Posts: 5,381
The code looks alright, but I havent tried it.

COuld you possibly send me the source to that Winamp Control app. If you want I can send you some encrypt/decrypt functions I made a while ago if you want or if you wish to trade. Thanks!!

"Welcome to the Island of people who know too much."..."Did you really think balloons would stop him?!"
See what I'm listening too.
eleet-2k2 is offline   Reply With Quote
Old 21st June 2002, 07:38   #9
and1k
Senior Member
 
and1k's Avatar
 
Join Date: Apr 2001
Location: 6" from my screen.
Posts: 410
Quote:
Originally posted by 31337-2k2
The code looks alright, but I havent tried it.

COuld you possibly send me the source to that Winamp Control app. If you want I can send you some encrypt/decrypt functions I made a while ago if you want or if you wish to trade. Thanks!!
The 'Winamp Control App' is just a theoretical possibility at the moment. I thought that it would be a cool thing to make, kinda like a Smoke for Winamp Screensaver, then I found The Winamp Screensaver, and decided to use that instead. The only source code I have for it is the stuff on the page that I linked to above.
(sorry to disappoint)

And about the code, it works fine, the only problem is that it's in a function, and I need to know how to output the text back into the procedure that called it.

and1k.

I would thank you kindly not to sniff my chicken
and1k is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Community Center > General Discussions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump