The might not actually sell the same thing again, the statement in the flowchart is that it looks the same :)
Internet - the worlds biggest dictionary
The might not actually sell the same thing again, the statement in the flowchart is that it looks the same :)
Internet - the worlds biggest dictionary
I just recently solved this problem. The keyword in MC++ for this is "literal": namespace Foo { public ref class RC { public: literal System::Int16 value = 0; };
Which now can be used by C# as a compiler constant value: static class Program { static void Main() { Int16 val = 0; switch(val) { case Foo.RC.value: // no longer gives CS0150 MessageBox.Show("Information"); break; } return 0; }
Just wanted to tell the world, if anybody else have had a similar problem and was looking for a way to solve it :cool:
Internet - the worlds biggest dictionary
Glad I could help!
Internet - the worlds biggest dictionary
Sorry, no. That is a question you should ask in the C++ forum instead, since it is compiling C++ you have problems with, right?
Internet - the worlds biggest dictionary
I tried the following and got it working without any problems (using VS2005). I also tried it in a graphical application, storing the output in a multiline-textbox instead, without any problems. Good luck!
static void Main()
{
ProcessStartInfo psi = new ProcessStartInfo("cl.exe", " -GX c:\\hello.cpp");
psi.CreateNoWindow = true;
psi.RedirectStandardError = true;
psi.RedirectStandardOutput = true;
psi.UseShellExecute = false;
Process p = new Process();
p.StartInfo = psi;
p.ErrorDataReceived += new DataReceivedEventHandler(p_ErrorDataReceived);
p.Start();
p.BeginErrorReadLine();
string sout = p.StandardOutput.ReadToEnd();
p.WaitForExit();
StringBuilder builder = new StringBuilder();
builder.AppendLine("Error:");
foreach (String s in errData)
{
builder.AppendLine(s);
}
builder.AppendLine("Output:");
builder.AppendLine(sout);
Console.WriteLine(builder.ToString());
Console.WriteLine("Press ENTER to continue");
Console.ReadKey(true);
}
private static List errData = new List();
static void p_ErrorDataReceived(object sender, DataReceivedEventArgs e)
{
errData.Add(e.Data);
}
Internet - the worlds biggest dictionary
This sounds very much like homework to me, but I might be wrong...
Internet - the worlds biggest dictionary
Read the provided information, or try it out yourself?
Internet - the worlds biggest dictionary
This would be possible with a Dictionary, in which case you can have a name associated with each created textbox. Just make sure you don't overwrite any existing values (with, for example, the ContainsKey() method). Just out of curiosity, why do you want to have a textbox associated with a name?
Internet - the worlds biggest dictionary
I wonder how many times that answer has been given to a question in this forum.. Just the last few days I know I have read it several times, and then I haven't even read all threads.. Is it really so that people doesn't read the first post, search articles here, and do not use google like ever??
Internet - the worlds biggest dictionary
I suppose you have to change it then? Instead of creating a scrollable form, you create a scrollable UserControl, which you can put in any container.
Internet - the worlds biggest dictionary
In your form you should put a ToolStripContainer, with your MenuStrip at the top and your StatusStrip at the bottom. Then you add your scrollable control in the middle/center of this ToolStripContainer.
Internet - the worlds biggest dictionary
It sounds to me that you have a threading-problem, with a thread running when you close the form. This will result in the form disappearing, but another thread keeping the process alive. Try the Closing event for the Form, and make sure you shut down all threads (might be some database-shutdown command or similar to shutdown/disconnect teh database correctly).
Internet - the worlds biggest dictionary
To me it sounds like you should have a BackgroundWorker that will load the data in small pieces and then add them (when possible, or by request) to the combo box. I am wondering weather you really need a combo box though.. Wouldn't a ListView be better?
Internet - the worlds biggest dictionary
I tried and got the Undo() not to undo the whole textbox, but only the latest entry. What I did was I clicked on another object, then clicked on the textbox and added more text. You can probably achieve multi-stepped undo by playing a bit with the TextChanged event from the RichTextBox and changing focus.
Internet - the worlds biggest dictionary
The easiest way of doing that is to modify your Form2 constructor to take a Form1 reference, that you then keep until you need it. Form1:
public void Bttn_Click(object sender, EventArgs e)
{
Form2 r = new Form2(this);
r.Show();
this.Hide();
}
Form2:
private Form1 myf1;
public Form2(Form1 f1)
{
...
myf1 = f1;
}
public Form2Button_click(object sender, EventArgs e)
{
myf1.Show();
this.Hide();
}
Internet - the worlds biggest dictionary
The life span in C# is a lot different than in C/C++ or other non-garbage collected languages. The "aWatcher" is a pointer to the created instance, and that pointer will expire when the method is finished, while the lifespan if the instance will be as long as, in easy terms, "somebody knows where it is".
Internet - the worlds biggest dictionary
In the console you can set "BufferWidth", i.e. the size of the console buffer, to some other value than the default 80, and you will get horizontal scrolling.
Internet - the worlds biggest dictionary
Just for fun I did the test 1000 times and got the following results: for: 00:12:08.2600974 foreach: 00:03:40.6635750 Note that this is total time for 1000 runs; the result seems clear though.
Internet - the worlds biggest dictionary
It works fine with C# .NET 2.0, but are you sure that it is not only that you has not redrawn the form? It might be an .Invalidate() call missing. Have you tried changing them in run-time to other strings? If empty strings does not work, try using one-space strings instead " ", might give you similar result.
Internet - the worlds biggest dictionary
There are tons of articles for mail handling, try searching the articles..
Internet - the worlds biggest dictionary