RSBDavid Posted October 4, 2007 Share Posted October 4, 2007 My layout:(this is a test)(i have everything i want to know embedded into picture) [software Engineer] - [Ability Bar Suggestion] - [Gaming Enthusiast] Link to comment Share on other sites More sharing options...
cem22lp Posted October 4, 2007 Share Posted October 4, 2007 Dim monsterxp As Integer 'declare variables Dim amount As Integer Private Sub Command1_Click() monsterxp = Text1.Text 'copy text box values to variables amount = Text2.Text Text3.Text = 4 * amount * monsterxp 'calculate and output in the text box End Sub kinda crude way of doing it but since im assuming your the only one using it, it should work (dont enter 0's or letters ;)) you may also have to rename the text boxes depending on how you set it up, just use something that explains what they are better than i did Link to comment Share on other sites More sharing options...
JoeDaStudd Posted October 5, 2007 Share Posted October 5, 2007 to added to cem22lp's post. Private Sub Button1_Click() 'Declare your variables Dim MonsterExp as integer Dim Amount as integer Dim TotalExp as double 'Check they have only entered numbers in the textboxes if isnumeric(textbox1.text) and isnumeric(textbox2.text) then MonsterExp = textbox1.text Amount=textbox2.text TotalExp=(4 x MonsterExp)*Amount textbox3.text=MonsterExp else msgbox("You must only enter numbers into the textboxes") End if End Sub If you add a picture box to the form and then double click the picture box it should give the option to add a image to the picture box [hide=Drops]Dragon Axe x11Berserker Ring x9Warrior Ring x8SeercullDragon MedDragon Boots x4 - all less then 30 kcGodsword Shard (bandos)Granite Maul x 3Solo only - doesn't include barrows[/hide][hide=Stats][/hide] Link to comment Share on other sites More sharing options...
RSBDavid Posted October 5, 2007 Author Share Posted October 5, 2007 the codes aren't working, everytime i click "calculte" nothing happens, can someone help? [software Engineer] - [Ability Bar Suggestion] - [Gaming Enthusiast] Link to comment Share on other sites More sharing options...
Brandon_7 Posted October 5, 2007 Share Posted October 5, 2007 Never put your output (answer) in a textbox. It makes no sense, just use a label. It's probably not working because you need to change the names of the things on your form to match the code exactly. Post the code here. Link to comment Share on other sites More sharing options...
RSBDavid Posted October 5, 2007 Author Share Posted October 5, 2007 they one joe said.. ok here is what my forum contains: item-name cmd button-calculate txtbox-monsterHp txtbox-MonsterAmount Label-TotalExperence can someone make a code based on this? [software Engineer] - [Ability Bar Suggestion] - [Gaming Enthusiast] Link to comment Share on other sites More sharing options...
Brandon_7 Posted October 6, 2007 Share Posted October 6, 2007 Are you using VB.NET or VB 6? Link to comment Share on other sites More sharing options...
Randox Posted October 6, 2007 Share Posted October 6, 2007 It would help if we had the code you wrote, so that the code we right will be formated to it and all you have to do is copy and paste. And if your thinking about including it on a web page your going to want it written in vbscript or better yet javascript. Vb script only works on IE explore, even firefox can't understand it, and since there so simaler always use javascipt. Though if you just want to run this on your pc visual basics fine. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now