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
K

Kalvin Work

@Kalvin Work
About
Posts
30
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Maximum number of columns for a ListView control
    K Kalvin Work

    I've learned a little more about what is going on with this. It isn't a problem with the number of columns, but the total width of all the columns. If I give each column a width of 140 then I have a problem scrolling. If I give each column a width of only 100 with 310 columns then there is no problem.

    listView1.View = View.Details;
    listView1.MultiSelect = false;
    listView1.FullRowSelect = true;
    listView1.HideSelection = false;

    for (int i = 0; i < 310; i++)
    {
    listView1.Columns.Add((i-1).ToString(), 140);
    }

    ListViewItem itm = listView1.Items.Add("newRow");
    foreach (ColumnHeader columnHeader in listView1.Columns)
    {
    itm.SubItems.Add(columnHeader.Index.ToString());
    }

    - Kalvin

    C# question

  • Maximum number of columns for a ListView control
    K Kalvin Work

    I have a Windows.Forms.ListView control. On this control I need to have 310 columns. While scrolling through the listview the first 245 display without problems. After that, the column headers stop scrolling, but the data continues to scroll. Is there a setting somewhere for the max number of column headers that are allowed? Any idea what might be causing this? Thank you. Kalvin

    - Kalvin

    C# question

  • Error casting delegate in non-generic class
    K Kalvin Work

    I started with a generic class which has a delegate. The consumer of this class could set a method callback which requires invoking but they may not also. To address this I check if the callback is ISyncronizeInvoke, if it is then I will call BeginInvoke. This works great as long as the class is a generic class:

    public class TestClassGeneric<T>
    {
    public delegate void GetMe();
    private GetMe _call;

    public TestClassGeneric(GetMe theCall)
    {
      \_call = theCall;
    
      System.ComponentModel.ISynchronizeInvoke si =
        \_call as System.ComponentModel.ISynchronizeInvoke;
    }
    

    }

    Since I don't need the class to be generic I want to make it just a standard class:

    public class TestClassGeneric
    {
    public delegate void GetMe();
    private GetMe _call;

    public TestClassGeneric(GetMe theCall)
    {
      \_call = theCall;
    
      System.ComponentModel.ISynchronizeInvoke si =
        \_call as System.ComponentModel.ISynchronizeInvoke;
    }
    

    }

    But then I get a compile error: "Cannot convert type 'PureLibrary.TestClassGeneric.GetMe' to 'System.ComponentModel.ISynchronizeInvoke' via a reference conversion, boxing conversion, unboxing conversion, wrapping conversion, or null type conversion" Could someone please help me understand why this makes such a difference? Since the delegate signature didn't change it seems the casting would be the same. Thank you.

    - Kalvin

    C# help question

  • HOW TO FIX THIS EVERYTIME I ADD DATA IN MY DATA TABLE THE LASTROW AND FIRSTROW ARE THES SAME [modified]
    K Kalvin Work

    Just don't add the second row. check the data being added for unique values against the existing table. If the data exists, don't add it.

    - Kalvin

    C# help tutorial

  • What is the use of e.Handled in the KeyDown event
    K Kalvin Work

    As far as I have been able to tell setting e.Handled to true does absolutely nothing. I'm wondering why it's even available for the KeyDown event. Could someone please tell me? I have looked at the documentation for the textbox control and the KeyDown checks the value and sets some class variable, then the KeyPress checks that variable and sets e.Handled based on the value of the variable. Thank you.

    - Kalvin

    C# question

  • How bad...
    K Kalvin Work

    Can you write a plug-in for VS that will do that for you, or is VS not extensible that way? Just curious. Kalvin

    The Lounge csharp visual-studio question

  • Keeping constant strings
    K Kalvin Work

    Looking at this example it looks like there is a contradiction of ideas here. The class is called ConstantMessages, but the strings inside the class are being set up so that the application can modify them. If you want constant messages why not use: public const string ServerCommunicationFailure = "Message"; This should give a performance benefit. If I am wrong, someone please correct me so I can continue to learn. Kalvin

    C# csharp html com sysadmin tutorial

  • In Visual Studio...
    K Kalvin Work

    Not a perfect option but you can hold [Shift] while opening the project and it will open a new instance of VS.NET. Kalvin

    The Lounge csharp visual-studio

  • Y2K38 Problem
    K Kalvin Work

    Great now I don't know which "crisis" to worry about. Y2K38 or global warming... What to do, what to do. Oh well, this will give all the politicians a new "crisis" to get involved with. Maybe they can pass some laws about how time MUST be managed on the computer to avoid the world coming to an end in 2038. Kalvin

    The Lounge help question html com tools

  • The spammer has changed his signature.
    K Kalvin Work

    Yes, thank you very much. Kalvin

    The Lounge com question

  • The spammer has changed his signature.
    K Kalvin Work

    Please forgive my ignorance on this. I don't see why this article is spam. It looks like a decent article for someone that needs it. What's wrong with it. Again, please forgive my ignorance. Thanks. Kalvin

    The Lounge com question

  • Looking for a good Help Compiler
    K Kalvin Work

    It seems like a lot of the help compilers are just a UI front end but still use the HTML Help Workshop compiler to do the compiling. Is that correct? I have used the HTML Help Workshop but it seems to have some issues with corruption when there are lots of files to be compiled. Is that just a problem with the HTML Help Workshop frontend, or the exe used to compile the .chm file? Thank you.

    The Lounge html help question

  • Looking for a good Help Compiler
    K Kalvin Work

    Does anyone have a suggestion for a good help compiler? I've looked at HTML help, and RoboHelp. Are there better options? Thanks.

    The Lounge html help question

  • Scarlett Johansson Ebay
    K Kalvin Work

    What a waste of money. The current bid is up to $30,100. I can think of a lot of things to do with that much money than just shaking her hand, or anyone's hand for that matter. For that kind of money the winner should at least get to have dinner with her. Kalvin

    The Lounge com

  • Online data entry?
    K Kalvin Work

    Motherhood is undervalued only by women who wish they could stay home with their kids but have to work. They make themselves feel better for trying to make mothers feel bad about their decision to raise their own kids. If you don't need the money to pay the bills then don't worry about working for someone to make the money. Give that time to your kids and enjoy them while they are still little. Don't feel bad for making the decision to be a mom and love it. Kalvin

    The Lounge com question

  • How to get a raise
    K Kalvin Work

    Is it just me or does it seem like the only way to get a sizeable raise is to change who you work for? I get the max raise provided by the company, which is usually just under inflation. But, I don't get a merit raise unless I quite and go to work somewhere else. Does anyone else find this to be true? If it is, what is required to change this? I hear people in different careers talk about the same thing so it isn't just my profession.

    The Lounge question tutorial

  • Linux vs Windows
    K Kalvin Work

    That all makes sense. Thanks for all of your replies. Kalvin

    The Lounge visual-studio linux business help question

  • Linux vs Windows
    K Kalvin Work

    Yes my job requires Windows. I've thought before about moving to Mac but then I have to remember 2 platforms and how to customize and tweak stuff. So, I stick with Windows. Kalvin

    The Lounge visual-studio linux business help question

  • Linux vs Windows
    K Kalvin Work

    I have been a Windows user since 3.11. I have thought many times how nice it might be to move to Linux. The thing that keeps me from moving to Linux is the lack of software available. If I run a Linux system are there Linux versions of games, like World of Warcraft, available to play? Is a Linux user just stuck with whatever games happen to be in the open source world? If I knew there was a good way to be able to play the latest games on a Linux box I would be happy to switch. Is there something about Linux that I'm not aware of or is Linux really just useful for business use where you only want to use a small number of programs? I'm not trying to say anything bad about Linux or Windows. I really just want information about Linux and using current software. Thanks. Kalvin

    The Lounge visual-studio linux business help question

  • Great Circle Intersection point with a straight line
    K Kalvin Work

    That's a great idea. Since the great circle is on a sphere, could I use an arc in 2D for this? Any idea what the equation of a Great Circle line is? I really appreciate the help. I have been looking at this for days and am getting nowhere. All the equations I find have to do with finding the distance or heading for a Great Circle line. I don't need either one of those. Kalvin

    Algorithms algorithms help
  • Login

  • Don't have an account? Register

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