View Single Post
  #8 (permalink)  
Old 12-04-2008, 03:43 PM
JOTHA JOTHA is offline
Basic4ppc Veteran
 
Join Date: Jul 2008
Location: Schwäbisch Gmünd
Posts: 353
Default

Hi taximania,

thank you for your version. It works good!

I made a little workaround with yours an Erels code.

- Now you can change the location where the pictures are stored. (green)
- Now you can press the hardbutton to take a photo by yourself.
- It is made as a module, so you can implement it better to your apps.
- ... and some other little changes ...

The shell is in german, if someone needs it in english, please post here.

I hope it is helpful for someone.

Have fun!

Code:
'------------------------------------------------------
'
Modul BildAufnahme
'
Build 0066
'
------------------------------------------------------
'
ben�tigt Hardware.dll
'
ben�tigt HardwareDesktop.dll
'
ben�tigt Threading.dll
'
ben�tigt Objekt "hardware" aus Hardware
'
ben�tigt Objekt "process" aus Process
'
------------------------------------------------------
Sub Globals
    tick = 
0
End Sub
'------------------------------------------------------
Sub BildAufnahme_Show
    process.New1
    hardware.New1
    Timer1.Interval = 
5000
End Sub
'------------------------------------------------------
Sub Button1_Click
    PanelEinstellungen.Visible = 
False
    
If cPPC Then
    i = 
Msgbox ("Wollen Sie jetzt die Kamera starten?"" Hinweis", cMsgboxYesNo, cMsgboxQuestion)
    
If i = cYes Then
    Panel1.Visible = 
True
    Button1.Visible = 
False
    Button3.Visible = 
True
    
End If
    
Else
    
Msgbox ("Bilder aufnehmen funktioniert nur auf dem Pocket-PC mit eingebauter Kamera.""Hinweis", cMsgboxOK, cMsgboxExclamation)
    
End If 
End Sub
'------------------------------------------------------
Sub AfterPicture
    ArrayList1.Clear
    FileSearch(ArrayList1,<font color=
"Lime">""&Speicherort.Text&"","*.jpg")</font>
    
file = ArrayList1.Item (ArrayList1.Count-1)
    Label1.Text = 
file
    Image1.Image = 
file
    WaitCursor (
False)
End Sub
'------------------------------------------------------
Sub Button2_Click
    WaitCursor (
True)
'    Panel3.Visible = True
    AfterPicture
    Button2.Visible = 
False
    Label7.Visible = 
True
End Sub
'------------------------------------------------------
Sub Button3_Click 'Button "Weiter" nach der Anleitung
    WaitCursor (True)
    Timer1.Enabled = 
True
    Timer1_Tick
    Shell (
"Camera.exe""")
    Panel1.Visible = 
False
    Button1.Visible = 
False
    Button2.Visible = 
True
    WaitCursor (
False)
End Sub
'------------------------------------------------------
Sub Timer1_Tick
    tick = tick + 
1
    
If tick = 1 Then 'Panel2 "Kamera wird gestartet" zeigen
    Panel2.Visible = True
    
Else
    Timer1.Enabled = 
False
    Panel2.Visible = 
False
    tick = 
0
    
End If
End Sub
'------------------------------------------------------
'
Einstellungen des Speicherorts f�r Bilder
'
------------------------------------------------------
Sub ButtonEinstellungen_Click
    ButtonEinstellungen.Visible = 
False
    PanelEinstellungen.Visible = 
True
End Sub

Sub ButtonEinstellungenSchliessen_Click
    ButtonEinstellungen.Visible = 
True
    PanelEinstellungen.Visible = 
False
End Sub
'------------------------------------------------------
'
Bild im Verzeichnis l�schen
'
------------------------------------------------------
Sub ButtonLoeschen_Click
    ArrayList1.Clear
End Sub
Attached Files
File Type: zip B4P - BildFoto.zip (16.0 KB, 152 views)
__________________
JOTHA | Greetz from the Schwabenländle.
Pocket-PC: HTC HD2 (Dual-Boot WindowsMobile 6.51 + Android 2.2 Froyo)
Reply With Quote