Results 1 to 22 of 22

Thread: How does it work? Why does it work this way?

  1. #1

    Thread Starter
    Special Guest - Microsoft
    Join Date
    Dec 2007
    Posts
    36

    How does it work? Why does it work this way?

    Hi!

    I'm excited that we have a broad showing from the VB team, from feature designers, to implementers, to testers. This is a good group to ask deeper how and why questions.

    So here are some questions to think about - maybe you want to respond:

    - Are you curious how a particular VB '05 or '08 feature works?

    - Are you curious why a particular design decision was made?

    - Do you have feedback about the behavior or decision?

    Best,
    Paul
    Paul Yuknewicz
    Lead Program Manager
    Microsoft Visual Basic
    http://msdn.com/vbasic

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: How does it work? Why does it work this way?

    1. Why is the ColorMatrix so woefully badly documented?

    2. How come you guys didn't write an overload for Graphics.DrawImage() that lets you specify four PointFs? Three is fine if you want a parallelogram but what about irregular quads? Do you plan to allow irregular quads in the future? Also perspective correction would be nice.

    3. I want the moon on a stick please.
    I don't live here any more.

  3. #3
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    Re: How does it work? Why does it work this way?

    In answer to number 2, I've had the same problem myself... couldn't come up with a decently fast way to do it with VB at all, so I ended up rewriting the whole function from scratch in C#. An image, and four corner points. Did I waste my time?

  4. #4
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148

    Re: How does it work? Why does it work this way?

    Is there any setting (e.g.
    Code:
    Option Even Stricter
    ) that prevents passing an integer through a parameter that expects an enum?

    Or - what do you recommend instead?

  5. #5
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: How does it work? Why does it work this way?

    Quote Originally Posted by Merrion
    Is there any setting (e.g.
    Code:
    Option Even Stricter
    ) that prevents passing an integer through a parameter that expects an enum?

    Or - what do you recommend instead?
    But arent enums just fancy names for integers?
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  6. #6
    Frenzied Member Phill64's Avatar
    Join Date
    Jul 2005
    Location
    Queensland, Australia
    Posts
    1,201

    Re: How does it work? Why does it work this way?

    Quote Originally Posted by Atheist
    But arent enums just fancy names for integers?
    Yes, Integers, Longs or Bytes can be an enum.
    The enum name itself is just an alias to a value of any of those types.

    Being able to put a direct value in makes sense.
    And why wouldn't you want to do so? especially in circumstances when you're reading settings or the like.

  7. #7
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148

    Re: How does it work? Why does it work this way?

    No - enums should allow for a greater deal of type safety than integers.

    If you have an enum
    Code:
    Public Enum VehicleDrivenWheels
        TwoWheelDrive = 2
        FourWheelDrive = 4
    End Enum
    you should not be able to say:
    Code:
    Dim MyCarDrivenWheels As VehicleDrivenWheels = 739
    It is this way because when you combine enums (that are set as <flags()> ) together and this would technically allow any integer - but I'd like some way of saying : treat this enum as not combineable...even as a specific attribute you have to set to make it so...

  8. #8
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: How does it work? Why does it work this way?

    Why did your team decide to allow the Intellisense to be resized? It already appears to be placed pretty well.

  9. #9
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    Re: How does it work? Why does it work this way?

    That's where I can argue.. the sizing of it is great, the tooltips are great... but whenever I need to reference existing code as I'm using Intellisense, it ALWAYS displays directly over what I need to see. Pain in the rear. But aside from that ever so slight drawback (mild sarcasm included...), Intellisense is a good size for me. I don't mind scrolling... in my opinion, it's better than having half the screen covered by methods and parameters.

  10. #10
    Fanatic Member TTn's Avatar
    Join Date
    Jul 2004
    Posts
    685

    Re: How does it work? Why does it work this way?

    but whenever I need to reference existing code as I'm using Intellisense, it ALWAYS displays directly over what I need to see. Pain in the rear.
    I feel the same way, but it must be tough to satisfy both needs.

  11. #11
    Fanatic Member TTn's Avatar
    Join Date
    Jul 2004
    Posts
    685

    Re: How does it work? Why does it work this way?

    - Are you curious how a particular VB '05 or '08 feature works?
    - Are you curious why a particular design decision was made?
    - Do you have feedback about the behavior or decision?
    When 2005 first came out, the default Timer was switched to the System.Windows.Forms.Timer, which has a Tick event.
    You now have to choose the toolbox items, and add the System.Timers, to get an Elapsed event like in 2003.
    I thought that this might be a mistake, but I'm giving it the benifit of doubt.

    Was there a reason for this particular desicion?


    While on the subject of ToolBoxes, and their ambiguous icons.
    Once again I've experienced the toolbox bug of 2005 where the icons go blank.
    This is annoying and makes it hard to quickly located the control i want.
    I just unistalled the .NET 2.0 framework, and then reinstalled it.
    Now my toolbox shows the correct picture icons.


    Is there an easier fix for version 2005?
    Does version 2008 fix this bug for good?


    _

  12. #12
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,522

    Re: How does it work? Why does it work this way?

    Yes, there is an easier solution.... reset your tool box....
    Right-click anywhere in the Toolbox and select "Reset Toolbox" .... you'll lose any custom groups you may have created, but it will reset the toolbox... a lot less painful than an uninstall/install.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  13. #13
    Fanatic Member TTn's Avatar
    Join Date
    Jul 2004
    Posts
    685

    Re: How does it work? Why does it work this way?

    Thanks techgnome.
    It looks like other people were able to WorkAround the problem by resetting the toolbox too. I'll see what happens next time.
    This does'nt cure things if you've done a fair amount of customizing(i dont really), because you have to maintain it about once a month.
    This is approximately the frequency which it happens to me anyway.

    I really hope that 2008 fixes this for good, since the service pack for 2005 did not, and the team knew about it then.

  14. #14
    Addicted Member
    Join Date
    Sep 2006
    Location
    Surabaya, Indonesia
    Posts
    163

    Re: How does it work? Why does it work this way?

    In VS2005, when creating a component or user control, I can't test my toolbox image unless I compile and add it reference outside the project. Is this fixed in 2008? Also, it need some trick to get the icon works in the toolbox (you have to place it on the root folder). IMO, it's better that all resource can be managed in a folder rather than place them all in the root folder.
    Check my Blog at VB Corner,Component Crafts

  15. #15
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: How does it work? Why does it work this way?

    Hmm, do the MS guys have the day off or something?

  16. #16
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148

    Re: How does it work? Why does it work this way?

    I'm guessing they aren't up yet - probably working on a EST timezone based work day :-)

  17. #17
    ex-Administrator brad jones's Avatar
    Join Date
    Nov 2002
    Location
    Indianapolis
    Posts
    6,608

    Re: How does it work? Why does it work this way?

    Quote Originally Posted by Merrion
    I'm guessing they aren't up yet - probably working on a EST timezone based work day :-)

    They are on Pacific time (Redmond, Washington), so they won't likely be on until later (it is 6:00am in Redmond now....) . Additionally, the Microsoft team also has to do their 'day job', so they won't be on as constantly as some of you .

    They have to sleep

    Brad!
    Have you given out your reputation points today? Select the Rate This Post link to give points for good posts!
    -------------------------------------------------------------
    Brad! Jones
    Lots of Software, LLC
    (I wrote: C Programming in One Hour a Day) (Dad Jokes Book) (Follow me on Twitter)

    --------------------------------------------------------------

  18. #18
    Frenzied Member Phill64's Avatar
    Join Date
    Jul 2005
    Location
    Queensland, Australia
    Posts
    1,201

    Re: How does it work? Why does it work this way?

    TTn, in regards to the timers, as far as I can tell, the Timers.Timer uses a new thread, where as the Forms one does not (when i tried both to perform Me.Hide() the Timers errors requiring Invoke, where as the Forms one doesn't)

    But it would be nice for MS to confirm/disprove this.

  19. #19
    Fanatic Member TTn's Avatar
    Join Date
    Jul 2004
    Posts
    685

    Re: How does it work? Why does it work this way?

    TTn, in regards to the timers, as far as I can tell, the Timers.Timer uses a new thread, where as the Forms one does not (when i tried both to perform Me.Hide() the Timers errors requiring Invoke, where as the Forms one doesn't)
    But it would be nice for MS to confirm/disprove this.
    Okay were you debugging it?
    The debugger falsely will cause errors like this sometimes, especially when refering to Me.. Don't use the debugger to test things.
    I actually tested it in both ways with the debugger and without, and the elapsed event worked, but the tick did not.
    This seems to opposite of what you are saying.

  20. #20
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,943

    Re: How does it work? Why does it work this way?

    I'm curious about why structures and classes are implemented the way they are. Actually, I'm not curious at all about why classes are the way they are, I'm curious about why structures are not.

    Mostly:
    1) Why is it not allowed to add a constructor that takes no arguments, especially since the behavior of the constructor is not otherwise mandated?

    2) Why is a structure automatically a Value type. Since structures can contain reference types as well as value types, making a structure doesn't necessarily say anything about how it will behave if it is copied, or passed to a function. Classes and structures can be used interchangeably in effect, so what is the reason behind the difference?
    My usual boring signature: Nothing

  21. #21

    Thread Starter
    Special Guest - Microsoft
    Join Date
    Dec 2007
    Posts
    36

    Re: How does it work? Why does it work this way?

    Sorry - folks on working on the editor sides of thing were slammed today. I'm roping them in C'mon, we're allowed to be a little slow on a slow chat, right?
    Paul Yuknewicz
    Lead Program Manager
    Microsoft Visual Basic
    http://msdn.com/vbasic

  22. #22
    Fanatic Member TTn's Avatar
    Join Date
    Jul 2004
    Posts
    685

    Re: How does it work? Why does it work this way?

    Quote Originally Posted by PaulYuk_MS
    Sorry - folks on working on the editor sides of thing were slammed today. I'm roping them in C'mon, we're allowed to be a little slow on a slow chat, right?
    We'll let it slide this time, but otherwise it's gonna go down on your permanent record{echos..}. lol

Posting Permissions

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



Click Here to Expand Forum to Full Width