Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


preventing double application launch


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-02-2007, 09:55 AM
Knows the basics
 
Join Date: May 2007
Posts: 95
Default preventing double application launch

Hi,

Can 't find the way preventing a double application launch...
can you help me out...

Great forum guys, never get one like this, all my deep respects...

Put Claude Belgium
Reply With Quote
  #2 (permalink)  
Old 10-02-2007, 10:40 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 4,870
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The .Net CF does (suppose to) prevent more than single instance.
How do you get more than one instance?
Reply With Quote
  #3 (permalink)  
Old 10-02-2007, 11:09 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Ioannina, Greece
Posts: 355
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

@Erel
I think, he is talking about desktop.

@Put
You can check your Form Title, and if it exists then quit the app.
You can do that using my dzHWdesktop.dll (latest version) posted here Useful Library

Code:
Sub Globals
End Sub
 
Sub App_Start
  dzhw.New1

  If dzhw.GetWindowHandle("null", "Form Title") > 0 Then
    AppClose
  End If
  Form1.Show
End Sub
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #4 (permalink)  
Old 10-02-2007, 01:52 PM
Knows the basics
 
Join Date: May 2007
Posts: 95
Default

Hi,

Yes, did get 2 instance on Acer 300 WM5...
Noticed it when my gps-program counted every 2 seconds, I quit the program and get the underlying second same program that counts now every second, so... for some reason, the system did not prevent a second instance at same time.

dz,
did not find that in helpfile: dzhw.GetWindowHandle("null", "Form Title")

Made a little WF.exe in C (window find) that checks if my application already is open, so yes, bring it to front, and cancel the second launch.
My solution: Start this little exe with the shell function as first line in my application...

Put Claude Belgium

Last edited by Put Claude : 10-02-2007 at 02:58 PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dim variable c% as Double colin9876 Basic4ppc Wishlist 8 05-28-2008 01:26 PM
How to use double quotes in a text ? origami Questions & Help Needed 3 04-27-2008 06:58 AM
How to disable launch application at given time? jesb4ppc Questions & Help Needed 4 07-11-2007 04:48 PM
associating a hardware key with a program to launch it... Cableguy Questions & Help Needed 4 07-07-2007 07:07 PM
launch and close other applications dbo33 Basic4ppc Wishlist 4 06-02-2007 06:03 AM


All times are GMT. The time now is 10:07 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0