Author Topic: Dice Roller 2 - My First InForm Tool  (Read 1007 times)

Offline SierraKen

  • Forum Resident
  • Posts: 956
Dice Roller 2 - My First InForm Tool
« on: November 15, 2019, 12:07:15 AM »
This might have been made already on InForm but since a very similar dice roller was made by me many months ago when I began QB64, I decided to try my hand at an InForm version. The old one is also on my website but will probably be replaced by this one very soon. Making it was really fun. It seemed a little bit harder than I thought, but once I knew what I was doing it's really simple. As I'm sure you all will find it will be simple too. Here is a picture of it and the .zip file. It has 2 giant buttons and when you press one it randomly chooses between 1 to 6 and puts the total of both in the textbox above. This is the first time I've used textbox with InForm by the way. I realize this is very beginner basic stuff and probably Day 1 in a programming class, but that's me with InForm for now. :)

(Note: There is a much better version on a post below that lets people choose how many sides the dice have.)






« Last Edit: November 15, 2019, 07:19:33 PM by SierraKen »

Offline bplus

  • Forum Resident
  • Posts: 4613
  • B+ nots
Re: Dice Roller 2 - My First InForm Tool
« Reply #1 on: November 15, 2019, 01:09:00 AM »
What's nice is that these dice can do any numbers, you can preset before rolling for a game that needs other numbers besides 1 through 6, you could add letters or colors or...

Offline SierraKen

  • Forum Resident
  • Posts: 956
Re: Dice Roller 2 - My First InForm Tool
« Reply #2 on: November 15, 2019, 03:00:41 PM »
Wow great idea, thanks! I'll try to do that real soon.

Offline SierraKen

  • Forum Resident
  • Posts: 956
Re: Dice Roller 2 - My First InForm Tool
« Reply #3 on: November 15, 2019, 05:35:07 PM »
OK, took me a couple hours but I did it! I let the user enter any amount from 3 to 100, which is just about any dice I believe, on both dice. If you enter more it brings it down to 100 and less it brings it up to 3. It starts out as 6 for both of them as well as when you click Reset. I learned a lot about strings and variables using textbox and also using numeraltextbox which is only for numbers. I kept the Total as a text box though because I like how it states "Total" before you do anything inside the box. This can be used for any game that uses dice. If you are missing dice, just use this instead. This is the best program I've ever made that uses Windows Forms. :) I'm learning!

« Last Edit: November 15, 2019, 05:37:29 PM by SierraKen »

Offline SierraKen

  • Forum Resident
  • Posts: 956
Re: Dice Roller 2 - My First InForm Tool
« Reply #4 on: November 17, 2019, 07:22:05 PM »
I added this program and links to InForm to my website today. Maybe we can get more people to start using it.