[RESOLVED] stacking several PNG files under in a windows forms - Page 2
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18

Thread: [RESOLVED] stacking several PNG files under in a windows forms

  1. #16
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,591

    Re: [RESOLVED] stacking several PNG files under in a windows forms

    Quote Originally Posted by TheGreatCthulhu View Post
    [...] The form-related resource file is still there, but it's not normally used, nor there's a need for it to be used. It's collapsed under the form node in the project tree, so you barely even notice it - I guess it's reserved for the designer (I think that the IDE might use it when you work with some specific controls.)
    The form-related .resx file is collapsed under the form node in C++/CLI as well. And it is not normally used insofar as there usually is no need for the developer to directly work with it in any way. But it is quite commonly used by the Designer: It holds references to form-related resources such as the background images of forms or buttons, as used over there in the moving button thread. It also holds information about objects placed on the Designer's tray (timers, for instance); at least their position on the tray.

    That thing about "the most powerful .NET language" is yet another surprise to me.
    http://msdn.microsoft.com/en-us/libr...=vs.80%29.aspx
    Interesting. I haven't yet read the entire article but I've bookmarked it. Looks as if many of the forum celebrities haven't read it either. ... or they simply agreed not to agree at some point.

    If [C++/CLI's] usefulness is limited, we have Microsoft to blame: generally, the support could be better, and especially so when it comes to the IDE.
    I coudn't agree more.

    For example, you could probably create a WPF application using C++/CLI, but it would be cumbersome to code it without the support of the IDE. (bunch of stuff that needs to be set up, and XAML, all manually.)
    I'm pretty certain this can be done. But hand-writing (as opposed to sometimes hand-editing for some fine tuning) XAML seems similar to hand-writing HTML or XML to me, and that's also something that practically isn't done anymore nowadays. Maybe someday someone will come up with a 3rd-party XAML editor that can be used with C++/CLI?

    Hm... After some digging, the docs say that C-style casts should be avoided in CLR projects.
    I think I have read something like that too, but doesn't that pertain to native C++ as well?

    But, .NET events are essentially just a syntactic sugar for what is in its core the Observer pattern. [...]
    Looks as if this could be the beginning of another interesting discussion, so I'll spawn a separate thread on it. I'll post the code containing the PentagramBox class I already mentioned there as a basis for discussion. The thread I wrote that for is almost a month ago and the homework is most likely already handed in.

    EDIT: This is the spawned thread: http://www.codeguru.com/forum/showthread.php?t=510377
    Last edited by Eri523; March 23rd, 2011 at 07:01 PM. Reason: Added link to the spawned thread
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

  2. #17
    Join Date
    Jan 2010
    Posts
    1,102

    Re: [RESOLVED] stacking several PNG files under in a windows forms

    Quite a long thread, but just a few final remarks...

    Quote Originally Posted by Eri523 View Post
    Interesting. I haven't yet read the entire article but I've bookmarked it. Looks as if many of the forum celebrities haven't read it either. ... or they simply agreed not to agree at some point.
    Just wanted you to see the title - to back up my claim that Microsoft said it. I only skimmed through the article, it seems to mostly talk about basic .NET concepts, as applied to C++/CLI, nothing special.

    Quote Originally Posted by Eri523 View Post
    I think I have read something like that too, but doesn't that pertain to native C++ as well?
    Yeah, but I don't really buy it. I know this goes against the mainstream, but I think this guy has a point. Now, my opinion is not as radical as his, but the way I see it: while casting is to be avoided, it's sometimes necessary, and c-style casts are not dangerous in themselves, but the developers trying to pull stunts with them are.
    It's like everything else - follow good programing practices, and don't fool around and then feel sorry about it later.

    To quote that article:
    There’s another reason why C++ pundits scorn C-style cast -- the same cast expression may perform two conversions at once:
    Code:
    const unsigned int *lp; //ptr to const unsigned int
    (int *) lp; //get rid of unsigned and const at once.
    And I say: so what? If the programmer made a mistake here, that’s too bad. Then again, programmers make much more mistakes by confusing delete and delete[]. Besides, what if the programmer had truly meant to use two cast operations in one expression? Should the programming language twist his arm and force him to use two different cast expressions? Would that make the code clearer or safer in anyway? Perhaps the following example will convince you that it certainly wouldn’t:
    Code:
    reinterpret_cast <int *> (const_cast<unsigned int *>(lp))//instead of (int *) lp
    So much for clarity and explicitness!
    Bottom line: you can do dangerous stuff with C-style casts, but if you care for your code, why in the world would you do it?

    (Note that the same author (i think) was a "believer" before.)
    Last edited by TheGreatCthulhu; March 24th, 2011 at 04:34 PM.

  3. #18
    Join Date
    Apr 2011
    Posts
    1

    Re: [RESOLVED] stacking several PNG files under in a windows forms

    Thank you for the answer,
    I have resolved it in other way, but your advice about flicker issue was useful in other part i had pending to resolve D

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center