Click here to Skip to main content
15,897,273 members
Home / Discussions / C#
   

C#

 
GeneralTo overcome the load screen flashes with user control and images and controls Pin
Lương Tuấn Anh29-May-13 18:30
Lương Tuấn Anh29-May-13 18:30 
AnswerRe: To overcome the load screen flashes with user control and images and controls Pin
Eddy Vluggen29-May-13 22:33
professionalEddy Vluggen29-May-13 22:33 
GeneralRe: To overcome the load screen flashes with user control and images and controls Pin
Lương Tuấn Anh30-May-13 4:56
Lương Tuấn Anh30-May-13 4:56 
GeneralRe: To overcome the load screen flashes with user control and images and controls Pin
Eddy Vluggen30-May-13 4:58
professionalEddy Vluggen30-May-13 4:58 
GeneralRe: To overcome the load screen flashes with user control and images and controls Pin
Lương Tuấn Anh30-May-13 8:24
Lương Tuấn Anh30-May-13 8:24 
GeneralRe: To overcome the load screen flashes with user control and images and controls Pin
Eddy Vluggen30-May-13 9:05
professionalEddy Vluggen30-May-13 9:05 
GeneralRe: To overcome the load screen flashes with user control and images and controls Pin
Lương Tuấn Anh30-May-13 16:00
Lương Tuấn Anh30-May-13 16:00 
GeneralRe: To overcome the load screen flashes with user control and images and controls Pin
Eddy Vluggen31-May-13 6:18
professionalEddy Vluggen31-May-13 6:18 
Lương Tuấn Anh wrote:
you can said more details or help me code in this project.
That's what I'm trying. Let's try it another way; copy the method below (comes from here[^])
C#
public static class SuspendUpdate
{
    private const int WM_SETREDRAW = 0x000B;

    public static void Suspend(Control control)
    {
        Message msgSuspendUpdate = Message.Create(control.Handle, WM_SETREDRAW, IntPtr.Zero,
            IntPtr.Zero);

        NativeWindow window = NativeWindow.FromHandle(control.Handle);
        window.DefWndProc(ref msgSuspendUpdate);
    }

    public static void Resume(Control control)
    {
        // Create a C "true" boolean as an IntPtr
        IntPtr wparam = new IntPtr(1);
        Message msgResumeUpdate = Message.Create(control.Handle, WM_SETREDRAW, wparam,
            IntPtr.Zero);

        NativeWindow window = NativeWindow.FromHandle(control.Handle);
        window.DefWndProc(ref msgResumeUpdate);

        control.Invalidate();
    }
}

Call it in the InitializeComponents, or whereever you put the image in the control.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

GeneralRe: To overcome the load screen flashes with user control and images and controls Pin
Lương Tuấn Anh31-May-13 16:54
Lương Tuấn Anh31-May-13 16:54 
GeneralRe: To overcome the load screen flashes with user control and images and controls Pin
Eddy Vluggen31-May-13 21:39
professionalEddy Vluggen31-May-13 21:39 
GeneralRe: To overcome the load screen flashes with user control and images and controls Pin
Lương Tuấn Anh1-Jun-13 7:41
Lương Tuấn Anh1-Jun-13 7:41 
GeneralRe: To overcome the load screen flashes with user control and images and controls Pin
Eddy Vluggen1-Jun-13 11:00
professionalEddy Vluggen1-Jun-13 11:00 
GeneralRe: To overcome the load screen flashes with user control and images and controls Pin
Lương Tuấn Anh1-Jun-13 17:51
Lương Tuấn Anh1-Jun-13 17:51 
GeneralRe: To overcome the load screen flashes with user control and images and controls Pin
Lương Tuấn Anh1-Jun-13 18:43
Lương Tuấn Anh1-Jun-13 18:43 
GeneralRe: To overcome the load screen flashes with user control and images and controls Pin
Eddy Vluggen2-Jun-13 0:40
professionalEddy Vluggen2-Jun-13 0:40 
QuestionC# access to a directory path Pin
jazzgirl29-May-13 17:09
jazzgirl29-May-13 17:09 
AnswerRe: C# access to a directory path Pin
Amol_B29-May-13 18:31
professionalAmol_B29-May-13 18:31 
AnswerRe: C# access to a directory path Pin
Anna King30-May-13 3:09
professionalAnna King30-May-13 3:09 
AnswerRe: C# access to a directory path Pin
jazzgirl30-May-13 17:12
jazzgirl30-May-13 17:12 
Questionerror in c# Pin
User349029-May-13 3:03
User349029-May-13 3:03 
AnswerRe: error in c# Pin
Eddy Vluggen29-May-13 3:16
professionalEddy Vluggen29-May-13 3:16 
GeneralRe: error in c# Pin
User349029-May-13 3:36
User349029-May-13 3:36 
QuestionRe: error in c# Pin
Eddy Vluggen29-May-13 3:41
professionalEddy Vluggen29-May-13 3:41 
AnswerRe: error in c# Pin
User349029-May-13 3:48
User349029-May-13 3:48 
GeneralRe: error in c# Pin
Dave Kreskowiak29-May-13 4:13
mveDave Kreskowiak29-May-13 4:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.