Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: VB6 Novice

  1. #1
    New Coder
    Join Date
    Feb 2004
    Location
    Virginia
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VB6 Novice

    Hey people...

    I just started vb6 a couple of months ago...im still basically a noob..and i need someone to sort of lead me in the right direction. I am having tremendous trouble with If then expressions, and im trying to figure out exactly how to use a module function ( enabling the application to leave information that has been put into it after the application is started )


    Please instant message me on aim : W0TH
    Umm...dude?
    Hell just broke loose...

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Please instant message me on aim : W0TH
    If you don't get any help that way (which is likely) then try posting the troublesome code here and work through the forum.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #3
    New Coder
    Join Date
    Feb 2004
    Location
    Virginia
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok...ill do that right now



    Private sub tocsocket_incomminginstantmessage (struser as string, strmessage as string, answer is boolean_

    If strmessage = "/away" then
    form1.tocsocket1.sendinstantmessage text1, "aim:goaway"
    endif
    end sub


    I dont see ANYTHING wrong with that code....ive asked alot of programmers for help, and they dont know either....
    Umm...dude?
    Hell just broke loose...

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well I can see things wrong:

    Code:
    Private sub tocsocket_incomminginstantmessage (struser as string, strmessage as string, answer is boolean_
    
    If strmessage = "/away" then
    form1.tocsocket1.sendinstantmessage text1, "aim:goaway"
    endif
    end sub
    The declaration is incorrect, "answer as boolean" and the trailing _ plus the missing ) to close the declaration makes that all wrong.

    The fact that you're only using "strmessage" within the sub yet require three parameters strikes me as rather strange too. There's nothing wrong with the if statement itself but unless you fix the problems ahead of it, it'll never run.

    Does this help?

    Oh yeah. I don't have IM of any brand available so all help from me will have to be done right here.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #5
    New Coder
    Join Date
    Feb 2004
    Location
    Virginia
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeah i know...i didnt look up the code before i posted it, i just wrote it, because ive basically memorized it bc i've used it so much...anyways....yeah i know its answer as boolean and the _ was a typo.

    I dont understand what your sayinf....can u post the code the way you'd use it?



    Oh yeah...and what exactly is boolean...ive been using it alot...i always write false?
    Umm...dude?
    Hell just broke loose...

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Cut and paste the code that's getting the error into the message, otherwise there's no way I can be sure you're even close.

    It would also help to know exactly which line of the code is the one with the error and the text of the error message wouldn't hurt either.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #7
    New Coder
    Join Date
    Feb 2004
    Location
    Virginia
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry

    Private Sub tocSocket1_IncomingInstantMessage(strScreenName As String, strMessage As String, blnAutoResponse As Boolean)
    If strMessage = ".away" Then
    Form1.tocSocket1.SendInstantMessage Text1, "aim:goaway:"
    End If




    stupid thing
    Umm...dude?
    Hell just broke loose...


  •  

    Posting Permissions

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