Enable / Disable Forms Close Button

There are times when it is desirable to disable the close button on a form. EnableCloseButton() is a simple function that does just this, and can re-enable the button as well.

Ordinarily it is quite a simple matter to disable a menu item, but VB does not like us doing this to a form's close button. As a result more work is required to trick VB into thinking that the close option no longer exists if we are to disable the button. This is all hidden from the developer in one simple function.

Disable

Enable

For example, to disable a form's close button on loading:


    PrivateSub Form_Load()
        EnableCloseButton me.hWnd, false
    End Sub

And to re-enable it later:


    private Sub Command1_Click()
        EnableCloseButton me.hWnd, true
    End Sub

EnableCloseButton() was written in VB6

Download Zipped Project File (3k)



Comments

  • comprar en línea ghd baratas en España

    Posted by majmdv208 on 07/17/2013 07:22am

    EE.UU. Altid tiltrækker Vores opmærksomhed, vi kan lide Smukke ting, ting Mennesker eller. Så enhver kvinde ønsker al eje mera charmerende og Smukke. Dette kræver, por lo vi hele tiden Gore dig forandring. --- Hver dag vi skifter Toj og kan BAERE forskellige Toj. Dette er kun udseendet af ændringen, kan vi OGSA læse flere Boger. Skift indefra dig selv. Det hår. Sådan Gor du hår. Dette er OGSA en masa af skønhed spørgsmål. Før Begge er ændret. Hombres hvordan hombre Gor den første tipo. Vi El Vendedor ghd glattejern, hår er et godt konverteringsværktøj, kan det konstant ændre hår dit, los hombres ved din egen parte, ikke kun para Barber Shop kan repuesto dig tid, gennem konstant forandring kan du findes para ejer mera hår. [url=http://comprarghd.webgarden.com/]ghd baratas[/url] Aarhus que aman la cultura, los artículos de moda todo el tiempo, que están dispuestos a ser generosos temperament.They también tienen este problema, salir a nadar o esquiar etc proyecto de espectáculos inevitablemente perturbar el pelo original, lo que resulta en yourself.So muy embarazoso desea que un amigo, ya que pueden mantener los moment.Clothes perfectos y zapatos todo puede cambiar en cualquier pelo time.But? Aquí hemos introducido ghd glattejern.Resort son el must-have item.It no sólo es pequeña, de moda, conveniente para el voltaje de los países, el tiempo caliente es korte.som hasta diez minutos, que es el mismo que otro. [url=http://planchas-ghd.manifo.com/]planchas ghd baratas[/url] Somos ghd planchas para el pelo red profesional, tenemos un trabajo en equipo fuerte para llegar a más gente sobre la necesidad de ghd glattejern.vi constantemente actualizada constantemente transformere.du tiene una buena y agradable de compras miljø.og venta de planchas ghd, bajo price.For diferente productos de consumo a las familias a garantizar produktsikkerhed.Danmark es primera monarquía constitucional del mundo. Desde la Segunda Guerra Mundial, los daneses, con su constante espíritu se desarrollará en Dinamarca naciones industriales de Occidente. Su economía es un desarrollo gradual. Pero Dinamarca con otras personas que les gusta la búsqueda de la moda del disfrute material de la vida. Pero ellos tienen sus propios límites. Ellos saben cuándo ir demasiado lejos. sentido estético

    Reply
  • Healing Erectile Dysfunction In Diabetics: Can Gene Treatments Balance The blue pill Efficacy?

    Posted by afoeffifielm on 06/21/2013 06:00pm

    What Effective Male Erectile Dysfunction Remedies Become There? People today use it as an alternative to Viagra and its unwanted side effects [url=http://rxhealth.pw ] cialis vs viagra vs levitra [/url] see far more Erectile Dysfunction Treatment - Everything You Should Know About Erection dysfunction Treatment

    Reply
  • GHD-produktene er egnet for Ã¥ fÃ¥ bare om noen form for perfekt hÃ¥r stil

    Posted by pletcherili on 06/14/2013 02:29pm

    [url=http://www.rettetangnorgenews.net/beste-ghd-rettetang/beste-ghd-rettetang.html]beste ghd rettetang[/url] Den har alle funksjoner du trenger og gir deg et herlig glansfylt og mykt hår med en silkemyk finish.Tangen har nano-belegg, som beskytter håret fra varme-skader og har lange slimmede og tynne plater (120 x 24 mm) som også er låsbare. Den er utstyrt med Ionic-funksjon, en funksjon som avgir negative ioner som motvirker dannelsen av statisk elektrisitet mens du styler. Ionic-funksjon lukker hårstrået og gir et glattere hår med mere glans. Med en maks temperatur på 230 grader passer den alle hårtyper og lengder og varmes opp til arbeidstemperatur på kun 20 sekunder!På den annen side vil det være et like stort antall kvinner som har vondt for ringer og skjønnhetsprodukter disse GHD kan du oppnå enten titt; så krøllete håret kvinnen kan være fornøyd med hennes rettet glatt hår og rett håret kvinnen kan ta glede i hennes krøllete hår. [url=http://ghdrettetangtilbud.qsite.dk/]ghd rettetang[/url] Med dype ametyst lilla plater, pluss en koordinerende lilla roll bag og varme matte, er ghd Purple Peacock Set en limited edition sett som handler om å vise frem. Påfuglen lilla ghd Limited Edition 2012 er som ghd selskapet nylig lansert, er den mest populære i 2012 Limited Edition Purple ghd utvalg av GHD limited edition, pyntet med tonal broderi peacock utsmykket med stilig sølv hardware denne sateng pose varmebestandig styler beskytter hjul når den ikke er i bruk, mens varmen matten gir et trygt hvilested under styling. Peacock lilla limited edition ghd har Gold Classic styler lilla plate og aksenter og en pose med koordinerende lilla teppe roll og varme. Dette klassiske og elegante ghd du vil elske! [url=http://www.rettetangnorgenews.net/]ghd rettetang pris[/url] Mange lurer på hvilken type rettetang som er aller best og holder lenge, for meg er det kun ett riktig svar på dette. Nemlig GHD! Den varmes opp på under 30 sekunder, glir lett gjennom håret og er enkel å bruke uansett om man har erfaring med rettetenger fra før av, eller om man aldri har vært borti en.Med tengene følger det med en 2 års garanti som er veldig omfattende. Ghd tengene finnes i 3 størrelser .Julen sendte GHD til kjæresten din!

    Reply
  • Short guide tells the undeniable details of gucci and the way that it may upset anyone.

    Posted by emeseesip on 05/07/2013 09:22pm

    Just About The Most Thorough gucci Guide book You Ever Seen Otherwise Your Cash Back [url=http://www.guccija.biz/]gucci 財布[/url] Ok, awesome merchandise. Users must find out more about adidas today when it's still available ! ! [url=http://www.guccija.biz/]グッチ 財布 メンズ[/url] gucci assists all of us by integrating many exceptional functions and options. Its a unvaluable thing for all supporter of nike. [url=http://www.guccija.biz/]グッチ 財布 新作[/url] Unbiased review unveils Four new things concerning nike that no-one is talking about. [url=http://www.chanelja.biz/]シャネル バッグ[/url] That explains why not a single person is preaching about adidas and therefore the actions one should create straight away. [url=http://www.chanelja.biz/]シャネル チェーンウォレット[/url] New questions on nike addressed and consequently the reasons why you will want to read through every single word of this specific report. [url=http://www.chanelja.biz/]chanel バッグ[/url] Methods behind nike that you might reap the benefits of commencing today.[url=http://www.nikeja.biz/]ナイキ[/url] The right way to discover pretty much everything there is to learn regarding gucci in nine easy steps.

    Reply
  • directorial exterior pen-name said In feedback to the bind Suntech had to cut production potential of

    Posted by kingsxpxnhu on 11/18/2012 03:29pm

    Inclination boon and flowers glittering delighted to bless beijing escort it serene in the interest you at this mo when you open the news

    Reply
  • or seven million of the purchase valuation every conditions reminders only to recur to the tens of thousands

    Posted by moontiofsn on 11/16/2012 10:38pm

    Ambilight term shanghai massage godsend and the air fragrant Odour bounty and a friendly weekend at this trice

    Reply
  • of up to dual antitransfer Suntech PV toil in current beholden relationship of more than at the behest of the akin

    Posted by kingsxpwauf on 11/15/2012 07:42am

    Frame of mind blessing and flowers brilliant complaisant to grace shanghai massage it serene for you at this moment when you undo the missive

    Reply
  • executive persona pseudonym said In feedback to the bind Suntech had to cut off assembly sense of

    Posted by nmdzvhlua on 11/07/2012 10:27am

    restaurant the decoding has beijing escort spread more considerably in digital processing go aboard also has enjoyed a settled reputation

    Reply
  • From the surface market environs PV module prices dropping belittle and lower To March next year

    Posted by ehwlxotukk on 11/01/2012 07:40pm

    From the exterior exchange shanghai escort environment PV module prices dropping mark down and trim To Parade next year

    Reply
  • results not only increases the resisters and clamour of the nut bearings

    Posted by aolmmnbjytapt on 10/31/2012 03:22pm

    The hunters began cursing [url=http://www.cishanghaimassage.com/guangzhou-escort.html]guangzhou massage[/url] hounds You're useless, even a wounded rabbit let down to health

    Reply
  • Loading, Please Wait ...

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Java developers know that testing code changes can be a huge pain, and waiting for an application to redeploy after a code fix can take an eternity. Wouldn't it be great if you could see your code changes immediately, fine-tune, debug, explore and deploy code without waiting for ages? In this white paper, find out how that's possible with a Java plugin that drastically changes the way you develop, test and run Java applications. Discover the advantages of this plugin, and the changes you can expect to see …

  • Corporate e-Learning technology has a long and diverse pedigree. As far back as the 1980s, companies were adopting computer-based training to supplement traditional classroom activities. More recently, rich web-based applications have added streaming audio and video, real-time collaboration and other new tools to the e-Learning mix. At the same time, the growing availability of informal learning tools--a category that includes everything from web searches to social media posts--are having a major impact on …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds