Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

ShermansLagoon

@ShermansLagoon
About
Posts
32
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Should I buy that shiny new gadget?
    S ShermansLagoon

    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 Lounge question com tutorial

  • static const from MC++ to C# via DLL [modified]
    S ShermansLagoon

    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

    Managed C++/CLI csharp c++ help question dotnet

  • Invoking the VS C++ compiler from a C# application
    S ShermansLagoon

    Glad I could help!

    Internet - the worlds biggest dictionary

    C# csharp c++ visual-studio help question

  • Invoking the VS C++ compiler from a C# application
    S ShermansLagoon

    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

    C# csharp c++ visual-studio help question

  • Invoking the VS C++ compiler from a C# application
    S ShermansLagoon

    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

    C# csharp c++ visual-studio help question

  • Expression validator
    S ShermansLagoon

    This sounds very much like homework to me, but I might be wrong...

    Internet - the worlds biggest dictionary

    C# tutorial

  • i am looking for a DLL file for a webcam
    S ShermansLagoon

    Read the provided information, or try it out yourself?

    Internet - the worlds biggest dictionary

    C# csharp sysadmin help tutorial

  • C# class help? [modified]
    S ShermansLagoon

    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

    C# question csharp help

  • .cpp or .hpp with C# [modified]
    S ShermansLagoon

    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

    C# csharp c++ visual-studio sysadmin help

  • how to fix a menustrip ?
    S ShermansLagoon

    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

    C# question csharp help visual-studio tutorial

  • how to fix a menustrip ?
    S ShermansLagoon

    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

    C# question csharp help visual-studio tutorial

  • Debug code won't die gracefully.
    S ShermansLagoon

    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

    C# debugging database sysadmin json question

  • Using large lookup table
    S ShermansLagoon

    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

    C# csharp winforms tutorial question

  • Undo() Method?
    S ShermansLagoon

    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

    C# question

  • form.close() not working
    S ShermansLagoon

    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

    C# csharp visual-studio collaboration help

  • How does this FileSystemWatcher code work?
    S ShermansLagoon

    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

    C# question workspace

  • How to enable horizontol scrolling in C#.NET console application
    S ShermansLagoon

    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

    C# csharp question tutorial

  • Syntax Advice
    S ShermansLagoon

    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

    C# csharp help question

  • Remove tab captions ?
    S ShermansLagoon

    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

    C# csharp winforms tutorial question

  • How to recieve/send mail through mail server in C#
    S ShermansLagoon

    There are tons of articles for mail handling, try searching the articles..

    Internet - the worlds biggest dictionary

    C# csharp sysadmin json tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups