Thread: Cannot convert "int" to "TForm2" problem (with screenshot)

  1. #1
    Registered User
    Join Date
    Mar 2008
    Location
    Austria
    Posts
    4

    Talking Cannot convert "int" to "TForm2" problem (with screenshot)

    Hi all!

    I'm not only new to this forum, i'm also new to programming
    At the moment, i'm still learning to understand everything of the syntax. The sites and books i've read so far explain most of the code like writing a C application. I want to do OOP so i tried if i understood "IF" with a little program.

    It's really simple:

    I have a form with a textfield and a second form with an OK button. Now i wanted to write code so the second form opens if i type "1" in the text field.
    Here's what it looks like:
    http://666kb.com/i/awwek1s2ys2ypxoro.jpg

    Did i make a mistake in the code? Or is this action not possible with this component?
    Last edited by Raze88; 03-13-2008 at 10:10 AM.

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    probably - you want Form2-> and not Form2>
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    Registered User
    Join Date
    Mar 2008
    Location
    Austria
    Posts
    4
    Ha! That's it! Such a little but important mistake

    Thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. convert double to string problem
    By gandalf_bar in forum C++ Programming
    Replies: 6
    Last Post: 03-15-2004, 05:14 AM
  2. Replies: 5
    Last Post: 12-03-2003, 05:47 PM
  3. atoi convert problem
    By Ray Schmidt in forum C++ Programming
    Replies: 6
    Last Post: 02-07-2003, 11:05 PM
  4. problem with output
    By Garfield in forum C Programming
    Replies: 2
    Last Post: 11-18-2001, 08:34 PM