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
H

hain

@hain
About
Posts
37
Topics
18
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Is scrollbar hidden?
    H hain

    I have RichTextBox with the ScrollBars property set to Both. In a forms-based program, I would like to be able to programatically determine if a given scroll bar--vertical or horizontal--is visible (i.e., showing or not, depending on the RichTextBox contents.) Thanks, Tom

    C# question

  • Scroll synchronization of two RichTextBox controls
    H hain

    In a forms-based application, I would like to synchronize two RichTextBox controls so that one without a vertical scroll bar will scroll in synch with the other one (which has a vertical scroll bar). I.e., I want to be able to scroll both controls with one scroll bar. Thanks for any suggestions, Tom P.S. I saw Karin Huber's article, but this is for WPF and Silverlight.

    C# csharp wpf

  • Binary serialization
    H hain

    Thanks for the very helpful reply! It confirms that I'm not crazy--maybe--and it gets me past that wall. Tom

    C# json announcement workspace

  • Find maximum font size where string fits in a box [modified]
    H hain

    That solved the problem. Thanks! Tom

    C#

  • Binary serialization
    H hain

    I have a public [serializable] class with some simple strings and ints. I wrote an app that populates an instance of this class, and I can serialize as well as deserialize without problems. I then wrote a second app that should deserialize the file produced by the first program. The deserialization code is identical to that in the first program, and the class definition file is identical. However, it generates an exception with message "Unable to find assembly 'Q-Sort-Setup, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'." where Q-Sort-Setup is the first app. I have been tearing out my (already sparse) hair. Thanks for any suggestions, Tom

    C# json announcement workspace

  • Find maximum font size where string fits in a box [modified]
    H hain

    I need a function to return the maximum font size (for a given font)such that a given string will fit in a predefined box (rectangle). That is, I want to use DrawString(string, font, brush, rectangle) to draw the string in a fixed size box. Note that Drawstring will wrap the string automatically to fit the width. I don't want any of the string to extend beyond the bottom of the box. BTW, this for a windows application using forms. Thanks for any suggestions! Tom

    modified on Saturday, January 30, 2010 5:50 PM

    C#

  • Word wrap in RichTextBox
    H hain

    I have a WPF project containing a RichTextBox. I want the text not to wrap. I can force this by setting the PageWidth for the contained FlowDocument to be a large number. However, I really want the PageWidth to adjust itself to the length of the longest line (paragraph), so that the horizontal scroll bar thumb will have an appropriate length. I tried setting PageWidth to Auto, but this did not prevent wrapping. Thanks for your suggestions! tfhain

    WPF csharp wpf

  • Event and EventArg data propagation though nested UserControls
    H hain

    I have a DayCell usercontrol class, which has a property Date (of type DateTime). I also have a MonthCal usercontrol which has a collection of DayCells. Finally, I have a YearCal usercontol which has a collection of MonthCals. I would like the YearCal to have a DateChanged event which is fired when a DayCell is clicked. I would like the Date property of the clicked Daycell to be made available to the YearCal client (via an EventArgs-derived parameter). I could create an event in MonthCal that is subscribed to by YearCal, which then fires the DateChanged event. There MUST be a more elegant way for the click event and date information to propagate from DayCell to MonthCal to YearCal, but for the life of me, I can't figure it out. I would be grateful for any suggestions. Thanks, tfhain

    C#

  • DataGridViewColumn with multiline textboxes
    H hain

    I swear I searched all over... (i.e., I'm embarrassed!) The sure was a good start! Thanks, Henry. Tom

    C# question

  • DataGridViewColumn with multiline textboxes
    H hain

    How can I have/create a DataGridView having DataGridViewColumns with multiline textboxes? (The standard DataGridViewTextBoxColumn cell are single line TextBox objects.) Is there some way to access the properties of the underlying TextBox objects in a DataGridViewTextBoxColumn (i.e., to change the Multiline property to true)? Or, do I have to create a new class inheriting from DataGridViewColumn ? Thanks! Tom

    C# question

  • Redirection in Visual studio
    H hain

    Hmmm... I'm very surprised/disappointed. Thanks, Tom

    C / C++ / MFC visual-studio csharp c++ debugging question

  • Redirection in Visual studio
    H hain

    Apparently the rendering of the code was not right in my last message. What I want to do (from within VS) is prog.exe <in.txt >out.txt where < and > are the redirection symbols.

    C / C++ / MFC visual-studio csharp c++ debugging question

  • Redirection in Visual studio
    H hain

    Thanks, David, but that's not the problem. The program works from the command line, e.g.,

    prog.exe <in.txt >out.txt

    What I want to know is how do you set this up within Visual studio? I would have thought setting up the command arguments from within VS would do the trick--but I have not figured it out. Again, thanks, Tom

    C / C++ / MFC visual-studio csharp c++ debugging question

  • Redirection in Visual studio
    H hain

    I have a console C++ application that reads standard input and writes standard output. I want to run (i.e., debug) the program under the IDE, using a text file that I want to redirect to the program, and want the output to redirect to (over)write a text file. Going to the project properties, and under "Comand Arguments" typing "out.txt" (without the quotes) does not work. Neither does "<..\in.txt >..\out.txt" What am I doing wrong? Thanks! Tom

    C / C++ / MFC visual-studio csharp c++ debugging question

  • auxWireCylinder in VC9.0
    H hain

    I have some openGL projects that use auxWireCylinder(...) which was provided in glaux.lib. This library has apparently been deprecated, and is no longer available in VS 2008. Does anyone know where/how I can get this functionality back (or what I might use in its place?). Thanks, Tom

    Managed C++/CLI visual-studio graphics game-dev question

  • Generic toolbox component [modified]
    H hain

    I just needed a push in the right direction--and you gave it to me--thanks, led mike. I found a helpful web site: http://www.codeproject.com/KB/architecture/components.aspx[^] Thanks again, Tom

    C# question data-structures help

  • Generic toolbox component [modified]
    H hain

    I have written a generic (i.e., having a type parameter) undo-redo component that I would like to add to the toolbox. The problem is, how can I drag this component to the component tray, and specify the type (of objects on the undo stack). I can't just make the component use system.object, since the objects must be ICloneable (and that would not be "generic" anyway). When the component is dragged onto the component tray, an instance of the component is created, so it needs to know its type. Perhaps, the initial type could be system.object (how would you specify this for the drag?), and then the actual type could be be given as a property of the component, and changed when the property is changed? (How would you do this?) Interesting/challenging problem, huh? (...well, perhaps not for the gurus). Does anyone have an elegant solution? Thanks, Tom

    modified on Friday, March 14, 2008 11:46 AM

    C# question data-structures help

  • Toolbox icon for user control
    H hain

    I found a great explanation at http://www.bobpowell.net/toolboxbitmap.htm[^] Thanks to all.

    C# graphics design hardware question learning

  • Toolbox icon for user control
    H hain

    Thanks Leppie

    C# graphics design hardware question learning

  • Toolbox icon for user control
    H hain

    Other than having a protected override void OnPaint(PaintEventArgs pe) method, what makes a custom control "custom"? I tried inheriting my control from System.Forms.Control, rather than UserControl. Still no luck. :((

    modified on Thursday, March 13, 2008 12:54 PM

    C# graphics design hardware question learning
  • Login

  • Don't have an account? Register

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