Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

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

Code Samples & Tips Share your recent discoveries and ideas with other users.

TakePicture - Using the internal camera from your application

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 01-31-2009, 05:34 AM
Basic4ppc Veteran
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 223
Send a message via MSN to tsteward
Default

Hello Jotha,
Please post English version of your code

Thanks
__________________
PC: Dual core 3.4ghz 2gb ram
PPC: I-mate Jasjam
Reply With Quote
  #12 (permalink)  
Old 05-08-2009, 05:53 PM
Junior Member
 
Join Date: Jul 2007
Posts: 37
Question Invalid Operation.

Hi Erel, Taximania, Agraham et. al.

I've been trying to make the TakePicture program to run, with no success.

If I use the "process.CloseMainWindows" I get an error with a lot of messages:

System.Diagnostics.Process.EnsureState()
in
System.Diagnostics.Process.get_HasExited()
in
System.Diagnostics.Process.EnsureState()
in
System.Diagnostics.Process.get_ExitCode()
in
Threading.Process.ExitEvent()
in
System.Diagnostics.Process.OnExited()
in
System.Diagnostics.Process.RaiseOnExited()
in
System.Diagnostics.Process.CompletionCallback()
at
TermWaiter.WaitForTerm()


So, I just tried to start anoher process (calc.exe) to chek it, with the same result.

If I use "process.Kill", it works 1 time, and then it says " the camera is in use", but camera doesn't appear on the Programs in execution.

Is it needed to use WM 6, or .net CF 3.5 to make it run, or what am I doing wrong?


I'm using an HTC P3600, with .Net CF 2.0 and WM 5.0

Could you help me with this?
Reply With Quote
  #13 (permalink)  
Old 05-09-2009, 09:18 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Are you saying that, using Process, you can't start and stop Calc.exe without an error on your device? Process should work fine on WM2003 and later and needs .NET 2.0.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #14 (permalink)  
Old 05-09-2009, 10:21 AM
Junior Member
 
Join Date: Jul 2007
Posts: 37
Question Threading Process error

Hi agraham,

Nice to hear from you again.

Yes, this is what happens. I've test also in a device with WM 6.1 and .Net CF 3.5 with same result.

Calculator starts ok, but only can stop it with "process.Kill", no way with "process.CloseMainWindow"

It's even worse with camera.exe, 'cause camera can only be used the first time.



This is the code:

'Basic threading.
' 8 may 2009.

Sub Globals
tick = 0
prog ="\windows\calc.exe"
End Sub

Sub App_Start
Form1.Show
process.New1
hardware.New1
timer1.Interval = 5000
End Sub

Sub Button1_Click
timer1.Enabled = True
process.Start(prog,"")
End Sub

Sub Timer1_Tick
tick = tick + 1
If tick = 1 Then 'Send Intro
hardware.KeyPress(13)
Else
timer1.Enabled = False
process.CloseMainWindow
tick = 0
End If
End Sub


Thank you for your time.
Reply With Quote
  #15 (permalink)  
Old 05-09-2009, 12:24 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Try the latest version 1.5 of the http://www.basic4ppc.com/forum/addit...-compiler.html that I have just posted. In an earlier change I tidied up (as I thought) after the Process object according to the Microsoft docs and it appears to have caused this problem due to different behaviour on the desktop and device. Longer explanation in the library thread post #46.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #16 (permalink)  
Old 05-09-2009, 05:25 PM
Junior Member
 
Join Date: Jul 2007
Posts: 37
Thumbs up Threading Process error. SOLVED.

Hi agraham,

After using version 1.5 of your library, it runs like a charm, with WM 5.0 and .Net CF 2.0 and also with WM 6.1 and CF 3.5.

Reading your post #46 on Threading library for optimising compiler subforum, it seems that once again, Microsoft don't tell the whole truth, or doesn´t write the right documentation.

Fortunaly, you are able to deal with it, and win the challenge.

Once again, thank you very much!

Reply With Quote
  #17 (permalink)  
Old 11-21-2009, 11:52 AM
Basic4ppc Veteran
 
Join Date: Jan 2009
Location: Bayern, Germany
Posts: 489
Awards Showcase
Beta Tester 
Total Awards: 1
Default @Jotha - BildFoto.zip

Hello Jotha

I found your Bild Foto App and would like to use it in my TRUIDbase App. Device = MDA Pro.
Question: do you have a Update on your BildFoto Program? Or are there still problems with the Program?
If you do have a functional Bild Foto Program, could I ask you to post the newest Version.
This would really be of great help. Thank you Jotha.

Best regards
William
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
CCD Camera Library dzt Additional Libraries 35 11-16-2011 09:36 PM
camera + barcodes Walter Forum Discussion 5 03-07-2009 08:20 AM
Problem with internal Qualcomm GPS-Chip schimanski Questions (Windows Mobile) 1 11-03-2008 04:36 PM
external or internal GPS? Georg Questions (Windows Mobile) 4 07-31-2008 05:56 PM
CCD Camera Library/DLL? willisgt Questions (Windows Mobile) 2 11-01-2007 08:09 PM


All times are GMT. The time now is 05:22 AM.


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