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
  1. Home
  2. General Programming
  3. Visual Basic
  4. OutOfMemoryException

OutOfMemoryException

Scheduled Pinned Locked Moved Visual Basic
helpgraphicsdebugginglearning
5 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.
  • G Offline
    G Offline
    gthompson2005
    wrote on last edited by
    #1

    I'm getting the following error in my app. OutOfMemoryException' occurred in system.drawing.dll On my Main window, I have a Listview, that has a images for the checkboxes, a outlook style bar down the side, and a picturebox that is displaying a animated gif file. When I minimize my app to the System Tray (I also have a Notification Icon) Me.ShowInTaskbar = False When I go to pull it back up, I get this error, from the debugger. Now if I run the program outside of the debugger,after minimizing and restoring the form my images aren't where my checkboxes were. Now something else I tried, was just having my program minimize to the taskbar. There was no problem at all. My images on the listview are in place of the checkboxes. I know of course it has something to do with the drawing related stuff, but I'd like to avoid this error, and keep my images on the listview. Dave you have any suggestions.. Thanks in advance. Gerry

    D 1 Reply Last reply
    0
    • G gthompson2005

      I'm getting the following error in my app. OutOfMemoryException' occurred in system.drawing.dll On my Main window, I have a Listview, that has a images for the checkboxes, a outlook style bar down the side, and a picturebox that is displaying a animated gif file. When I minimize my app to the System Tray (I also have a Notification Icon) Me.ShowInTaskbar = False When I go to pull it back up, I get this error, from the debugger. Now if I run the program outside of the debugger,after minimizing and restoring the form my images aren't where my checkboxes were. Now something else I tried, was just having my program minimize to the taskbar. There was no problem at all. My images on the listview are in place of the checkboxes. I know of course it has something to do with the drawing related stuff, but I'd like to avoid this error, and keep my images on the listview. Dave you have any suggestions.. Thanks in advance. Gerry

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      WIthout seeing any drawing code, it's hard to tell you what's going on. But, if your drawing anything yourself, make SURE your .Dispose() any Graphics objects and release any handles you're getting from Win32 API, using the Win32 API. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      G 1 Reply Last reply
      0
      • D Dave Kreskowiak

        WIthout seeing any drawing code, it's hard to tell you what's going on. But, if your drawing anything yourself, make SURE your .Dispose() any Graphics objects and release any handles you're getting from Win32 API, using the Win32 API. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        G Offline
        G Offline
        gthompson2005
        wrote on last edited by
        #3

        The Thing is I'm not doing any drawing stuff my self. I've just got a picture box, a listview with images for the checkboxes, and a outlook side bar. I did some more playing around with it last night, When I minimize my form, i have 2 options for the user, to have it minimize to the system tray, or minimize to taskbar. If I have my progam minimize to the system tray, then restore the form, Me.ShowInTaskbar = True Then My images on my listview are no longer there, and all I've got is checkboxes. Minimizing to taskbar, does everything just fine. I'm not understanding what I'm doing wrong Thanks again for your help

        D 1 Reply Last reply
        0
        • G gthompson2005

          The Thing is I'm not doing any drawing stuff my self. I've just got a picture box, a listview with images for the checkboxes, and a outlook side bar. I did some more playing around with it last night, When I minimize my form, i have 2 options for the user, to have it minimize to the system tray, or minimize to taskbar. If I have my progam minimize to the system tray, then restore the form, Me.ShowInTaskbar = True Then My images on my listview are no longer there, and all I've got is checkboxes. Minimizing to taskbar, does everything just fine. I'm not understanding what I'm doing wrong Thanks again for your help

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Are your images store in an ImageList? Try to avoid it if you can. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          G 1 Reply Last reply
          0
          • D Dave Kreskowiak

            Are your images store in an ImageList? Try to avoid it if you can. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

            G Offline
            G Offline
            gthompson2005
            wrote on last edited by
            #5

            That's how I have my images, in a image list. I can avoid it if I can set the images at runtime, for when it's checked or not checked. You don't have a brief example on how to just set the image for a item in a listview - I have it on details view and checkboxes enabled. Thanks for your help

            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