Results 1 to 4 of 4

Thread: Form Enabling/Disabling

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2004
    Location
    Seoul
    Posts
    7

    Resolved Form Enabling/Disabling

    Hi all,

    I might be thinking of another programming language, but isn't there a way to set a Windows form to be just clickable/unclickable instead of setting Enabled = False?

    When I do this, while running a thread that will set Enabled = True when it's finished, my TreeView turns grey, and can flash sometimes when running a couple of processes. For asthetics, I've been asked to try to prevent the grey from showing up.

    So, to re-iterate, I am wondering if a form can be unclickable while the thread is running, but without changing the Enabled property. I've tried SuspendLayout, but that didn't work.

    Thanks for any help,

    ... Mike. ^_^


    EDIT: Put up the green checkmark.
    Last edited by MikeKraken; Oct 17th, 2004 at 11:30 PM.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710
    Welcome to the Forums.

    In vb6 you could use the LockWindowUpdate API to resolve such
    issues. Maybe see if you could use it in .NET? I'm still
    learning .NET so maybe there is a .NET way too?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2004
    Location
    Seoul
    Posts
    7
    Unfortunately, that method doesn't seem to be supported in VB.NET 2003... I did some more checking around and I can't seem to find anything that would work besides enabling/disabling.

    I'll continue my search, but if anybody finds something, your help would be greatly appreciated.

    ... Mike. ^_^

  4. #4

    Thread Starter
    New Member
    Join Date
    Oct 2004
    Location
    Seoul
    Posts
    7

    Thumbs up

    Actually, you know what? Just by chance, I came across the EnableVisualStyles method and decided to play around with it... so now when the TreeView is disabled, the text is greyed and it looks pretty darned good. I guess my problem was solved in a different way than I was expecting.

    Thanks for your help, Rob!

    ... Mike. ^_^

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