Article View: be.comp.programming
Article #14887Re: Welke codes in VB6 om te voorkomen dat het programma tegelijkertijd uitgevoerd wordt?
From: Sjoerd Langkemper
Date: Fri, 05 Jan 2001 20:16
Date: Fri, 05 Jan 2001 20:16
22 lines
1757 bytes
1757 bytes
"Verhaeghe Pieter" <verhaeghe.pieter@skynet.be> schreef:
> Welke codes in Visual Basic 6.0 moet ik gebruiken, zodat mijn programma
niet
> twee maal open kan staan. Wanneer het programma twee maal open staat,
komt
> er een foutmelding voor: de database is reeds geopend.
If FindWindow(vbNullString, "ProgXYZ") = 0& Then
Debug.Print "ProgXYZ is not running"
End If
-------Of--------------
If GetModuleUsage(GetModuleHandle("notepad.exe")) Then
MsgBox "Windows Notepad is already running!", 56
End
End If
-------------------------
Sjoerd
Technical Details
Message-ID:
<MYp56.440646$%C1.5441625@Flipper>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.direct.ca!look.ca!cyclone-sjo1.usenetserver.com!news-out.usenetserver.com!amsnews01.chello.com!Flipper.POSTED!not-for-mailReferences:
<9351an$f7n$1@news1.skynet.be>Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit X-Google-Thread: 107324,d0015270be29ee92 X-Google-Attributes: gid107324,public X-Google-Thread: fcea4,d0015270be29ee92 X-Google-Attributes: gidfcea4,public X-Google-ArrivalTime: 2001-01-05 12:18:06 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.direct.ca!look.ca!cyclone-sjo1.usenetserver.com!news-out.usenetserver.com!amsnews01.chello.com!Flipper.POSTED!not-for-mail From: "Sjoerd Langkemper" <s.langkemper@chello.nl> Newsgroups: be.comp.programming,nl.comp.programmeren References: <9351an$f7n$1@news1.skynet.be> Subject: Re: Welke codes in VB6 om te voorkomen dat het programma tegelijkertijd uitgevoerd wordt? Lines: 25 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: <MYp56.440646$%C1.5441625@Flipper> Date: Fri, 05 Jan 2001 20:16:44 GMT NNTP-Posting-Host: 213.46.29.227 X-Complaints-To: abuse@chello.nl X-Trace: Flipper 978725804 213.46.29.227 (Fri, 05 Jan 2001 21:16:44 MET) NNTP-Posting-Date: Fri, 05 Jan 2001 21:16:44 MET Organization: Chello Broadband