TO DO TASK
Need help with programming the ADD button
I have a textbox called txtinput where I will enter a task
After hitting an add button the program should put the text into a listbox called lstoutput
for example read a book
but also will need to be numbered
for example
1. read a book
2. write a report
Thanks for any help
AMY
3 1285
TO DO TASK
Need help with programming the ADD button
I have a textbox called txtinput where I will enter a task
After hitting an add button the program should put the text into a listbox called lstoutput
for example read a book
but also will need to be numbered
for example
1. read a book
2. write a report
Thanks for any help
AMY
OK found the way to get txtInput to lstOutput
Now I need to count each input in the list box
OK found the way to get txtInput to lstOutput
Now I need to count each input in the list box
Use ListCount method
Example
List1 --> ListBox
List1.ListCount
Sorry I do not understand this is what I have so far
Public Class FrmToDoList
Inherits System.Windows. Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeCompo nent()
'Add any initialization after the InitializeCompo nent() 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.Disp ose()
End If
End If
MyBase.Dispose( disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.Componen tModel.IContain er
'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 lblInput As System.Windows. Forms.Label
Friend WithEvents btnAdd As System.Windows. Forms.Button
Friend WithEvents lstOutput As System.Windows. Forms.ListBox
Friend WithEvents txtInput As System.Windows. Forms.TextBox
<System.Diagnos tics.DebuggerSt epThrough()> Private Sub InitializeCompo nent()
Me.lblInput = New System.Windows. Forms.Label
Me.txtInput = New System.Windows. Forms.TextBox
Me.btnAdd = New System.Windows. Forms.Button
Me.lstOutput = New System.Windows. Forms.ListBox
Me.SuspendLayou t()
'
'lblInput
'
Me.lblInput.Loc ation = New System.Drawing. Point(16, 8)
Me.lblInput.Nam e = "lblInput"
Me.lblInput.Siz e = New System.Drawing. Size(40, 21)
Me.lblInput.Tab Index = 0
Me.lblInput.Tex t = "Task"
Me.lblInput.Tex tAlign = System.Drawing. ContentAlignmen t.MiddleLeft
'
'txtInput
'
Me.txtInput.Loc ation = New System.Drawing. Point(72, 8)
Me.txtInput.Nam e = "txtInput"
Me.txtInput.Tab Index = 1
Me.txtInput.Tex t = ""
'
'btnAdd
'
Me.btnAdd.Locat ion = New System.Drawing. Point(192, 8)
Me.btnAdd.Name = "btnAdd"
Me.btnAdd.TabIn dex = 2
Me.btnAdd.Text = "Add"
'
'lstOutput
'
Me.lstOutput.Lo cation = New System.Drawing. Point(16, 48)
Me.lstOutput.Na me = "lstOutput"
Me.lstOutput.Si ze = New System.Drawing. Size(256, 108)
Me.lstOutput.Ta bIndex = 3
'
'FrmToDoList
'
Me.AutoScaleBas eSize = New System.Drawing. Size(5, 14)
Me.ClientSize = New System.Drawing. Size(288, 173)
Me.Controls.Add (Me.lstOutput)
Me.Controls.Add (Me.btnAdd)
Me.Controls.Add (Me.txtInput)
Me.Controls.Add (Me.lblInput)
Me.Font = New System.Drawing. Font("Tahoma", 8.25!, System.Drawing. FontStyle.Regul ar, System.Drawing. GraphicsUnit.Po int, CType(0, Byte))
Me.Name = "FrmToDoLis t"
Me.Text = "To Do List"
Me.ResumeLayout (False)
End Sub
#End Region
Private Sub btnAdd_Click(By Val sender As System.Object, ByVal e As System.EventArg s) Handles btnAdd.Click
lstOutput.Items .Add(txtInput.T ext)
txtInput.Text = ""
End Sub
Private Sub FrmToDoList_Loa d(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
End Sub
End Class ' FrmToDoList
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Fred Astair |
last post by:
I used this site for a c++ homework assignment that my teacher left me no
clue on how to do it. http://www.betterteachers.com. Check it out.
Fred
|
by: EkteGjetost |
last post by:
This is definitely not the smart thing to do as far as my learning goes,
but desperate situations call for desperate measures.
The final lab for my introduction to C programming class is due tomorrow.
I was on vacation when we went over how to read files, so basically my
only resources are the book, the course notes, and the examples.
Unfortunately for me, none of them are usefull at all, so pretty much i
don't have a clue as to what i...
|
by: Mark Kamoski |
last post by:
Hi--
Please help.
I need a code sample for bubble sort.
Thank you.
--Mark
|
by: carr4895 |
last post by:
Hello.
I was wondering if someone could help me too with a login form. Upon
startup, I have to display a password screen and it should accept a
user name and password. User name can be anything non-blank. If
there is no user name, an appropriate error message must be displayed.
All of the following passwords are valid IT160, VB2Manager, BackDoor.
No other password is valid. It must allow the user to enter the
password in any case. If...
|
by: ern |
last post by:
I need a FIFO queue of size 20, to keep track of a running average.
Once the queue is full with 20 values, I want to take the sum/20 =
AVERAGE. Then when a new value comes in, I want:
(Old Sum - oldest value + newest value)/20 = New Average
Anybody know an efficient way to implement that? Is a queue even the
best way?
Thanks,
| |
by: Martin Jørgensen |
last post by:
Hi,
I've had a introductory C++ course in the spring and haven't programmed in
C++ for a couple of months now (but I have been programmed in C since
january). So I decided to do my conversion utility in C++, before I forget
everything. But it doesn't compile:
------------
|
by: Kodiak |
last post by:
I am trying to write some javascript code in which you enter some text
in one text box and the text will also appear in the second text box.
For example, if I write the word "Test" both text boxes should have
the same word in them. I need to be able to see the work actually
being typed out in both text boxes as well. If I trye the letter T
then both text boxes should have the same result all the type. If I
delete the letter T then both...
|
by: emre esirik(hacettepe computer science and enginee |
last post by:
/////////////////////// DIVISION FUNCTION ////////////////////
void div ( int pol1 , int pol1p , int pol2 , int pol2p)
{
int r=5,z,i,g,j,k,l,dividend,rising={0};
for (i=0 ; i<6 ; i++)
dividend=pol1;
for(i=5 ; i >=0 ; i--)
{
r=5;
for(z=r ; z>=0 ; z--)
|
by: garyrowell |
last post by:
I have been at this programme for hours trying to work out what is wrong. Any help would be very much appricated. Here is the breif I received.
The program
This week you are going to write three classes: Card.java, Deck.java and DeckTester.java. The specification for each class is given below.
Card.Java
This is a simple class that represents a playing card.
Card has two attributes:
• rank which is a String that represents the value...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |