Results 1 to 4 of 4

Thread: Simulate Mobile Preview

  1. #1

    Thread Starter
    Fanatic Member clarkgriswald's Avatar
    Join Date
    Feb 2000
    Location
    USA
    Posts
    769

    Simulate Mobile Preview

    I have an application in which I would like to show the user approximately what a web page that they created might look like on a particular mobile device. For example, the iPhone5 has a 3" x 2.5" viewing area and I want to display a web page in a windows form to simulate what their page may look like on that device. For starters, I am creating a windows form that is the same size as the mobile device's viewing area. Within the form is a docked-full web browser control. I load their web page into the web browser control, but I want to simulate what the page would look like on the device, taking into account the target device's resolution. Any ideas on how to accomplish this?

  2. #2
    Addicted Member
    Join Date
    Dec 2011
    Posts
    194

    Re: Simulate Mobile Preview

    As far as i know each site detect the type of device and the screen resolution then send a css version for the requested page that fit properly, so it is not enough to just set the size of the web browser control.
    On Error GoTo Hell

  3. #3

    Thread Starter
    Fanatic Member clarkgriswald's Avatar
    Join Date
    Feb 2000
    Location
    USA
    Posts
    769

    Re: Simulate Mobile Preview

    Quote Originally Posted by Absolute_Zero View Post
    As far as i know each site detect the type of device and the screen resolution then send a css version for the requested page that fit properly, so it is not enough to just set the size of the web browser control.
    Right, that's precisely the problem I'm trying to solve if possible; the reason for the post.

  4. #4

    Re: Simulate Mobile Preview

    The site typically does one thing (if at all): Determine if the user is mobile and (potentially) re-route them to the mobile site.

    Newer websites send ONE CSS file that contains a MEDIA query that adjusts elements and content based on a few parameters that the media query allows for. If you want to emulate such a thing, just merely resize your browser window and watch the media query take effect.

    Slightly older websites will contain a CSS reference to a "mobile" style-sheet. I can't even remember how it does that, though...I think the type is like...handheld or something.

Tags for this Thread

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