Results 1 to 9 of 9

Thread: [RESOLVED] Bug in vb ?

  1. #1

    Thread Starter
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Resolved [RESOLVED] Bug in vb ?

    Amaizing !

    Code:
    Private Sub Command1_Click()
    MsgBox "test", vbExclamation, App.Title
    End Sub



    Now same msgbox code with in my app.


    See how message box appear?


    whats wrong?

  2. #2
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Bug in vb ?

    You overloaded the constant somewhere. I can do it too:
    Code:
    Private Sub Form_Load()
        Dim vbExclamation As Integer
        
        vbExclamation = 2
        MsgBox "test", vbExclamation, App.Title
    End Sub

  3. #3

    Thread Starter
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: Bug in vb ?

    You overloaded the constant somewhere
    sorry dilettante, whats this mean really?pls explain a bit.

  4. #4
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Bug in vb ?

    It means you declared a variable named vbExclamation somewhere. And somewhere along the line you set it to 2.

    "Overloading" is when you give the same literal name more than one meaning. In this case you can declare something in module or procedure scope that is named the same as a gobal constant. While you are within that scope the compiler only sees the local value.

  5. #5

    Thread Starter
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: Bug in vb ?

    Quote Originally Posted by dilettante
    It means you declared a variable named vbExclamation somewhere. And somewhere along the line you set it to 2.

    "Overloading" is when you give the same literal name more than one meaning. In this case you can declare something in module or procedure scope that is named the same as a gobal constant. While you are within that scope the compiler only sees the local value.
    tx dile,
    but i am 100 percent user i have not used vbExclamation as a variable name

  6. #6
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Bug in vb ?

    Well... at least do a Find and check.

    Otherwise you have quite a mystery on your hands.

  7. #7

    Thread Starter
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: Bug in vb ?

    any way dile,
    i put
    Code:
       MsgBox "test", 48, App.Title
    and working for now.

    http://visualbasic.freetutes.com/lea.../lesson18.html

  8. #8

    Thread Starter
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: Bug in vb ?

    Quote Originally Posted by dilettante
    Well... at least do a Find and check.

    Otherwise you have quite a mystery on your hands.
    find helped to find

    Yah i am using a 3rd pary code and just found this line
    Code:
    Private Const vbExclamation = 2

  9. #9
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: [RESOLVED] Bug in vb ?

    Wah-wahhhh.... LMBO

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