Matrix effect in VB???

Discussion in 'Software Q&A' started by deepak.krishnan, Aug 6, 2006.

Thread Status:
Not open for further replies.
  1. deepak.krishnan

    deepak.krishnan New Member

    Joined:
    Jan 11, 2005
    Messages:
    423
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Palakkad/Bangalore
    Hi friends,
    I would like to know how to create a matrix effect in Visual Basic 6. I got a VB project and the link is given below. In that thing, it displays " Matrix Fall". I want it to change it to "Infosoft E-Learn" . Can you please help? It is really urgent.

    http://www.freevbcode.com/source/MatrixFall2.zip
     
  2. siriusb

    siriusb New Member

    Joined:
    May 12, 2005
    Messages:
    1,171
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Chennai, India, Asia, the Earth, the Solar system,
    Go to the class ClsTexte.cls and locate the funtion Class_Initialize()
    Replace the three strings with custom strings. It supports only small letter alphabets. No capital letters or other characters.
    To increase or decrease the number of strings to be displayed, increase/decrease the PauseTexte array size.

    Is this code given for free use?
     
  3. OP
    OP
    deepak.krishnan

    deepak.krishnan New Member

    Joined:
    Jan 11, 2005
    Messages:
    423
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Palakkad/Bangalore
    yah the code is for free use.

    Also If I have to add more text, then is it enough to add this:
    PauseTexte(3)=150
    Textesz(3)=" Text "
     
    Last edited: Aug 7, 2006
  4. OP
    OP
    deepak.krishnan

    deepak.krishnan New Member

    Joined:
    Jan 11, 2005
    Messages:
    423
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Palakkad/Bangalore
    Thanks yaar. Its great and working fine now.
    But when I tried to convert it to *.exe then a grey screen came and when I pressed entwer it terminated.
    I want to add the above program into my project and then convert it into 8.exe format. Can you please help?
     
  5. siriusb

    siriusb New Member

    Joined:
    May 12, 2005
    Messages:
    1,171
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Chennai, India, Asia, the Earth, the Solar system,
    You have to copy the .png files to the .exe's folder as well.
     
  6. OP
    OP
    deepak.krishnan

    deepak.krishnan New Member

    Joined:
    Jan 11, 2005
    Messages:
    423
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Palakkad/Bangalore
    I didnt understand what you meant by *.png files.Can you please tell me what you meant?
     
  7. siriusb

    siriusb New Member

    Joined:
    May 12, 2005
    Messages:
    1,171
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Chennai, India, Asia, the Earth, the Solar system,
    Dude, where else? In the project's folder. That is where the project1.vbp and form1.frm files are.
     
  8. OP
    OP
    deepak.krishnan

    deepak.krishnan New Member

    Joined:
    Jan 11, 2005
    Messages:
    423
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Palakkad/Bangalore
    I wanted to know what are those *.png files you mentioned about and not the location where it has to be copied.
     
  9. mehulved

    mehulved 18 Till I Die............

    Joined:
    Jul 15, 2004
    Messages:
    5,790
    Likes Received:
    44
    Trophy Points:
    0
    Location:
    India, Mumbai, Marine Lines
    He means copy all the files with png extension, used in the project into the folder where project1.vbp and form1.frm files are.
     
  10. siriusb

    siriusb New Member

    Joined:
    May 12, 2005
    Messages:
    1,171
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Chennai, India, Asia, the Earth, the Solar system,
    The png files are image files that store the different alphabets and other grapics that are shown when the program is run. Go ahead and open one in an good image editing app(not mspaint).
     
  11. OP
    OP
    deepak.krishnan

    deepak.krishnan New Member

    Joined:
    Jan 11, 2005
    Messages:
    423
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Palakkad/Bangalore
    I got a problem. I copied all the forms and other modules etc. into my project in Visual Basic. But when I tried to run, it showed a error in the code in ModDeclerations. It said something like "constant function required" and hightlighted this part of the code : D3DFVF_XYZRHW

    How can I remove this error and make this the form that opens on opening the project ? Also when the user hits escape button, the main form must open in that event.
     
  12. siriusb

    siriusb New Member

    Joined:
    May 12, 2005
    Messages:
    1,171
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Chennai, India, Asia, the Earth, the Solar system,
    You have to make a reference to the directx 8 library. That is where the consts are declared. Do this:
    -Clik on the menu in vb Project->References
    -Select "Directx 8 for vb type library"

    Now run your proj.

    As for opening a custom form, go to the frmMain.frm's code and look for the form_keypress event and add your form display code in the vbkeyescape event.
    Edit: Ok wait, adding code to vbkeyescape don't seem to work. You have to add the form loading code after the form_load event's unload code (the last line). But even then, the screen's res changes to 1024x768. Hmm... directx stuff.
     
    Last edited: Aug 22, 2006
  13. OP
    OP
    deepak.krishnan

    deepak.krishnan New Member

    Joined:
    Jan 11, 2005
    Messages:
    423
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Palakkad/Bangalore
    Thanks!!! It worked fine. I had already given the coding to load the form in form_unload event in VB. Thanks.
     
Thread Status:
Not open for further replies.

Share This Page