CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: opedog

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. Replies
    1
    Views
    7,697

    TabControl and my Adorner

    The main content of my app is a custom TabControl that I've re-templated and styled the heck out of. One of the design decisions of this application is that it should have no modal windows (the...
  2. Replies
    1
    Views
    5,456

    run-time object inspection question

    VS2008, C#

    In several of my business objects, I'm lazily loading some data that requires a call to the DB. This presents a problem when trying to quick watch the parent object. When it hits that...
  3. Replies
    6
    Views
    5,402

    Re: Hiding textbox text selection

    I'm curious as to why you can't use a label. I only use a textbox as a label for 2 circumstances:
    1) I need to a readonly display that will still allow the user to copy the data from the control....
  4. Re: [RESOLVED] How to get the type of a generic collection?

    Hey thanks, I was wondering this myself a few days ago. :)
  5. Re: How to display large number of rows in a DataGridView?

    I don't have many specifics as I've yet to delve into this a lot yet, but research the VirtualMode property on the DataGridView and see how you can use it. VirtualMode only renders the rows the user...
  6. Replies
    0
    Views
    2,176

    Combobox Validating and DataBinding issue

    Heya. :)

    I've got a quirky thing happening with databinding in C#, .NET 2.0, CSLA 2.something, and my databinding.

    The user hits a button, i popup a modal, populate some comboboxes on the...
  7. Thread: Datagridview

    by opedog
    Replies
    11
    Views
    2,144

    Re: Datagridview

    You may want to explicitly tell your SqlCommand object that the CommandType is a StoredProcedure:


    nonqueryCommand.CommandType = CommandType.StoredProcedure;

    I'm not sure what the default is...
  8. Replies
    1
    Views
    997

    Re: .NET DataBinding oddity

    Self reply inc!

    http://weblogs.asp.net/grobinson/archive/2003/09/11/27127.aspx

    Seems this individual has the same problem and essentially the same workaround.

    One of the comments:
  9. Replies
    1
    Views
    997

    .NET DataBinding oddity

    So I'm playing with a screen in our system. On the screen are a few comboboxes that we have databound to a list of stuff from a cache. Dictionary type stuff that we don't have to go to the database...
  10. Replies
    9
    Views
    1,247

    Re: Simple throw question...

    Replace the catch bit of my example with this:


    catch (Exception ex)
    {
    Console.WriteLine(ex.Message);
    }

    This is also permissable:
  11. Replies
    9
    Views
    1,247

    Re: Simple throw question...

    Yeah, yeah...
  12. Replies
    9
    Views
    1,247

    Re: Simple throw question...

    try
    {
    if (x < 0)
    throw new Exception("Parameter out of bounds.");
    }
    catch
    {
    Console.WriteLine("");
    }
  13. Replies
    5
    Views
    2,951

    Re: Linear Gradient Brush with Alpha

    Your signature doesn't display for me.
  14. Replies
    2
    Views
    1,371

    Re: How to print Binary digit

    Quick google search revealed this:


    int i = 100;
    string str = Convert.ToString(i, base); //base = 2, 8,10 or 16

    You'll obviously want to use base 2 for binary.
  15. Replies
    9
    Views
    1,704

    Re: [RESOLVED] Running a batch (*.bat) file...?

    In order to maximize the window of the .exe, you'd somehow have to match up the Process with the window handle. Unfortunately I'm not sure how to do this. :(
  16. Replies
    4
    Views
    932

    Re: class Dictionary

    Are you trying to figure out what hash function the Hashtable uses? It's probably object.GetHashCode().
  17. Replies
    2
    Views
    4,477

    Re: how to have modal dialog in c#?

    Perhaps you have to specify the owner of the modal?
  18. Replies
    6
    Views
    1,262

    Re: What should I be inheriting from?

    Your other options include inheriting from System.Drawing.Image. Bitmap actually inherits from Image, anyway.

    Or you could use what's called extension methods.
    ...
  19. Replies
    1
    Views
    1,395

    Re: Autosize columns in a ListView

    Yep, set the width of the ColumnHeader objects to -2. For instance:


    foreach (ColumnHeader ch in lvList.Columns)
    {
    ch.Width = -2;
    }

    Try it!
  20. Replies
    9
    Views
    1,704

    Re: Running a batch (*.bat) file...?

    Beaten by nelo by mere minutes!
  21. Replies
    9
    Views
    1,704

    Re: Running a batch (*.bat) file...?

    You're going to want to take a look at the System.Diagnostics.Process class. Inside of it it has a StartInfo class that you can fill in with executable location data.


    Process batFile = new...
  22. Replies
    6
    Views
    1,052

    Re: class in a class?

    Yup, nested classes are instantiated the exact same way as all the others. For instance:


    public class Class1
    {
    public class NestedClass1
    {
    }
    }
  23. Replies
    6
    Views
    1,052

    Re: class in a class?

    @zdavis - I don't see any nested classes in your example. Maybe a misplaced bracket?

    @JustSomeGuy - What I'd suggest here is to just try it out. Nested classes in C# are very useful for limiting...
  24. Replies
    2
    Views
    1,315

    Re: ImageList Class Example.

    You may want to provide a link to the example you're referring to. We don't know if you're talking about ASP or WinForms. I dunno if it'd matter much, but more context never hurts.
  25. Replies
    4
    Views
    1,014

    Re: Background not repainting

    Yep, the simplest way being using a BackgroundWorker. Very easy to use for simple threading. Just remember to wrap any UI changes in the following:

    ...
Results 1 to 25 of 49
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured