Jump to content
Xtreme .Net Talk

rOSSybOY

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by rOSSybOY

  1. say i have a 5 digit number like 10001, and i divide it by 100, the result would be 100.01, a decimal, how would i divide it to get a remainder instead of a decimal??
  2. i think i have found the solution already, it was just a simple thing i was doing wrong, that i didnt see, but anyways, thanx for the input
  3. i have 4 check boxes, a calculate button, and a label. when u check the box or boxes u want, u click the calc button, and it will at those prices to the base cost, and then it will show your total cost in a label. when i check mulitple boxes, it adds the lowest box's value -- example Shoes $20 Hat $15 Shirt $14 say i click hat and shirt, it will only add the $14 that the shirt costs to the total cost.. i have tried many things but none seem to fix the problem :confused:
  4. hey man, that worked great, thanx for the help
  5. Public Class Form1 Inherits System.Windows.Forms.Form Dim Index As Object #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents lstMedian As System.Windows.Forms.ListBox Friend WithEvents btnAdd As System.Windows.Forms.Button Friend WithEvents btnDisplay As System.Windows.Forms.Button Friend WithEvents btnClear As System.Windows.Forms.Button Friend WithEvents btnExit As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.lstMedian = New System.Windows.Forms.ListBox() Me.btnAdd = New System.Windows.Forms.Button() Me.btnDisplay = New System.Windows.Forms.Button() Me.btnClear = New System.Windows.Forms.Button() Me.btnExit = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'lstMedian ' Me.lstMedian.Location = New System.Drawing.Point(8, 8) Me.lstMedian.Name = "lstMedian" Me.lstMedian.Size = New System.Drawing.Size(224, 199) Me.lstMedian.Sorted = True Me.lstMedian.TabIndex = 0 ' 'btnAdd ' Me.btnAdd.Location = New System.Drawing.Point(8, 216) Me.btnAdd.Name = "btnAdd" Me.btnAdd.Size = New System.Drawing.Size(88, 48) Me.btnAdd.TabIndex = 1 Me.btnAdd.Text = "Add Value" ' 'btnDisplay ' Me.btnDisplay.Location = New System.Drawing.Point(144, 216) Me.btnDisplay.Name = "btnDisplay" Me.btnDisplay.Size = New System.Drawing.Size(88, 48) Me.btnDisplay.TabIndex = 2 Me.btnDisplay.Text = "Display Median" ' 'btnClear ' Me.btnClear.Location = New System.Drawing.Point(240, 8) Me.btnClear.Name = "btnClear" Me.btnClear.Size = New System.Drawing.Size(48, 80) Me.btnClear.TabIndex = 3 Me.btnClear.Text = "Clear" ' 'btnExit ' Me.btnExit.Location = New System.Drawing.Point(240, 128) Me.btnExit.Name = "btnExit" Me.btnExit.Size = New System.Drawing.Size(48, 80) Me.btnExit.TabIndex = 4 Me.btnExit.Text = "Exit" ' 'Form1 ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.ClientSize = New System.Drawing.Size(292, 271) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.btnExit, Me.btnClear, Me.btnDisplay, Me.btnAdd, Me.lstMedian}) Me.Name = "Form1" Me.Text = "Form1" Me.ResumeLayout(False) End Sub #End Region Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click lstMedian.Items.Clear() End Sub Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click End End Sub Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click Dim add As Object add = CInt(InputBox("Enter a value:", "Enter")) lstMedian.Items.Add(add) End Sub Private Sub btnDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click Dim median, first, last, find As Object first = 1 last = lstMedian.Items.Count - 1 find = (first + last) / 2 MessageBox.Show(find) End Sub End Class this is the code, it is what the final product may look like, but im not completely finished, due to my delay with the list box
  6. hey, this is rOSSybOY, im in the same class as daveydave, and i could let u see my code too, to see if there is something similar we are doing. i will have it posted on monday
×
×
  • Create New...