thanks but i already figured it out :) thanks for the interest thought i am sure i will be posting more questions in the future!
kharr1027
Posts
-
how to stop a method when recieving an error? -
how to stop a method when recieving an error?that is not quite what i am looking to do. i believe a try catch is for debugging your own code sort of.....i need am trying to throw messages to the user if there input is wrong. thanks for the help though
-
how to stop a method when recieving an error?here is what i have and what is happening. I have a main form then another form opens when user clicks the add button. on this form when you add the new information an error check is suppose to run. my problem is i need the error check to stop running and leave the focus on the 2nd form to show where the error is. instead it wants to go back to the main form and finish executing the code that was started when the 2nd form opened! any suggestions thanks
-
Tabbing to next edit box using Enter keyI don't know about tabbing with the enter key but i can help you with the message box. do this and make sure caps are correct it is important in C# MessageBox.Show("type string to display here, in quotes","here in quotes again type what do be displayed at the top of the message box",MessageBoxButtons.OK(this is to choose from different buttons on a message box),MessageBoxIcon.Error) hope this helped:)
-
how to call an array inside a sortedlist?Here is what i have... I have a main form with the sortedlist declared on it. then on another for called "Edit" I have set up a struct declaring 2 arrays we will call them array1 and array2. now in the Main form when it is closed there is suppose to be a text file created that gets the info in sorted list. the info in the sorted list is as follows. the key is a student name, and the value is suppose to be thrown to the struct with the two arrays built in. my problem is i don't know how to properly call this function. i get the key in the sorted list to display fine in the text file but for the value instead of printing all the values in my array it prints Lab1.Grades. which is the name of my project(Lab1) and the name of my struct(Grades). here is my code in the exit button private void btnExit_Click(object sender, System.EventArgs e) { FileStream fsFile = new FileStream("Roster.txt", FileMode.Create); StreamWriter srOutPut = new StreamWriter(fsFile); Grades studentGrades = new Grades(); foreach (DictionaryEntry Entry in this.slStudents) srOutPut.WriteLine(Entry.Key.ToString () + "|" + studentGrades.labArray); srOutPut.Close(); MessageBox.Show ("Thanks for using the Grade Calculator!", "Thank You", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Close(); } any help is greatly appreciated thanks Kevin
-
Playing Video with windows media player in C#thanks that helped so much. what do you think i did before i posted this message? i searched for a good hour with out any luck on finding anything that made sense to me. :(
-
Playing Video with windows media player in C#What url? where at?:confused:
-
Playing Video with windows media player in C#I was wondering if anyone knows how to play a video with windows media player in C#. i got the player loaded onto my form but i cann't figure out how to tell it what video to play. any ideals:confused:? thanks kevin
-
How to use the KeyPress eventwell thanks for the help anyways but it doesn't work. i can still type numbers and wierd characters into the text box. Does anyone else have any ideals?here is what my teacher showed us in class but i can't get anything out of it? thanks private void Form1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) { if (e.KeyChar < 'a'||e.KeyChar > 'z')&& e.KeyChar != '\b') e.Handled = true; }
-
How to use the KeyPress eventHello, I am a newbie at C#. I am trying to make a text box only allow alpha characters, such as a - z upper and lower case, the backspace, and space keys. How would i write that in the keypress event and how do i get it to activate on that text box? thanks any help will be appreciated.