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
L

Lyon Sun

@Lyon Sun
About
Posts
43
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to resize two texbox proportionally?
    L Lyon Sun

    Hi, I was thinking about Anchor property as well. How about using a SplitContainer in a horizontal oritation, with two textBoxes Dock property set as Fill? Br!" Sun

    C# help tutorial question

  • change TableLayoutPanel RowCount before Custom Control Initialization?
    L Lyon Sun

    Hi, all, In WinForms with C#, a TableLayoutPanel custom control with, saying, 10 rows and 5 columns being designed in designer window. NumberOfRows was coded as a property of this custom control. I wish to change this property value and set it as a new RowCount of the TableLayoutPanel mentioned above, before the custom control running InitializeComponent(). Is this possible? I have tried to do it with a method in the SET of that property as below:

    private void OnNumberOfRowsChanged()
    {
    tableLayoutPanel1.RowCount = numberOfRows;
    }

    and it didn't work while I change the value of NumberOfRows property, and set a breakpoint in the constructor method of that custom control, the RowCount remains as 10. Btw, I tried to use tableLayoutPanel1.RowStyles.Remove() and tableLayoutPanel1.RowStyles.RemoveAt(index) as well, neither of these two works as well... Any Idea? Your kind help is so much appreciated!! Br! Sun

    C# csharp database winforms debugging help

  • problem with custom control properties value
    L Lyon Sun

    Hi, stancrm, You are right. I did this exception in the wrong place, and with a wrong exception name as well :rolleyes: . I noticed it after I read Sur's reply. Anyway, Thank you two!! A lot! Br! Sun

    C# csharp winforms help tutorial question

  • problem with custom control properties value
    L Lyon Sun

    Hi, Sur, Thank you so much! This solved my problem. Really, thanks a lot!! Br! Sun

    C# csharp winforms help tutorial question

  • problem with custom control properties value
    L Lyon Sun

    thank you, stancrm, I've tried this, I added one method, OnCurrentLineChanged() in the SET of that property, and the method is as follows:

      private void OnCurrentLineChanged()
      {
            if (currentLine < 1 || currentLine > 100)
            {
                throw new System.ArgumentException("Property value is not valid", "original");
            }
      }
    

    However, I don't know for what reason, it doesn't work when I go designer window and try a number like 123. Any idea with this? Br! Sun

    C# csharp winforms help tutorial question

  • problem with custom control properties value
    L Lyon Sun

    Hi, all, I am doing with a custom control in WinForms, and there is one customed integer type property, say, currentLine, declared in that custom control class with the following code:

        private int currentLine;
    
        public int CurrentLine
        {
            get { return currentLine; }
            set { currentLine = value; }
        }
    

    but this property's value should be restricted between 1 and 100. How to make this happen, so that a value smaller than 1, or bigger than 100 is rejected to be entered in properties window at designer time? Any suggestions are so much appreciated!! Thanks. Br! Sun

    C# csharp winforms help tutorial question

  • Form flickering problem
    L Lyon Sun

    Luc Pattyn wrote:

    assuming the button is visible on some form,

    Hi, what if I create this button btn_OK dynamically in my codes then? Thanks for your patient so much! ;) Sun

    C# help question

  • Form flickering problem
    L Lyon Sun

    Luc Pattyn wrote:

    IMO this.Dispose() does not make any sense,

    Hi, Sorry if I said it wrong, but when I mentioned this.Dispose(), this = the main form. But thank you, Luc, I got your point. Again, I have another question, what if I set a new Font for one control, for example, btn_OK, am I doing it rightly by the code below:

    btn_OK.Font = new Font(....);
    ...
    btn_OK.Font.Dispose();

    Thanks in advance!;) Sun

    C# help question

  • Form flickering problem
    L Lyon Sun

    Luc Pattyn wrote:

    if you have those, don't forget to Dispose the ones you created

    Hi, What if my app has values need to be passed? does this.Dispose() going to erase them? Sun

    C# help question

  • While MouseDown
    L Lyon Sun

    Zap-Man wrote:

    private static bool IsKeyDown = false;

    Confused. Can this variable be changed ever? Correct me if I am wrong...:)

    C# help com

  • Visual Studio 2005 C# version
    L Lyon Sun

    Hi, I guess it's .NET 2.0, since you can see it's combined with Visual Studio 2005, well, for example, look at the right side of this page[]. :)

    C# csharp visual-studio question help announcement

  • tab appearance in c#
    L Lyon Sun

    Interesting. Do you mean you don't need so many tabs? Cuz, first, when one tab is showing, the others are hiding; second, tab pages can be removed if not needed. ;)

    C# question csharp

  • WMP
    L Lyon Sun

    Huh, Sorry, I must have read your previous post wrong.:) If you need free source of that book, you can just google the name of that book with keyword "rapidshare", then you should have few links to be accessed. Good luck! Sun

    C# question tutorial

  • WMP
    L Lyon Sun

    Yonathan1111 wrote:

    Hi leapsword, I need free source.

    Hi, Free source are certainly not possible to be given, cuz: 1. They require other people's hard work on; 2. We are here only for the reason to try to help each other with problems, but not for the sake of giving a solution; So, very sorry to say, but you probably need to go and buy a book to read, or do some research by searching on internet. ;)

    C# question tutorial

  • landscape page in crystal report
    L Lyon Sun

    And I just want to have a million dollars. :laugh:

    C# csharp workspace

  • Get Control information at Mouse Position?
    L Lyon Sun

    :omg: Okay, you mean this. Thank you anyway!

    C# question csharp winforms

  • Get Control information at Mouse Position?
    L Lyon Sun

    Hi, Thank you for your replying! ;)

    Luc Pattyn wrote:

    One handler can contain code that causes many new events to fire (i.e. be added to the queue), e.g. by executing btn.PerformClick().

    Could you be so kind to explain little bit more details about this line? Your kind help is so much appreciated! Sun

    C# question csharp winforms

  • WMP
    L Lyon Sun

    Hi, You might be able to get some ideas if you could go through Chapter 16 of this book :laugh: Best wishes!

    C# question tutorial

  • Get Control information at Mouse Position?
    L Lyon Sun

    Hi, all, Suppose I have two buttons in my WinForms Application, named as btn_First, btn_Second, Is it possible to do the following steps: 1. Fire Mouse_Down event of btn_First, 2. Mouse_Leave from btn_First, 3. while Mouse Event of btn_Second is still not released yet, Mouse_Enter into btn_Second get fired, and then, get the information such like (Control)sender is btn_Second, etc?? According to what I have learned so far, I think this is not possible, because two events are not supposed to get fired at the same time. But I am not so sure, just wanna ensure this(hope this is not so stupid a question ;P ). Thank you. Any suggestions would be so much appreciated!

    C# question csharp winforms

  • Problem with RichText Box(Right Click Cut/Copy/Paste/SelectAll)...
    L Lyon Sun

    As d@nish said below, that is 100% possible. You just have to set the ContextMenuStrip Property for those two of your RichTextBoxes, enjoying the coding time. :laugh:

    C# help tutorial question
  • Login

  • Don't have an account? Register

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