IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

VBA Discussion :

[VBA]possible ou pas ? creer une image jpg a partir 7 jpg


Sujet :

VBA

  1. #1
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Décembre 2005
    Messages
    3
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2005
    Messages : 3
    Points : 1
    Points
    1
    Par défaut [VBA]possible ou pas ? creer une image jpg a partir 7 jpg
    Bonjour,

    je voudrais savoir si c est possible de faire ça avec plusieurs photos prises avec un APN
    on clique sur la zone photo et on peut aller chercher le jpg dans c:\
    on fait ça pour toutes les zone photo


    puis on fait creer

    merci d'avance pour les pistes

    le fichier final est un jpg afin de le lire par un lecteur dvix en boucle

  2. #2
    Inactif  
    Avatar de ouskel'n'or
    Profil pro
    Inscrit en
    Février 2005
    Messages
    12 464
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2005
    Messages : 12 464
    Points : 15 543
    Points
    15 543
    Par défaut
    Dans le fond, ta question se résume à
    Peut-on insérer des Images dans une Image
    Graphiquement, on peut, mais je pense que les "Pictures" placées à l'intérieur de la "Picture" du départ resteront associées à la form, non à l'image.
    Je n'ai pas le temps d'essayer mais tu peux sans doute le faire...
    Ceci n'empêche pas d'aller, d'un clic, chercher l'image correspondante dans c:\. Là je peux t'aider.
    Mais dans ce cas là, pourquoi prendre une image pour placer les autres, prends un cadre.

    A toutes fin utiles (je n'ai pas l'impression de t'aider tellement et ne suis pas sûr d'avoir compris la question... )

    Tu dis

    A+

  3. #3
    Expert éminent sénior
    Avatar de ProgElecT
    Homme Profil pro
    Retraité
    Inscrit en
    Décembre 2004
    Messages
    6 086
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 68
    Localisation : France, Haute Savoie (Rhône Alpes)

    Informations professionnelles :
    Activité : Retraité
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Décembre 2004
    Messages : 6 086
    Points : 16 715
    Points
    16 715
    Par défaut
    Bonjour

    dans une form1 (ScaleMode = 3)
    1 commandButton "Ouvrir"
    2 pictureBox (ScaleMode = 3)
    1 CommonDialog

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    Option Explicit
    Dim T, StartX, StartY As Integer
    Private Sub Command1_Click()
    If Form1.Tag <> "" Then
     FormExplorateur.Drive1.Drive = Left$(Form1.Tag, 2)
     FormExplorateur.Dir1.Path = Form1.Tag
     If PictOuverte.Tag <> "" Then
      For T = 0 To FormExplorateur.File1.ListCount - 1
       If FormExplorateur.File1.List(T) = PictOuverte.Tag Then
        FormExplorateur.File1.Selected(T) = True: Exit For
       End If
      Next T
     End If
    End If
    FormExplorateur.Caption = "Ouvrir "
    FormExplorateur.Show 1
    End Sub
    Private Sub PictOuverte_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Shift = 2 And Me.Tag <> "" Then
     StartX = X: StartY = Y:
     PictOuverte.Drag (1) 'ctrl et coordonnées de depart
     Exit Sub
    End If
    PictOuverte.ZOrder
    End Sub
    Private Sub PictResult_Click()
    PictResult.ZOrder
    End Sub
    Private Sub PictResult_DragDrop(Source As Control, X As Single, Y As Single)
    Source.Drag (2) ' met fin au deplacement
    'nouveau placement
    PictResult.PaintPicture PictOuverte.Picture, X - StartX, Y - StartY, , , 0, 0
    PictResult.ZOrder
    End Sub
    dans une form2 (FormExplorateur)
    1 DriveListBox
    1 DiListBox
    1 FileListBox
    1 CommandButton(0) "Ouvrir"
    1 CommandButton(1) "Annuler"
    1 TextBox
    1 image
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    Option Explicit
     
    Private Sub Form_Load()
    Me.Top = (Screen.Height - Me.Height) / 2: Me.Left = (Screen.Width - Me.Width) / 2
    End Sub
    Private Sub Form_Activate()
    If Image1.Picture = 0 Then Cmd(0).Enabled = False
    Cmd(1).SetFocus
    End Sub
    Private Sub Form_Resize()
    If Me.WindowState <> vbMinimized Then
     If Me.Height < 5115 Then Me.Height = 5115
     If Me.Width < 8130 Then Me.Width = 8130
    End If
    End Sub
     
    Private Sub Form_KeyPress(KeyAscii As Integer)
    If KeyAscii = 27 Then Cmd_Click 1
    End Sub
    Private Sub Drive1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 27 Then Cmd_Click 1
    End Sub
    Private Sub Dir1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 27 Then Cmd_Click 1
    End Sub
    Private Sub File1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 27 Then Cmd_Click 1
    End Sub
    Private Sub Cmd_KeyPress(Index As Integer, KeyAscii As Integer)
    If KeyAscii = 27 Then Cmd_Click 1
    End Sub
     
    Private Sub File1_DblClick()
    Cmd_Click 0
    End Sub
    Private Sub Cmd_Click(Index As Integer)
    Select Case Index
     Case 0 'ouvrir
      Form1.PictOuverte.Picture = LoadPicture(File1.Path & "\" & File1.FileName)
      Form1.PictOuverte.Tag = File1.FileName
      Form1.Tag = File1.Path
      Form1.PictOuverte.ZOrder
      Case 1 'annuler
    End Select
    Me.Visible = False
    End Sub
    Private Sub Dir1_Change()
    File1.Path = Dir1.Path
    Image1.Picture = LoadPicture(""): Cmd(0).Enabled = False
    End Sub
    Private Sub Drive1_Change()
    Dir1.Path = Drive1.Drive
    End Sub
    Private Sub File1_Click()
    On Error Resume Next
    Image1.Picture = LoadPicture(File1.Path & "\" & File1.FileName)
    If Err.Number <> 0 Then
     Text1.Visible = True: Cmd(0).Enabled = False
     Else
     Text1.Visible = False: Cmd(0).Enabled = True
    End If
    End Sub
    pour la transformation en JPG voir La derniere proposition de ridan avec le lien suivant
    http://www.developpez.net/forums/vie...rtir+image+jpg

    Salut
    pourquoi pas, pour remercier, un pour celui/ceux qui vous ont dépannés.
    saut de ligne
    OOOOOOOOO👉 → → Ma page perso sur DVP ← ← 👈

  4. #4
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Décembre 2005
    Messages
    3
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2005
    Messages : 3
    Points : 1
    Points
    1
    Par défaut
    merci
    tu peux pas me filer le fichier ? car ya des trucs que je ne comprends pas

    une form1 (ScaleMode = 3) par exemple

  5. #5
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Décembre 2005
    Messages
    3
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2005
    Messages : 3
    Points : 1
    Points
    1
    Par défaut
    j arrive pas à le faire marcher ce prog personne ne peut m aider ? car je suis un gros debutant

  6. #6
    Membre éprouvé
    Avatar de ridan
    Inscrit en
    Avril 2003
    Messages
    710
    Détails du profil
    Informations personnelles :
    Âge : 40

    Informations forums :
    Inscription : Avril 2003
    Messages : 710
    Points : 1 126
    Points
    1 126
    Par défaut
    Salut,

    Pour la conversion JPEG avec IJL11 tu as un code source prêt à l'emploi ici : http://vb.developpez.com/sources/?pa...#screenshotapi

    Le ScaleMode : http://msdn.microsoft.com/library/de...roprts_223.asp

    Bon courage
    @ bientôt

    :: Ressources VB : Cours | FAQ | Sources et surtout La recherche sur le forum

    :: Pour un forum plus propre ...

Discussions similaires

  1. Réponses: 5
    Dernier message: 17/04/2008, 18h44
  2. Réponses: 2
    Dernier message: 04/08/2005, 11h32
  3. [Image] Comment créer une image à partir d'un fichier
    Par mereyj dans le forum Entrée/Sortie
    Réponses: 1
    Dernier message: 01/07/2005, 21h48
  4. Ne pas répéter une image de fond
    Par valette dans le forum Balisage (X)HTML et validation W3C
    Réponses: 8
    Dernier message: 05/01/2005, 21h49
  5. Mkisofs - problème pour créer une image
    Par tomnie dans le forum Applications et environnements graphiques
    Réponses: 4
    Dernier message: 04/08/2004, 11h44

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo