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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
T

That Asian Guy

@That Asian Guy
About
Posts
54
Topics
23
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How Do I Declare a New Property for a UserControl?
    T That Asian Guy

    I tried it the traditional C# way of:

    public String test
    {
    get
    {
    return "hi";
    }
    set
    {
    button1.Content = value;
    }
    }

    But the WPF designer didn't seem to be able to detect it, although I could still do it programatically. What's the proper way of declaring a new property for a control? Thanks.

    WPF csharp question wpf

  • Where Do I Start Learning About Using SQL Databases in C# Applications?
    T That Asian Guy

    I want to learn how to use a local (stored on the computer not the internet) database to store information for my application. I did some searching and found articles, but they seemed to have no relation to a learning sequence. I have C# programming experience but no database experience, where should I start and what articles should I read? Thanks.

    C# database csharp algorithms tutorial question

  • Programmatically Setting the Application's Privilege Level?
    T That Asian Guy

    In Windows Vista, the privilege of the application can limit many parts such as registry access etc. Is there a way to set the provilege level to "Run this program as an administrator" when you click build in Visual Studio? Thanks.

    C# csharp visual-studio windows-admin question

  • How Do I Run A Command Prompt Command?
    T That Asian Guy

    Like in unmanaged code when you type that it says "Press any key to continue..." Thats not what I want it to do but its an example. The school has cmd.exe blocked but I need it to run java commands in my program. Thanks.

    C# question csharp c++

  • How Do I Run A Command Prompt Command?
    T That Asian Guy

    Process.Start("pause"); gives an error :S.

    C# question csharp c++

  • How Do I Run A Command Prompt Command?
    T That Asian Guy

    In C++, you do system("command here"); How do you do this in C# without running cmd.exe with an argument? Thanks.

    C# question csharp c++

  • How Do I Copy An Embedded Resource to a Directory?
    T That Asian Guy

    I did some reading about embedded resources but they all dealt with pictures and other runtime functions. How do I copy the file from a resource? Thanks.

    C# question hardware learning

  • What's the Batch Command for Starting a Java Applet?
    T That Asian Guy

    ShellExecuteEx works, thanks. What about the command for running an applet?:confused:

    IT & Infrastructure question csharp java tools

  • What's the Batch Command for Starting a Java Applet?
    T That Asian Guy

    [Message Deleted]

    IT & Infrastructure question csharp java tools

  • What's the Batch Command for Starting a Java Applet?
    T That Asian Guy

    java MyClass.class in command prompt will start an application in the console window. How do I start an Applet in the default Applet window? Also, how do I run a command prompt script from a .net application (p/invoke???)? Thanks.

    IT & Infrastructure question csharp java tools

  • Property vs Variable?
    T That Asian Guy

    What would be the initial value of the property?

    C# question visual-studio

  • Simple loop problems ??
    T That Asian Guy

    }// close inner if statement
    cat.Location = newLoc;
    MessageBox.Show("" + i);

    Should be ("" + i.ToString());

    C# csharp question

  • Property vs Variable?
    T That Asian Guy

    I see... thanks.

    C# question visual-studio

  • Property vs Variable?
    T That Asian Guy

    No, whats that :S?

    C# question visual-studio

  • Property vs Variable?
    T That Asian Guy

    I've been using properties for quite some time, and it was until today that a question came to me: what's the difference between using a property and a variable? I know properties are better practice, but still... just wondering :).

    public int Number
    {
    get
    {
    return this.number;
    }
    set
    {
    this.number = value;
    }
    }

    vs

    public int number = 0;

    C# question visual-studio

  • Publish as Standalone
    T That Asian Guy

    You always can, its the .exe in the bin\Debug\ folder...

    C# help csharp visual-studio winforms tutorial

  • Help With dataGridView Copy and Paste Feature
    T That Asian Guy

    I messed around with it a bit and ended up using SendKeys. I know this isn't the best method, but its the only one I tried so far that works. Basically,

    try
    {
    dataGridView1.BeginEdit(true);
    String tempText = Clipboard.GetText();
    tempText = tempText.Replace("{", "{{}");
    tempText = tempText.Replace("}", "{}}");
    tempText = tempText.Replace("{{{}}", "{{}");
    tempText = tempText.Replace("(", "{(}");
    tempText = tempText.Replace(")", "{)}");
    tempText = tempText.Replace("+", "{+}");
    tempText = tempText.Replace("^", "{^}");
    tempText = tempText.Replace("%", "{%}");
    tempText = tempText.Replace("~", "{~}");
    SendKeys.Send(tempText);
    SendKeys.Send("{DOWN}");
    }
    catch (Exception ex)
    {
    MessageBox.Show(ex.Message + "\n\nThe previous value was restored.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
    dataGridView1.CurrentCell.Value = previousValue;
    }

    C# help question database

  • Help With dataGridView Copy and Paste Feature
    T That Asian Guy

    I recently made a program for organizing marks and realized that it is slow and repetitive to type the same teacher's name 20 times for students in the same class. I chose to add a little copy and paste feature when the user presses ctrl+v and the active cell becomes the contents of the clipboard. Here is the snippet:

    else if (e.Control && e.KeyCode == Keys.V)
    {
    if (Clipboard.ContainsText() & dataGridView1.CurrentCell.OwningColumn.Index == 4)
    {
    dataGridView1.CurrentCell.Value = Clipboard.GetText();
    }

                // If its the last row, add another row
                if (dataGridView1.CurrentCell.OwningRow.Index == nUD\_counter)
                {
                    dataGridView1.Rows.Add();
                }
            }
    

    What I'm having problems with is the last part, where I add another row (Microsoft made it so it would automatically add a row if the cell is edited by the user, but not programatically. The problem is that when I add the new row, it places it above the row which I just pasted info into such that:

    col1 col2
    a b
    <-blank line where I press ctrl+v->

    It becomes

    col1 col2
    a b
    <-blank line where I press ctrl+v->
    hi

    How can I fix this? Also feel free to make suggestions on my code. Thanks in advance.

    modified on Saturday, November 1, 2008 5:23 PM

    C# help question database

  • urgent -- file creation in c#
    T That Asian Guy

    using (StreamWriter sw = File.CreateText(fileName))
    {
    sw.Write(data);
    }

    using (StreamReader sr = File.OpenText(fileName))
    {
    String contents = sr.ReadToEnd();
    }

    C# csharp help

  • Help With Sorting Multiple dataGridView Columns
    T That Asian Guy

    Haha, I tried reading the IComparer page before but didn't quite get it. This one was much easier to read, thanks!

    C# algorithms help tutorial question lounge
  • Login

  • Don't have an account? Register

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