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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. display image larger than the screen size

display image larger than the screen size

Scheduled Pinned Locked Moved Visual Basic
graphicshtmlcomquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TheMrProgrammer
    wrote on last edited by
    #1

    i am using the drawimageunscaled from drawing a bitmap before showing the image i am setting the height and width of form = that of bitmap

    height = b.height
    width = b.width

    but if the image is large, say, 3 megapixels then the size of form is limited to resolution of monitor what should i do?

    TheMrProgrammer http://www.icbse.com/2009/funny-exam-answers-school-students http://download.cnet.com/TheCalcMan/3000-2094\_4-10958266.html

    L 1 Reply Last reply
    0
    • T TheMrProgrammer

      i am using the drawimageunscaled from drawing a bitmap before showing the image i am setting the height and width of form = that of bitmap

      height = b.height
      width = b.width

      but if the image is large, say, 3 megapixels then the size of form is limited to resolution of monitor what should i do?

      TheMrProgrammer http://www.icbse.com/2009/funny-exam-answers-school-students http://download.cnet.com/TheCalcMan/3000-2094\_4-10958266.html

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, if your system has only one screen, all forms are size-limited to the size of the screen. you can view (part of) a larger image, and optionally provide panning; one way would be by using a scrollable control. I could do that with a Panel; you might look at ScrollableControl too. AFAIK a PictureBox is too stupid a control to provide this functionality. :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


      T 1 Reply Last reply
      0
      • L Luc Pattyn

        Hi, if your system has only one screen, all forms are size-limited to the size of the screen. you can view (part of) a larger image, and optionally provide panning; one way would be by using a scrollable control. I could do that with a Panel; you might look at ScrollableControl too. AFAIK a PictureBox is too stupid a control to provide this functionality. :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


        T Offline
        T Offline
        TheMrProgrammer
        wrote on last edited by
        #3

        hey thanks! but i have one more doubt. suppose i have a bitmap : rectangle(0,0,10000,10000) and i want to have a another bitmap having (300,300,300,300) of the above bitmap, how can i do that.

        TheMrProgrammer http://www.icbse.com/2009/funny-exam-answers-school-students http://download.cnet.com/TheCalcMan/3000-2094\_4-10958266.html

        L 1 Reply Last reply
        0
        • T TheMrProgrammer

          hey thanks! but i have one more doubt. suppose i have a bitmap : rectangle(0,0,10000,10000) and i want to have a another bitmap having (300,300,300,300) of the above bitmap, how can i do that.

          TheMrProgrammer http://www.icbse.com/2009/funny-exam-answers-school-students http://download.cnet.com/TheCalcMan/3000-2094\_4-10958266.html

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          Not sure what you want exactly, however there are 4 overloads to DrawImageUnscaled, and 30 to DrawImage; there is bound to be one that can do what you want, remember you are allowed to give fractional and negative locations. BTW: when drawing onto a Bitmap, use Graphics.FromImage(). :)

          Luc Pattyn [Forum Guidelines] [My Articles]


          The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups