Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
AnswerRe: Current process information Pin
markovl21-Jun-12 7:14
markovl21-Jun-12 7:14 
GeneralRe: Current process information Pin
a.fatemeh21-Jun-12 7:28
a.fatemeh21-Jun-12 7:28 
AnswerRe: Current process information Pin
markovl21-Jun-12 7:46
markovl21-Jun-12 7:46 
Questionstore SQLite file Pin
nike0721-Jun-12 3:06
nike0721-Jun-12 3:06 
AnswerRe: store SQLite file Pin
Eddy Vluggen21-Jun-12 3:40
professionalEddy Vluggen21-Jun-12 3:40 
QuestionHow to add a player name from one form to another Pin
Member 833684820-Jun-12 17:30
Member 833684820-Jun-12 17:30 
AnswerRe: How to add a player name from one form to another Pin
Mycroft Holmes20-Jun-12 17:36
professionalMycroft Holmes20-Jun-12 17:36 
AnswerRe: How to add a player name from one form to another Pin
OriginalGriff20-Jun-12 20:25
mveOriginalGriff20-Jun-12 20:25 
Exactly how you do it depends on how your whole system works, but the first thing to do is to create a property in the Player Name form - call it PlayerName - and have it retrieve the value of the text box.

Now, either you need to use ShowDialog to display the PlayerName form in which case you retrieve the property immediately after showing the form (as ShowDialog stops execution until the form is closed). This is much like the way you do an OpenFileDialog:
C#
OpenFileDialog ofd = new OpenFileDialog();
if (ofd.ShowDialog() == DialogResult.OK)
   {
   string lines = File.ReadAllLines(ofd.FileName);
   ...


The other way to do it is to create an event in the PlayerName form which the main form handles. When the event is signalled by the PlayerName form, the main form reads the property and acts on it immediately. This is similar to the way a search box works: when you type a character in the box, it immediately affects a list elsewhere.

Other than that, I can only echo Mycroft: Get a book, and work your way through it, doing all the exercises. Learning by random questions is a bad idea, it means you miss so much basic information and principles which makes it hard to work out what is going on later. You wouldn't learn to drive by jumping straight into a F1 race, would you? Laugh | :laugh:
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water

AnswerRe: How to add a player name from one form to another Pin
OctavioNA22-Jun-12 7:32
OctavioNA22-Jun-12 7:32 
Questionerror code Pin
a.fatemeh20-Jun-12 8:54
a.fatemeh20-Jun-12 8:54 
AnswerRe: error code Pin
markovl20-Jun-12 9:04
markovl20-Jun-12 9:04 
GeneralRe: error code Pin
a.fatemeh20-Jun-12 9:39
a.fatemeh20-Jun-12 9:39 
QuestionButtons on C# sharp app now cause System sounder to beep! Pin
glennPattonWork319-Jun-12 23:49
professionalglennPattonWork319-Jun-12 23:49 
AnswerRe: Buttons on C# sharp app now cause System sounder to beep! Pin
Hum Dum20-Jun-12 1:40
Hum Dum20-Jun-12 1:40 
GeneralRe: Buttons on C# sharp app now cause System sounder to beep! Pin
glennPattonWork320-Jun-12 1:52
professionalglennPattonWork320-Jun-12 1:52 
AnswerRe: Buttons on C# sharp app now cause System sounder to beep! Pin
احمد مقبل الصراري20-Jun-12 9:18
احمد مقبل الصراري20-Jun-12 9:18 
GeneralRe: Buttons on C# sharp app now cause System sounder to beep! Pin
glennPattonWork320-Jun-12 21:49
professionalglennPattonWork320-Jun-12 21:49 
QuestionConvert PDF to Word using C# Pin
nvarunkumar19-Jun-12 22:52
nvarunkumar19-Jun-12 22:52 
AnswerRe: Convert PDF to Word using C# Pin
Hum Dum19-Jun-12 23:00
Hum Dum19-Jun-12 23:00 
AnswerRe: Convert PDF to Word using C# Pin
Pete O'Hanlon19-Jun-12 23:05
mvePete O'Hanlon19-Jun-12 23:05 
AnswerRe: Convert PDF to Word using C# Pin
Richard MacCutchan20-Jun-12 3:18
mveRichard MacCutchan20-Jun-12 3:18 
QuestionC# 2010 delete from database Pin
sc steinhayse19-Jun-12 17:09
sc steinhayse19-Jun-12 17:09 
AnswerRe: C# 2010 delete from database Pin
Pete O'Hanlon19-Jun-12 23:18
mvePete O'Hanlon19-Jun-12 23:18 
QuestionH.264 decode without stream Pin
Medvezhonok19-Jun-12 12:31
Medvezhonok19-Jun-12 12:31 
QuestionHow To Parse This String Pin
Kevin Marois19-Jun-12 9:53
professionalKevin Marois19-Jun-12 9:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.