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
C

Carlos H Perez

@Carlos H Perez
About
Posts
15
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Avalon is a little overwhelming
    C Carlos H Perez

    Nish, It is a new paradigm and that's what makes it hard but once you "get it" then you start thinking in "Avalon" not Win32 API. Yes, there are not windows but logical "Controls" that are rendered in the main window which is the only "real" window. The Java Swing library have been doing this for years, so it is not really a new idea. Yes, it is hard when you first start because you have to abandon your hard earned knowledge, your "black belt" in Windows API and start with a new way of writing controls that does feel overwhelming. I did feel very overwhelmed at the beggining but now I am starting to see the light at the end of the tunnel. I love controls and as part of my learning I am writing a TabControl totally from scratch --not derived from the one that comes with Avalon. Here is a screenshot if you feel curios how my efforts are going. Custom TabControl Carlos H. Perez

    The Lounge c++ csharp css winforms com

  • WinFX November CTP released
    C Carlos H Perez

    You know that you have become a hardcore geek when you have been searching the internet for this annoucement everyday for the last two weeks. Thanks for the info. I am downloading right now and very happy :)

    The Lounge c++ com

  • Code style
    C Carlos H Perez

    I used the first style for 7 years in C++. I have been using the second style for almost 3 years in C#. With both styles I have and will continue making money. If someone pays me to do it one way or another, I will do it the way he wants it as long as he pays me my rate. Is not that what matters? The same goes for languages. I can write in Java, Visual Basic, C++, or C#. If you pay me, you choose the language and coding standards. Regards, Carlos H. Perez.

    The Lounge question css

  • Side TabControl
    C Carlos H Perez

    Yes, it is true. The web site will be rewritten in a couple of months. Carlos.

    C# csharp wpf winforms question

  • Side TabControl
    C Carlos H Perez

    The TabControl in the SharpLibrary is very flexible. It might be what you are looking for. Here are some screen shots. SharpLibrary TabControlEx. Regards, Carlos SharpLibrary Website

    C# csharp wpf winforms question

  • Does anyone know how to make a transparent tabpage?
    C Carlos H Perez

    The .NET TabControl is actually a wrapper of the "PropertySheet" control that first appeared in the Common Control Library Version 4.71. It is not a "Windowless" control that you can just make transparent by setting some flag. What you can do is to trick the user's eye into thinking that the TabPage is transparent by drawing the portion of the Form's background image underneath the TabPage. This will make the TabPage --not the TabControl-- seem like it has a transparent background. Out of my own curiosity I just spent a mere 5 minutes putting together a sample that does this. Here is the code I used on the Paint handler for one of the TabPages: private void tabPage2_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { Image backImage = BackgroundImage; TabPage tp = (TabPage)sender; if ( backImage != null ) { Graphics g = e.Graphics; Rectangle tabPageBounds = tp.Bounds; Rectangle screenTabPageBounds = tp.RectangleToScreen(tabPageBounds); Rectangle finalRect = RectangleToClient(screenTabPageBounds); g.DrawImage(backImage, new Rectangle(0, 0, tp.Width, tp.Height), finalRect.Left, finalRect.Top, finalRect.Width, finalRect.Height, GraphicsUnit.Pixel); } } This probably could be improved but it is something just off the top of my head. Here is a picture of what the result looks like --not perfect but perhaps close to what you are looking for--. Transparent TabPage Regards, Carlos H. Perez.

    C# help tutorial question

  • Need a multiline listview Windows Forms control
    C Carlos H Perez

    Hi Nick, I would like to write a series of articles on WinFX --or Avalon, or whatever the name for new technology for writing Windows Application in Longhorn will be. Probably, when Longhorn gets into beta and things get more well defined I will start posting some of my findings here. The new batch of technologies making a debut in Longhorn will surely keep us busy for years to come and I am certainly looking forward to sink my teeth on all the information related with the new UI model. Regards, Carlos.

    C# winforms question

  • Need a multiline listview Windows Forms control
    C Carlos H Perez

    Obviously you are looking for a free implementation but just in case you don't find it and you need to save time, you can check ours. we have both: MultilineListBox: http://24.199.8.122/MultilineListBox3.aspx[^] MultilineListView: http://24.199.8.122/ListView4.aspx[^] Regards, Carlos.

    C# winforms question

  • api
    C Carlos H Perez

    I wonder how long it would take to become a Senior Software Engineer asking this broad, general questions and hoping for an answer in a forum like this. I think that if you are at the level where you don't even know what API stands for, buying entry level books would be so much helpful on the road to become a professional programmer. Regards, Carlos H. Perez.

    C# question json

  • Context Menus will text box
    C Carlos H Perez

    Hey Nish, Sure, I love CodeProject. I just did not appreciate the geeks fighting me over my own code. Regards, Carlos.

    C# csharp swift hardware question

  • Context Menus will text box
    C Carlos H Perez

    The standard menu just does not work with embedded child controls. I tried this myself, and the menu class won't budge to display an embedded control --I guess this could be, at least in Windows XP, because the Windows is Layered and thus possible painted on a memory buffer. It's not even possible to spy on the Window menu because is protected by the system. Just setting up the hook for getting the handle to menu window is a task in itself too. Most custom menu controls don't have support for this either. And yes, you need to write your own custom control and deal with alll the painting and handling of the keyboard to make the menu behave like a standard menu. If you have the time the it is a good learning excercise. If you don't you can always check the SharpLibrary popup menu control which does offer that feature. Regards, Carlos http://www.sharplibrary.com

    C# csharp swift hardware question

  • Changing List View Highligh:confused:
    C Carlos H Perez

    Go to DevianArt

    C# tutorial

  • Changing List View Highligh:confused:
    C Carlos H Perez

    The library is a commercial package. You can download the 35 samples available at the SharpLibrary Web Site.

    C# tutorial

  • Changing List View Highligh:confused:
    C Carlos H Perez

    The ListViewEx class in the SharpLibrary allows this and many other customizations. Here is a screenshot: Screenshot Regards, Carlos

    C# tutorial

  • OwnerDraw TreeView: OnPaint(...)
    C Carlos H Perez

    You cannot be using OwnerDrawn support and "ControlStyles.AllPaintingInWmPaint|ControlStyles.DoubleBuffer|ControlStyles.UserPaint" because they are two different, mutually exclusive things. In Windows you usually can paint a control in three ways: 1- OwnerDraw which is when you handle the OnDrawItema and OnMeasureItem messages. In this situation the control ask you to do the drawing of a particular item at right time. Some of the oldest controls support this techinque: menus, combo box, etc. 2- Custom draw. This is a more fine grained version of the OwnerDraw version, here you have the oportunity to draw just part of the item instead of assumming full resposabilty for the whole drawing. Some of the more sophisticated common controls support this technique: TreeView, ListView. 3-. User Paint: You do the whole drawing yourself. In this case you don't have any help but you have full control as to what to paint. This is what you need to use when you are going to write a control from scratch. This is by far the best technique to write powerful controls because you have totally control of the painting. One last thing: how are you using OwnerDraw techinque for the TreeView control? As far as I known the TreeView control does not support OnMeasureItem or OnDrawItem methods. You could use CustomDraw but only if you hack the support yourselve using the fact that the .NET TreeView is just a wrapper for the native TreeView control in the Common Control library. Regards, Carlos H. Perez

    C# help 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