Forum: C# 4 Days Ago |
| Replies: 9 Views: 289 Always glad to be of help:) |
Forum: C# 4 Days Ago |
| Replies: 9 Views: 289 Why do you call that cheating?
It is called the signature of a method.
I can have 100 constructors if I want to. I don't need to have destructors or deconstuctors as you call them. C# takes care of... |
Forum: C# 4 Days Ago |
| Replies: 9 Views: 289 I don't know that much of Python(Monty you know) but I'm going to make an effort at a translation here that fits your code as close as possible:
using System;
namespace ConsoleApplication1
{
... |
Forum: C# 7 Days Ago |
| Replies: 3 Views: 339 You are instantiating a new instance of Form1 so the textbox will be empty.
Look at this snippet: http://www.daniweb.com/code/snippet217193.html |
Forum: C# 10 Days Ago |
| Replies: 8 Views: 309 Just as there is an OpenFileDialog class there is a SaveFileDialog one.
Read about it here (http://msdn.microsoft.com/en-us/library/system.windows.forms.savefiledialog.aspx) |
Forum: C# 10 Days Ago |
| Replies: 4 Views: 237 Sorry, my fault I should have said that MyFileNameToUseWhereIWant is a string variable defined elsewhere.
Put this as variable in FileStream filestream2 = new FileStream("ZL2WIN", FileMode.Open);... |
Forum: C# 10 Days Ago |
| Replies: 4 Views: 237 OpenFileDialog dlg = new OpenFileDialog();
if (dlg.ShowDialog() == DialogResult.OK)
{
MyFileNameToUseWhereIWant = dlg.FileName;
// perhaps other code here
}
Is all there is to it. Happy... |
Forum: C# 11 Days Ago |
| Replies: 1 Views: 286 |
Forum: C# 11 Days Ago |
| Replies: 7 Views: 333 Hi tchiloh! Welcome at Daniweb.
Did you know that every textbox has a TabIndex property you can set?
So you can tab on the textbox that has the focus and you will automatically move to the one with... |
Forum: C# 12 Days Ago |
| Replies: 9 Views: 329 Save your info as a text file with extension .txt
If you doubleclick it in Explorer, the executable NotePad will open and you can read the contents of your textfile. To make an executable file from... |
Forum: C# 12 Days Ago |
| Replies: 9 Views: 329 What do you mean by an executable file?
If you just want to read and write text to a file, this link will give the info: http://www.csharp-station.com/HowTo/ReadWriteTextFile.aspx |
Forum: C# 14 Days Ago |
| Replies: 13 Views: 391 You seem to constantly ignore the advise we give you.
Did or did you not try out the code I gave you?
Do you expect we give you the code you want to have?
I don't have to type this in, I don't... |
Forum: C# 14 Days Ago |
| Replies: 2 Views: 238 Maybe this thread might shed a light on it http://www.daniweb.com/forums/thread236306.html
Also remember that every Color struct has a GetHue, GetSaturation and GetBrightness method. |
Forum: C# 14 Days Ago |
| Replies: 5 Views: 316 You are right privatevoid, for a min-function you have to test on the maxvalue of course! Thanks for reminding. |
Forum: C# 15 Days Ago |
| Replies: 13 Views: 391 Of course my example is not what you want, but did you try it? Did you experiment with different values for the Point variable?
Do this in lines 41 and 42. You can use a random method here to put... |
Forum: C# 15 Days Ago |
| Replies: 5 Views: 305 Perhaps this snippet can be of help http://www.daniweb.com/code/snippet217204.html
Look for the TX and TY methds.
Have not much time now, will be back later if it did not help. |
Forum: C# 15 Days Ago |
| Replies: 5 Views: 316 double.MinValue is -1 divided by 10^300 or so.
Line 17 of your code is OK, but in line 26 and 29 you are substracting this value two times(x 10) from your total. What you have to do is after every... |
Forum: C# 15 Days Ago |
| Replies: 13 Views: 391 No this is far from correct, but don't panic.
int [] pic = new int [1];
This means create an array named pic with 1 element. You can call this with pic[0] (arrays start at index 0) pic[1] would... |
Forum: C# 15 Days Ago |
| Replies: 13 Views: 391 I already gave you an example snippet in a previous thread.
Perhaps it was to complicated I don't know. Did you study it?
Give you a new simpler example here:
Create a new windowsformsapp and drop... |
Forum: C# 16 Days Ago |
| Replies: 3 Views: 296 I have no problem with this. Did you include a reference to System.Drawing? |
Forum: C# 17 Days Ago |
| Replies: 5 Views: 279 Now when you watch carefully you will see the use of the same code twice. Whenever you see that you must start thining of using a method to make your code more transparant and manageable. Considr you... |
Forum: C# 17 Days Ago |
| Replies: 5 Views: 279 Hi, rzhaley, welcome on DANIWEB:)
Copy your for loops code and paste it underneath. Change the for loop with the int x in this: for (int x = 26; x > 0; x--) you start from 26 and counting down now. |
Forum: C# 17 Days Ago |
| Replies: 3 Views: 409 Use an if statement:
if (em==!null)
{
em.AddToCompanies(c);
em.SaveChanges();
} |
Forum: C# 17 Days Ago |
| Replies: 2 Views: 399 You can find this code here : http://www.koders.com/csharp/fidB6AC18C659085347BED11C11D98B179E126D79DF.aspx |
Forum: C# 19 Days Ago |
| Replies: 2 Views: 368 First thing I found when googling weekdays between two dates in C# http://www.eggheadcafe.com/PrintSearchContent.asp?LINKID=1041 |
Forum: C# 19 Days Ago |
| Replies: 2 Views: 357 |
Forum: C# 19 Days Ago |
| Replies: 2 Views: 294 What is I[j, i] ? a point defined in the l lList? You cannot compare ints with Points if that is the case. Suggestion : Give more meaningfull names to your variables instead of I or l. |
Forum: C# 20 Days Ago |
| Replies: 5 Views: 371 Just google "Printing in C#" lots of things there. Example : http://msdn.microsoft.com/en-us/magazine/cc188767.aspx#S5 |
Forum: C# 25 Days Ago |
| Replies: 8 Views: 308 Check beforehand if your textboxes are not empty.
if (LeaveDay.Text != string.Empty) etc. |
Forum: C# 26 Days Ago |
| Replies: 8 Views: 330 Can you elaborate on automatic click ? If you think my native language is English, you are wrong, I am just trying to do my best in it.
I understand what a click is. Is it a mouse click? Or the... |
Forum: C# 26 Days Ago |
| Replies: 8 Views: 330 So you would lke to have something like a key logger then? |
Forum: C# 26 Days Ago |
| Replies: 17 Views: 1,108 I don't know how you save your tamagotchi status to a file. I think I would save all the info in a struct and write that to a file. If the tamagotchi comes awake or is started up again, I would read... |
Forum: C# 28 Days Ago |
| Replies: 4 Views: 482 Why not use a List of objects that can contain anything you want?
Something like this perhaps:
namespace ConsoleApplication1
{
public class Names //class with 2 strings in it
{
... |
Forum: C# 29 Days Ago |
| Replies: 17 Views: 1,108 Read this info about a Timer class info about a Timer class (http://msdn.microsoft.com/en-us/library/system.timers.timer.aspx)
As input you will need some menu with options of what you want to do.... |
Forum: C# 29 Days Ago |
| Replies: 3 Views: 233 don't know how you draw your line but the way you want it you have to draw your line relative to the ClientRectangle of your form. |
Forum: C# 29 Days Ago |
| Replies: 17 Views: 1,108 Your brief might help, but don't expect that anyone here is going to do all the work for you;) |
Forum: C# 30 Days Ago |
| Replies: 17 Views: 1,108 Hi narg, welcome here at daniweb:)
We don't know what your programming knowledge is at the moment, you have to tell us more. Have you already some code?
You obviously going to need the Timer class... |
Forum: C# 32 Days Ago |
| Replies: 6 Views: 460 I'm not very familiar with XNA and game programming, but to give it a first shot(no pun intended;) ) I would look at BoardCells[,] Cell = new BoardCells[11, 12]; This array goes from 0 to 10 and from... |
Forum: C# 33 Days Ago |
| Replies: 9 Views: 859 |
Forum: C# 33 Days Ago |
| Replies: 9 Views: 859 Took a closer look at your code and followed the advice of Ryshad and got it working:
public Element getElement(int atomicNum)
{
// STUDENTS: YOU NEED TO... |