Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6828413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:22:47+00:00 2026-05-26T22:22:47+00:00

I am a bit confused here: Windows Forms Application, in C#. Let’s say I

  • 0

I am a bit confused here:

Windows Forms Application, in C#.

Let’s say I have a text box. And when the user enters text into that text box, and submits that to the server, it populates what the user wrote into an internal List<string>.

Now, let’s say that when a user presses like ctrl + UP on the keyboard, that I want it to return the LAST message they typed (which is essentially the last message added to the List<string> collection.

And if the user presses ctrl + Down on the keyboard, it should return the previous message that occurred before the last up was pressed.

But, oddly, i’m utterly confused as to how to implement this. LOL i know it’s like uber simple, but strangely, i can’t seem to figure it out.

inputPublicHistory[inputPublicHistory.Count - 1]

Seems like a logical method to pull the previous history, like when i press ‘up’. But, obviously, w/o a method to track where that index is, it’s hard to compare.

inputPublicHistoryIndex +=1

I could add that after a the user presses the Ctrl + Up on the keyboard, to increment the index, and just return that result, but is that really a valid/proper way to do this?

Maybe i’m just overthinking this, perhaps one of you awesome people here could help me get my h ead screwed on straight with such a simple task.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:22:48+00:00Added an answer on May 26, 2026 at 10:22 pm

    I would do pretty much what you have outlined except when you save the user’s latest input, set the index tracking where they are to .Count – 1. If they press CTRL+Up and the index is at .Count – 1, show them the last item in the list. If they then press CTRL+Down, decrement the index and show them that item, but don’t (obviously) go below 0.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a little bit confused here. I have 2 models: User Ticket A Ticket
Bit confused here, I have an on-demand instance but do I get charged even
I am a bit confused here on how I implement an array into JS
hello im a bit confused here. lets say we are making a simple page
I'm a bit confused here. I have a simple controller which loads a view.
I am a bit confused: We have a chat application that has a requirement
I am getting a bit confused here. In our application we are having a
I'm a bit confused by the documentation here. I have a transaction, which start
alt text http://img693.imageshack.us/img693/724/markov.png I'm a bit confused about some points here: What does it
I'm a bit confused here. Microsoft as far as I can tell claims that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.