+ Reply to Thread
Results 1 to 4 of 4

Thread: If Statement Problem

  1. #1
    Newbie .Sin is an unknown quantity at this point
    Join Date
    Jan 2008
    Posts
    4

    If Statement Problem

    Hey, I have another quick question.

    I have an if statement
    that says
    Code:
    if cmdOK.Visible = false then GoTo form2
    and when i click the button it says label not defined
    Last edited by TcM; 01-17-2008 at 09:03 AM. Reason: Add Code Tags

  2. #2
    TcM
    TcM is offline
    Code Warrior TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM is a name known to all TcM's Avatar
    Join Date
    Aug 2006
    Posts
    11,461
    Blog Entries
    6
    Please Use Code Tags in your posts, takes only a sec
    Please Make a New Thread For Every Separate Question You Have


    Now to your Question:

    Your code is wrong it should be something like

    Code:
    If cmdOk.Visible = False Then Form2.Show
    Hope it helped. If It did help please don't forget to add +rep to my post, Thanks

  3. #3
    Newbie HiGuys is an unknown quantity at this point
    Join Date
    Mar 2009
    Posts
    2

    Re: If Statement Problem

    Code:
    If(cmdOk.Visible = False) Then {
    Form2.Show
    }

  4. #4
    Xav
    Xav is offline
    Code Slinger Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav's Avatar
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,210
    Blog Entries
    13

    Re: If Statement Problem

    Sorry HiGuys, your code won't work.

    You are mixing two different languages. The curly braces {} are a C# syntax, while the single comparison operator = instead of == is a VB.NET syntax.

    VB.NET:
    Code:
    If Not (cmdOk.Visible) Then Form2.Show
    C#:
    Code:
    if (!cmdOk.Visible) Form2.Show();

    Quote Originally Posted by Jordan View Post
    Good members, like yourself, stick around and post for ages to come!
    Mr. Xav | Blog | Forums

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. i have a problem please help me!!!????
    By stack in forum Java Help
    Replies: 10
    Last Post: 05-26-2009, 08:35 AM
  2. Peculiar UI Problem Needs Tackling
    By adriyel in forum C# Programming
    Replies: 2
    Last Post: 04-06-2008, 07:46 AM
  3. How to tackle a programming problem?
    By TcM in forum General Programming
    Replies: 10
    Last Post: 01-07-2008, 11:29 AM
  4. [C] Comparison problem
    By Alhazred in forum C and C++
    Replies: 1
    Last Post: 08-29-2007, 04:58 AM
  5. A small problem in the output
    By The_Master in forum C and C++
    Replies: 3
    Last Post: 12-13-2006, 12:04 PM

Bookmarks

Bookmarks

     
        Algorithms and Data Structures

        Java tutorials

        Algorithms Forum

Posting Permissions

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