Download the free trial version
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

preventing double application launch

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-02-2007, 10: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, 11:40 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 12,926
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, 12:09 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Ioannina, Greece
Posts: 356
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 http://www.basic4ppc.com/forum/additional-libraries/384-useful-library.html

Code:
<font face="Courier New"><font color="#0000ff">Sub </font></font>Globals
<font color=
"#0000ff">End Sub
</font><font color=
"#0000ff"
Sub </font>App_Start
  dzhw.New1

<font color=
"#0000ff">  If</font> dzhw.GetWindowHandle(<font color="#800000">"null"</font>, <font color="#800000">"Form Title"</font>) > <font color="#800080">0</font> <font color="#0000ff">Then
</font><font color=
"#0000ff">    AppClose
</font><font color=
"#0000ff">  End</font> <font color="#0000ff">If
</font>  Form1.Show
<font color=
"#0000ff">End Sub
</font>
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #4 (permalink)  
Old 10-02-2007, 02: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 03: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 Off
Pingbacks are Off
Refbacks are On

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


All times are GMT. The time now is 03:09 PM.


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