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
S

sushilange

@sushilange
About
Posts
6
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Since weeks your whole Articles section is damaged and can't be used
    S sushilange

    Great! Thanks! At the moment everything is working again :-) By the way: It was not my internet connection, because I have 16 Mbit/s down and 1 Mbit/s up, and this also happens at work ( 6 MBit/s). So it was the peak time and/or the big categories (like c#). Regards, Sascha

    Site Bugs / Suggestions com help

  • Since weeks your whole Articles section is damaged and can't be used
    S sushilange

    Hi, I'm wondering why noone already fixed this big issue which everyone has: None of your links like http://www.codeproject.com/KB/cs/[^] work. So all KB-links are not available but used allover your whole website. Regards, Sascha

    Site Bugs / Suggestions com help

  • How to repaint the whole screen?
    S sushilange

    I want to repaint/refresh Windows Mobile! And not my own application, because my own application isn't shown on the screen. If I draw directly on the screen above EVERYTHING, I want to delete this after closing my app. So I have to inform Windows Mobile that it has to repaint EVERTHING displayed on the screen.

    Mobile question graphics tutorial

  • How to repaint the whole screen?
    S sushilange

    Thanks, but it doesn't work, too :-(

    IntPtr deviceContext = GetDC(IntPtr.Zero);

            Rectangle rectangle = Screen.PrimaryScreen.Bounds;
            using (Bitmap capture = new Bitmap(rectangle.Width, rectangle.Height))
            //Get screen context
            using (Graphics deviceGraphics = Graphics.FromHdc(deviceContext))
            //Get graphics from bitmap
            using (Graphics captureGraphics = Graphics.FromImage(capture))
            {
                // Blit the image data
                BitBlt(captureGraphics.GetHdc(), 0, 0,
                    rectangle.Width, rectangle.Height, deviceGraphics.GetHdc(),
                    rectangle.Left, rectangle.Top, SRCCOPY);
                          
                
                deviceGraphics.DrawString("Hello", Font, new SolidBrush(Color.Black), 10, 10);                
            }
            // Doesn't work: InvalidateRect(deviceContext, IntPtr.Zero, true);
            //Doesn't work: RedrawWindow(deviceContext, IntPtr.Zero, IntPtr.Zero, RDW\_ERASE | RDW\_INTERNALPAINT | RDW\_UPDATENOW | RDW\_INVALIDATE);
            // Doesn't work: SendMessage(deviceContext, WM\_PAINT, 0, 0);
    
            // I tried RedrawWindow with all possibile combinations of all parameters (RDW\_XXXX)!
            // I also tried to add directly IntPtr.Zero as Handle parameter
            // In all cases the text "Hello" is still drawn until I click on the start button
            // I run the code on WM 6.1.4 Professional (Emulator)
    
    Mobile question graphics tutorial

  • How to repaint the whole screen?
    S sushilange

    I want to paint directly on the screen. No Form, no Control. A hidden application which paints directly on the screen. For example a text in the top bar where the start-button is. This works fine and is not the problem. The problem is, that i'm not able to delete the things I drawed on the screen. They will dissaper when Windows Mobile force the controls, forms, etc. to be repaint. For example if I draw text on the top bar the text still appears until I open the start menu, because then the bar will be repaint. After closing my hidden application I want to delete the text, which I drawed. So I have to force the whole desktop to repaint (because the text on top bar was only an example). But I tried RedrawWindow (with IntPtr.Zero) and also SendMessage (with WM_PAINT to IntPtr.Zero). This force Windows Mobile to repaint everything, but it doesnt work :(

    Mobile question graphics tutorial

  • How to repaint the whole screen?
    S sushilange

    Hi, with:

    IntPtr deviceContext = GetDC(IntPtr.Zero);
    Graphics deviceGraphics = Graphics.FromHdc(deviceContext)

    it is possible to draw on the screen. But how can I delete the drawn objects from screen? It still appears until something changed on the screen so Windows Mobile repaint that area. I tried RedrawWindow() and also SendMessage(with WM_PAINT) to repaint the whole screen, but nothing works :(

    Mobile question graphics tutorial
  • Login

  • Don't have an account? Register

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