Results 1 to 11 of 11

Thread: iPhone scrolling

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    5

    iPhone scrolling

    Hello all,

    I'm writing an iPhone media player in Visual Studio 2005 for windows mobile devices. Anyone here, think they can make a nice scrolling iPhone playlist? Or at least, point me in the right direction for what I'd need to do?? Would REALLY appreciate it.

  2. #2
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,762

    Re: iPhone scrolling

    First off let me say that I don't own an iPhone (/me is too cheap to own a $500 phone ), but from what I have seen, the iPhone uses an acceleration based scrolling mechanism. What I mean is that the faster you scroll, the farther you scroll. Because of that using a standard scroll bar is out of the question. One way to approach it would be to use the MouseMove event on the object you are going to scroll (maybe a panel) then look at the distance the mouse has moved between calls to the routine and base the scroll on that. Also if I recall the scrolling on the iPhone doesn't immediately stop. It has a deceleration to it that makes it slow down, then stop. It sounds like a fun project and could make a really cool control object it you do it right.
    GL
    kevin
    Process control doesn't give you good quality, it gives you consistent quality.
    Good quality comes from consistently doing the right things.

    Vague general questions have vague general answers.
    A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.

    ______________________________
    Last edited by kebo : Now. Reason: superfluous typo's

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

    Re: iPhone scrolling

    How do you make a .Net application work on an iPhone?
    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)

  4. #4
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,762

    Re: iPhone scrolling

    you don't, but I think he's trying to duplicate the look and feel of the iPhone on a windows device
    Process control doesn't give you good quality, it gives you consistent quality.
    Good quality comes from consistently doing the right things.

    Vague general questions have vague general answers.
    A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.

    ______________________________
    Last edited by kebo : Now. Reason: superfluous typo's

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    5

    Re: iPhone scrolling

    Quote Originally Posted by kebo
    First off let me say that I don't own an iPhone (/me is too cheap to own a $500 phone ), but from what I have seen, the iPhone uses an acceleration based scrolling mechanism. What I mean is that the faster you scroll, the farther you scroll. Because of that using a standard scroll bar is out of the question. One way to approach it would be to use the MouseMove event on the object you are going to scroll (maybe a panel) then look at the distance the mouse has moved between calls to the routine and base the scroll on that. Also if I recall the scrolling on the iPhone doesn't immediately stop. It has a deceleration to it that makes it slow down, then stop. It sounds like a fun project and could make a really cool control object it you do it right.
    GL
    kevin
    Thanks for the advice, I've got code to trap both X and Y mouse positions already, but my problem is, let's say I use a panel, how do I get a list into it, where each line is selectable, and how do I control scroll parameters? For example, I coded a similar app in flash, (but windows mobile devices dont have enough horsepower to deal with flash apps like mine) but it had a parameter like this:

    textbox.scroll += 5

    How do I allow an object to scroll from code in VB .net. And furthermore, for my specific need, WHAT am I scrolling, lol.

    Thanks so much again!

    Chad.

  6. #6
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,762

    Re: iPhone scrolling

    Quote Originally Posted by thundershadow14
    How do I allow an object to scroll from code in VB .net. And furthermore, for my specific need, WHAT am I scrolling, lol.
    I don't know what you would be scrolling.....maybe you could set up a listbox and change the selected item property using a timer whose interval gets dynamically set based to the information acquired in the mouse move event. What ever it is though, you need to define the objects first, then figure out out to scroll it.
    kevin
    Process control doesn't give you good quality, it gives you consistent quality.
    Good quality comes from consistently doing the right things.

    Vague general questions have vague general answers.
    A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.

    ______________________________
    Last edited by kebo : Now. Reason: superfluous typo's

  7. #7

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    5

    Re: iPhone scrolling

    Hey kevin,
    Thanks again for the advice, I'll let you know if I ever figure it out. Someone's been telling me something about "repainting" the list, or "redrawing" it or something, not sure what that means, but I'll look into it.

    Thanks,
    Chad.

  8. #8
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    413

    Re: iPhone scrolling

    From my time working with scrolling and GDI, I found that the only way to have something scroll smothly is to use GDI fuctions with double buffering.

    Another optioin is to use a picture box and generate a graphic of you list. Then you can just move the graphic in your picture box for scrolling. I would acutal make my own control that was based on the picture box for adding click, drag.... support.
    Visual Studio .NET 2005/.NET Framework 2.0

  9. #9

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    5

    Re: iPhone scrolling

    Quote Originally Posted by PENNYSTOCK
    From my time working with scrolling and GDI, I found that the only way to have something scroll smothly is to use GDI fuctions with double buffering.

    Another optioin is to use a picture box and generate a graphic of you list. Then you can just move the graphic in your picture box for scrolling. I would acutal make my own control that was based on the picture box for adding click, drag.... support.
    That sounds great, I like the picture box idea...but how would I be able to know what the person clicks on, if it's not a list box, with items for each line. The picture box would only be a static moving graphic...correct??

    Chad

  10. #10
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    413

    Re: iPhone scrolling

    You would have to keep track of where your drew your text on your graphic, then when someone clicks on the image, you would determin from the click cordinance what was under the cursor and process that.
    Visual Studio .NET 2005/.NET Framework 2.0

  11. #11

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    5

    Re: iPhone scrolling

    Quote Originally Posted by PENNYSTOCK
    You would have to keep track of where your drew your text on your graphic, then when someone clicks on the image, you would determin from the click cordinance what was under the cursor and process that.
    Okay, I think im gonna go with a picturebox, and paint a list within the box, and detect the mouse movement, and move the painted object in the box as needed. How does that sound? Anything I need to know, before I go researching how to do this? I'm new to this whole "painting" aspect of GUI creation .

    Chad.

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