7 Replies - 767 Views - Last Post: 03 March 2011 - 08:03 AM Rate Topic: *---- 1 Votes

#1 boafoko  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 02-March 11

I need help with a VB.NET Problem ,

Posted 02 March 2011 - 04:34 PM

I need help with creating a mad lib game in visual basic 6.0 ,am stuck in the coding process.
Is This A Good Question/Topic? 0
  • +

Replies To: I need help with a VB.NET Problem ,

#2 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: I need help with a VB.NET Problem ,

Posted 02 March 2011 - 04:51 PM

Ummm....how is this a VB.Net problem if you're trying to create it in VB6?
Was This Post Helpful? 0
  • +
  • -

#3 Jack Eagles1  Icon User is offline

  • Pugnacious Penguin (inspired by no2pencil)
  • member icon

Reputation: 183
  • View blog
  • Posts: 1,152
  • Joined: 10-December 08

Re: I need help with a VB.NET Problem ,

Posted 02 March 2011 - 05:01 PM

There's a new wave of developers coming to D.I.C who expect you to use ESP to find out what the question is.
Was This Post Helpful? 0
  • +
  • -

#4 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6063
  • View blog
  • Posts: 23,517
  • Joined: 23-August 08

Re: I need help with a VB.NET Problem ,

Posted 02 March 2011 - 05:01 PM

So which is it? VB6 or VB.NET? And where's the code you've tried, in CODE TAGS, as shown below:

:code:

And if that's too complicated, see the first link in my signature.
Was This Post Helpful? 0
  • +
  • -

#5 boafoko  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 02-March 11

Re: I need help with a VB.NET Problem ,

Posted 02 March 2011 - 07:13 PM

View PostBobRodes, on 02 March 2011 - 04:51 PM, said:

Ummm....how is this a VB.Net problem if you're trying to create it in VB6?


I want to convert/put this code in visual basic 6.0,how do i do it?
[<html>
<head>
<!--
Author: Shady Tyrant
Date 2/25/09
Make a silly story from some input terms
-->
<title>
Mad Lib
</title>
<script>
function makeML()
{
       var sound;
       var part;
       var descrip = "";
       var vehicle;
       var animal;
       var story = "";
       var i;
       
       person = document.myForm.txtPerson.value;
       vehicle = document.myForm.txtVehicle.value;
       animal = document.myForm.txtAnimal.value;
       
       if(document.myForm.chkEvil.checked==true)
       {
              descrip += document.myForm.chkEvil.value;
              descrip += ", ";
       }
       if(document.myForm.chkGoofy.checked==true)
       {
              descrip += document.myForm.chkGoofy.value;
              descrip += ", ";
       }
       if(document.myForm.chkDysfunc.checked==true)
       {
              descrip += document.myForm.chkDysfunc.value;
              descrip += ", ";
       }
       if(document.myForm.chkWacky.checked==true)
       {
              descrip += document.myForm.chkWacky.value;
              descrip += ", ";
       }
       
       for(i = 0; i<= 3; i++)
       {
              if(document.myForm.optSound[i].checked == true)
              {
                     sound = document.myForm.optSound[i].value;
              }
       }
       
       var theSelect = document.myForm.selBody;
       var theOption = theSelect[theSelect.selectedIndex];
       part = theOption.value;
       
       story = "One day, a person named ";
       story += person;
       story += " was walking down the street. Suddenly,";
       story += person;
       story += " heard an awful ";
       story += descrip;
       story += " mysterious ";
       story += sound;
       story += " sound. ";
       story += person;
       story += " looked around and saw that the ";
       story += sound;
       story += " sound was coming from a ";
       story += vehicle;
       story += " careening madly down the street. ";
       story += person;
       story += "'s fear turned to terror as "
       story += person;
       story += " realized that the ";
       story += vehicle;
       story += " was driven by none other than the evil Super-";
       story += animal; 
       story += ".  Once an ordinary ";
       story += animal;
       story += ", it had befallen a strange transformation after ";
       story += "being dropped in a vat of nuclear waste. ";
       story += " Super-"
       story += animal;
       story += " continued to taunt ";
       story += person;
       story += " with the horrible ";
       story += sound;
       story += " noise, but ";
       story += person;
       story += " was undeterred. \"You can't bother me, Super-";
       story += animal;
       story += "!  I know how to turn the other ";
       story += part;
       story += "! \n"
       story += "The End."
       
       document.myForm.txtStory.value = story;
}
</script>
</head>
<body>
 
<center>
<h1>Mad Lib</h1>
<hr />
<form name="myForm">
<h3>Please enter the following</h3>
<table border="1">
       <tr>
              <td>
                     A Persons Name <input type="text" name="txtPerson" />
              </td>
       </tr>
       
       <tr>
              <td>
                     <input type="checkbox" name="chkEvil" value="evil" />Evil
                     <input type="checkbox" name="chkGoofy" value="goofy" />Goofy
                     <input type="checkbox" name="chkDysfunc" value="dysfunctional" />Dysfunctional
                     <input type="checkbox" name="chkWacky" value="wacky" />Wacky
              </td>
       </tr>
       
       <tr>
              <td>
                     <input type="radio" name="optSound" value="phht!" />Phht!
                     <input type="radio" name="optSound" value="boing!" />Boing!
                     <input type="radio" name="optSound" value="whoosh!" />Whoosh!
                     <input type="radio" name="optSound" value="splat!" />Splat!
              </td>
       </tr>
       
       <tr>
              <td>
                     <select name="selBody">
                            <option value="tooth">Tooth</option>
                            <option value="kidney stone">Kidney Stone</option>
                            <option value="cheek">Cheek</option>
                            <option value="elbow">Elbow</option>
                            <option value="brain">Brain</option>
                     </select>
              </td>
       </tr>
       
       <tr>
              <td>
                     A Vehicle <input type="text" name="txtVehicle" />
              </td>
       </tr>
       
       <tr>
              <td>
                     A type of Animal <input type="text" name="txtAnimal" />
              </td>
       </tr>
       
       <tr>
              <td colspan="2">
                     <center><input type="button" value="Click for Story" onclick="makeML()" /></center>
              </td>
       </tr>
       
       <tr>
              <td colspan="2">
                     <textarea name="txtStory" rows="10" cols="55"></textarea>
              </td>
       </tr>
</table>
</form>
</center>
<hr />
</body>
</html>]

Thanks very much.

This post has been edited by modi123_1: 02 March 2011 - 07:46 PM
Reason for edit:: please use the code tags as suggested

Was This Post Helpful? 0
  • +
  • -

#6 boafoko  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 02-March 11

Re: I need help with a VB.NET Problem ,

Posted 02 March 2011 - 10:40 PM

View Postboafoko, on 02 March 2011 - 07:13 PM, said:

View PostBobRodes, on 02 March 2011 - 04:51 PM, said:

Ummm....how is this a VB.Net problem if you're trying to create it in VB6?


I want to convert/put this code in visual basic 6.0,how do i do it?
[<html>
<head>
<!--
Author: Shady Tyrant
Date 2/25/09
Make a silly story from some input terms
-->
<title>
Mad Lib
</title>
<script>
function makeML()
{
       var sound;
       var part;
       var descrip = "";
       var vehicle;
       var animal;
       var story = "";
       var i;
       
       person = document.myForm.txtPerson.value;
       vehicle = document.myForm.txtVehicle.value;
       animal = document.myForm.txtAnimal.value;
       
       if(document.myForm.chkEvil.checked==true)
       {
              descrip += document.myForm.chkEvil.value;
              descrip += ", ";
       }
       if(document.myForm.chkGoofy.checked==true)
       {
              descrip += document.myForm.chkGoofy.value;
              descrip += ", ";
       }
       if(document.myForm.chkDysfunc.checked==true)
       {
              descrip += document.myForm.chkDysfunc.value;
              descrip += ", ";
       }
       if(document.myForm.chkWacky.checked==true)
       {
              descrip += document.myForm.chkWacky.value;
              descrip += ", ";
       }
       
       for(i = 0; i<= 3; i++)
       {
              if(document.myForm.optSound[i].checked == true)
              {
                     sound = document.myForm.optSound[i].value;
              }
       }
       
       var theSelect = document.myForm.selBody;
       var theOption = theSelect[theSelect.selectedIndex];
       part = theOption.value;
       
       story = "One day, a person named ";
       story += person;
       story += " was walking down the street. Suddenly,";
       story += person;
       story += " heard an awful ";
       story += descrip;
       story += " mysterious ";
       story += sound;
       story += " sound. ";
       story += person;
       story += " looked around and saw that the ";
       story += sound;
       story += " sound was coming from a ";
       story += vehicle;
       story += " careening madly down the street. ";
       story += person;
       story += "'s fear turned to terror as "
       story += person;
       story += " realized that the ";
       story += vehicle;
       story += " was driven by none other than the evil Super-";
       story += animal; 
       story += ".  Once an ordinary ";
       story += animal;
       story += ", it had befallen a strange transformation after ";
       story += "being dropped in a vat of nuclear waste. ";
       story += " Super-"
       story += animal;
       story += " continued to taunt ";
       story += person;
       story += " with the horrible ";
       story += sound;
       story += " noise, but ";
       story += person;
       story += " was undeterred. \"You can't bother me, Super-";
       story += animal;
       story += "!  I know how to turn the other ";
       story += part;
       story += "! \n"
       story += "The End."
       
       document.myForm.txtStory.value = story;
}
</script>
</head>
<body>
 
<center>
<h1>Mad Lib</h1>
<hr />
<form name="myForm">
<h3>Please enter the following</h3>
<table border="1">
       <tr>
              <td>
                     A Persons Name <input type="text" name="txtPerson" />
              </td>
       </tr>
       
       <tr>
              <td>
                     <input type="checkbox" name="chkEvil" value="evil" />Evil
                     <input type="checkbox" name="chkGoofy" value="goofy" />Goofy
                     <input type="checkbox" name="chkDysfunc" value="dysfunctional" />Dysfunctional
                     <input type="checkbox" name="chkWacky" value="wacky" />Wacky
              </td>
       </tr>
       
       <tr>
              <td>
                     <input type="radio" name="optSound" value="phht!" />Phht!
                     <input type="radio" name="optSound" value="boing!" />Boing!
                     <input type="radio" name="optSound" value="whoosh!" />Whoosh!
                     <input type="radio" name="optSound" value="splat!" />Splat!
              </td>
       </tr>
       
       <tr>
              <td>
                     <select name="selBody">
                            <option value="tooth">Tooth</option>
                            <option value="kidney stone">Kidney Stone</option>
                            <option value="cheek">Cheek</option>
                            <option value="elbow">Elbow</option>
                            <option value="brain">Brain</option>
                     </select>
              </td>
       </tr>
       
       <tr>
              <td>
                     A Vehicle <input type="text" name="txtVehicle" />
              </td>
       </tr>
       
       <tr>
              <td>
                     A type of Animal <input type="text" name="txtAnimal" />
              </td>
       </tr>
       
       <tr>
              <td colspan="2">
                     <center><input type="button" value="Click for Story" onclick="makeML()" /></center>
              </td>
       </tr>
       
       <tr>
              <td colspan="2">
                     <textarea name="txtStory" rows="10" cols="55"></textarea>
              </td>
       </tr>
</table>
</form>
</center>
<hr />
</body>
</html>]

Thanks very much.

I would like to know if i can use this code in visual basic 6.0 or vb.net.

I would like to know if i can use this code in visual basic or vb.net.
Am trying to create a program similar to the mad-lib ,which will create sentences from a list of word types .i need help.
thanks very much.
Was This Post Helpful? 0
  • +
  • -

#7 3P1C_F@!l  Icon User is offline

  • D.I.C Head

Reputation: 8
  • View blog
  • Posts: 98
  • Joined: 01-March 11

Re: I need help with a VB.NET Problem ,

Posted 03 March 2011 - 07:48 AM

Let me find someone elses html/javascript stumble into a forum and ask someone to convert said script into VB6 for me and post the topic in the wrong forum.. this is for you.. :fuck-8: Oh and please...... READ A BOOK! :bigsmile:
Was This Post Helpful? 0
  • +
  • -

#8 demausdauth  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 178
  • View blog
  • Posts: 650
  • Joined: 03-February 10

Re: I need help with a VB.NET Problem ,

Posted 03 March 2011 - 08:03 AM

Really hope shady approves of you using his/her code.

Start here ---> Starting VB.Net tutorial
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1