FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC

Développement d'applications avec le langage Panoramic
 
AccueilAccueil  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  MembresMembres  Connexion  
Derniers sujets
» Editeur EliP 6 : Le Tiny éditeur avec 25 onglets de travail
Afficher un texte sur l'écran total Emptypar Yannick Aujourd'hui à 18:32

» Philharmusique
Afficher un texte sur l'écran total Emptypar jjn4 Aujourd'hui à 13:58

» PANORAMIC V 1
Afficher un texte sur l'écran total Emptypar papydall Hier à 3:22

» select intégrés [résolu]
Afficher un texte sur l'écran total Emptypar jjn4 Mer 8 Mai 2024 - 17:00

» number_mouse_up
Afficher un texte sur l'écran total Emptypar jjn4 Mer 8 Mai 2024 - 11:59

» Aide de PANORAMIC
Afficher un texte sur l'écran total Emptypar jjn4 Mer 8 Mai 2024 - 11:16

» trop de fichiers en cours
Afficher un texte sur l'écran total Emptypar lepetitmarocain Mer 8 Mai 2024 - 10:43

» Je teste PANORAMIC V 1 beta 1
Afficher un texte sur l'écran total Emptypar papydall Mer 8 Mai 2024 - 4:17

» bouton dans autre form que 0
Afficher un texte sur l'écran total Emptypar leclode Lun 6 Mai 2024 - 13:59

» KGF_dll - nouvelles versions
Afficher un texte sur l'écran total Emptypar Klaus Lun 6 Mai 2024 - 11:41

» Gestion d'un système client-serveur.
Afficher un texte sur l'écran total Emptypar Klaus Lun 6 Mai 2024 - 10:23

» @Jack
Afficher un texte sur l'écran total Emptypar Jack Mar 30 Avr 2024 - 20:40

» Une calculatrice en une ligne de programme
Afficher un texte sur l'écran total Emptypar jean_debord Dim 28 Avr 2024 - 8:47

» Form(résolu)
Afficher un texte sur l'écran total Emptypar leclode Sam 27 Avr 2024 - 17:59

» Bataille navale SM
Afficher un texte sur l'écran total Emptypar jjn4 Ven 26 Avr 2024 - 17:39

Navigation
 Portail
 Index
 Membres
 Profil
 FAQ
 Rechercher
Rechercher
 
 

Résultats par :
 
Rechercher Recherche avancée
Mai 2024
LunMarMerJeuVenSamDim
  12345
6789101112
13141516171819
20212223242526
2728293031  
CalendrierCalendrier
Le Deal du moment : -45%
WHIRLPOOL OWFC3C26X – Lave-vaisselle pose libre ...
Voir le deal
339 €

 

 Afficher un texte sur l'écran total

Aller en bas 
3 participants
AuteurMessage
JL35




Nombre de messages : 7095
Localisation : 77
Date d'inscription : 29/11/2007

Afficher un texte sur l'écran total Empty
MessageSujet: Afficher un texte sur l'écran total   Afficher un texte sur l'écran total EmptyJeu 22 Mar 2018 - 21:11

Je veux dire sur la totalité de l'écran du pc (rien à voir avec de la crème solaire...)
C'est un peu 'bestial' comme procédé, et très long à exécuter, mais je ne connais pas d'autre moyen.
Ça n'a pas une grande utilité, à part peut-être pour faire une blague, souhaiter un anniversaire, ou autre.
Le principe: créer un Form pour chaque pixel du texte et le positionner sur l'écran, avec sa couleur (couleur du texte), et une taille fonction du facteur de zoom éventuel (1x1 pixel si pas de zoom).
Code:
DIM t$
' HIDE 0
WIDTH 0,200: HEIGHT 0,80: BORDER_SMALL 0
t$ = TIME$
Textecran(800,100,"Salut !","Arial",32,255*65536,"GI",2)
PRINT t$+" -> "+TIME$: ' pour voir la durée d'exécution
END

SUB Textecran(x1%,y1%,txt$,fnt$,sz%,rgb%,enr$,zoom%)
  ' Affichage en x1%,y1% absolus d'un texte txt$ sur tout l'écran
  ' Police fnt$, taille sz%, couleur rgb%, enrichissements 'GIS', facteur zoom zoom%
  DIM_LOCAL f%,p%,wt%,ht%,x%,y%,r%,g%,b%,e%,i%,j%,k%
  r% = INT(rgb%/65536): g% = BIN_AND(rgb%,65280)/256: b% = BIN_AND(rgb%,255)
  p%=900: PICTURE p%: HIDE p%: FONT_NAME p%,fnt$: FONT_SIZE p%,sz%: FONT_COLOR p%,r%,g%,b%
  IF INSTR(enr$,"G") > 0 THEN FONT_BOLD p%
  IF INSTR(enr$,"I") > 0 THEN FONT_ITALIC p%
  IF INSTR(enr$,"S") > 0 THEN FONT_UNDERLINE p%
  wt% = TEXT_WIDTH(txt$,p%): ht% = TEXT_HEIGHT(txt$,p%):WIDTH p%,wt%: HEIGHT p%,ht%
  PRINT_TARGET_IS p%: PRINT txt$
  f% = p%+1
  FOR y% = 0 TO ht%
      FOR x% = 0 TO wt%
          i% = COLOR_PIXEL_RED(p%,x%,y%): j% = COLOR_PIXEL_GREEN(p%,x%,y%)
          k% = COLOR_PIXEL_BLUE(p%,x%,y%)
          IF i% = r% AND j% = g% AND k% = b%
              FORM f%: BORDER_HIDE f%: WIDTH f%,zoom%: HEIGHT f%,zoom%
                       TOP f%,y1%+y%*zoom%: LEFT f%,x1%+x%*zoom%
                       COLOR f%,r%,g%,b%
              f% = f%+1
          END_IF
      NEXT x%
      caption 0,"y="+str$(y%)+"/"+str$(ht%): ' pour suivre la progresion
  NEXT y%
  caption 0,"Form= "+str$(f%): ' dernier Form généré
  PRINT_TARGET_IS 0: DELETE p%
END_SUB
Remarque: dans l'exemple ci-dessus (affichage de 'Salut !' couleur rouge, taille 32 avec zoom x2: gras+italique),
la durée d'affichage est (chez moi) de 5 minutes, avec environ 1350 objets Form générés !
Évidemment l'affichage n'est effectif que tant que le programme est actif, il s'efface si on ferme le programme.

Je répète, c'est un gadget... y a-t'il un autre moyen d'écrire sur tout l'écran ?
Revenir en haut Aller en bas
Klaus

Klaus


Nombre de messages : 12295
Age : 74
Localisation : Ile de France
Date d'inscription : 29/12/2009

Afficher un texte sur l'écran total Empty
MessageSujet: Re: Afficher un texte sur l'écran total   Afficher un texte sur l'écran total EmptyJeu 22 Mar 2018 - 21:16

Où est-ce que tu veux écrire, exactement ? Dans l'image de fond du bureau ? Dans une fenêtre qui se superpose à tout (éventuellement transparente pour les parties non utlilisées), un peu à la manière dont Windows demande l'autorisation avant l'installation d'un programme ?
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
JL35




Nombre de messages : 7095
Localisation : 77
Date d'inscription : 29/11/2007

Afficher un texte sur l'écran total Empty
MessageSujet: Re: Afficher un texte sur l'écran total   Afficher un texte sur l'écran total EmptyJeu 22 Mar 2018 - 21:22

Bonsoir Klaus,
en fait n'importe où sur l'écran du moniteur, en surimpression de ce qui est déjà affiché (icônes, etc.). Donc éventuellement dans une fenêtre transparente, mais juste le texte, pas de cadre.
Revenir en haut Aller en bas
Klaus

Klaus


Nombre de messages : 12295
Age : 74
Localisation : Ile de France
Date d'inscription : 29/12/2009

Afficher un texte sur l'écran total Empty
MessageSujet: Re: Afficher un texte sur l'écran total   Afficher un texte sur l'écran total EmptyJeu 22 Mar 2018 - 21:45

Et on doit pouvoir continuer à cliquer là où ce n'est pas écrit, ou est-ce que les zones transparentes ne le sont que pour la vue, pas pour les clics ?
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
JL35




Nombre de messages : 7095
Localisation : 77
Date d'inscription : 29/11/2007

Afficher un texte sur l'écran total Empty
MessageSujet: Re: Afficher un texte sur l'écran total   Afficher un texte sur l'écran total EmptyJeu 22 Mar 2018 - 21:51

Je n'ai pas de contrainte particulière, c'est juste un gadget... mais dans mon esprit (et avec la méthode que j'ai utilisée), ça ne gêne pas pour les clics, on peut cliquer à travers le texte affiché.
Revenir en haut Aller en bas
Klaus

Klaus


Nombre de messages : 12295
Age : 74
Localisation : Ile de France
Date d'inscription : 29/12/2009

Afficher un texte sur l'écran total Empty
MessageSujet: Re: Afficher un texte sur l'écran total   Afficher un texte sur l'écran total EmptyJeu 22 Mar 2018 - 22:00

Une première réponse pourrait être ceci (avec une fonction existante de KGF.dll):
Code:
dim res%

border_hide 0
full_space 0

font_size 0,24 : font_bold 0
print_locate 300,300
print "Panoramic"

dll_on "KGF.dll"
res% = dll_call2("WindowTranparency",handle(0),127)

end
Le second paramètre est le degré d'opacité (0...255)
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
JL35




Nombre de messages : 7095
Localisation : 77
Date d'inscription : 29/11/2007

Afficher un texte sur l'écran total Empty
MessageSujet: Re: Afficher un texte sur l'écran total   Afficher un texte sur l'écran total EmptyJeu 22 Mar 2018 - 22:12

Ca fait un truc bizarre chez moi, il y a bien affichage fugitif de 'Panoramic', puis une espèce d'effet de transparence qui reste figé sur tout l'écran mais le texte a disparu.

Mais ne te casse pas la tête avec ça, ça a vraiment très peu (ou même pas du tout !) d'utilité !
Revenir en haut Aller en bas
Klaus

Klaus


Nombre de messages : 12295
Age : 74
Localisation : Ile de France
Date d'inscription : 29/12/2009

Afficher un texte sur l'écran total Empty
MessageSujet: Re: Afficher un texte sur l'écran total   Afficher un texte sur l'écran total EmptyJeu 22 Mar 2018 - 22:15

Autre solution:
Tu télécharges KGF.dll de mon WebDav, dossier DLLs, et tu fais ceci:
Code:
dim res%

border_hide 0
full_space 0
color 0,255,255,255 : ' <========= couleur de transparence, à choisir librement !

font_size 0,24 : font_bold 0
print_locate 300,300
print "Panoramic"

dll_on "KGF.dll"
' 2ème paramètre: couleur de transparence hex("BBGGRR")
' 3ème paramètre: 0 (transparent) ... 255 (opaque)
res% = dll_call3("SetTranslucent",handle(0),hex("FFFFFF"),0)
res% = dll_call2("WindowTopMost",handle(0),1)
height 0,height(0) - 40

end
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Klaus

Klaus


Nombre de messages : 12295
Age : 74
Localisation : Ile de France
Date d'inscription : 29/12/2009

Afficher un texte sur l'écran total Empty
MessageSujet: Re: Afficher un texte sur l'écran total   Afficher un texte sur l'écran total EmptyJeu 22 Mar 2018 - 22:17

Citation :
Ca fait un truc bizarre chez moi, il y a bien affichage fugitif de 'Panoramic', puis une espèce d'effet de transparence qui reste figé sur tout l'écran mais le texte a disparu.
J'ai oublié d'ajouter TO_FOREGROUND 0...
Mais regarde ce que j'ai posté ci-dessus...
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
JL35




Nombre de messages : 7095
Localisation : 77
Date d'inscription : 29/11/2007

Afficher un texte sur l'écran total Empty
MessageSujet: Re: Afficher un texte sur l'écran total   Afficher un texte sur l'écran total EmptyJeu 22 Mar 2018 - 22:26

Ben, là je n'ai plus aucun affichage, to_foreground ou pas... (sauf le Panoramic fugitif)... j'ai bien rechargé kgf.dll

Le Form 0 est bien là, sur tout l'écran, invisible, mais le texte est lui aussi invisible.
Revenir en haut Aller en bas
silverman

silverman


Nombre de messages : 968
Age : 51
Localisation : Picardie
Date d'inscription : 18/03/2015

Afficher un texte sur l'écran total Empty
MessageSujet: Re: Afficher un texte sur l'écran total   Afficher un texte sur l'écran total EmptyJeu 22 Mar 2018 - 22:50

J'avais fait une démo sur la transparence, ici
Revenir en haut Aller en bas
JL35




Nombre de messages : 7095
Localisation : 77
Date d'inscription : 29/11/2007

Afficher un texte sur l'écran total Empty
MessageSujet: Re: Afficher un texte sur l'écran total   Afficher un texte sur l'écran total EmptyJeu 22 Mar 2018 - 22:55

Effectivement, j'étais même intervenu mais je ne m'en souvenais plus...
Revenir en haut Aller en bas
Klaus

Klaus


Nombre de messages : 12295
Age : 74
Localisation : Ile de France
Date d'inscription : 29/12/2009

Afficher un texte sur l'écran total Empty
MessageSujet: Re: Afficher un texte sur l'écran total   Afficher un texte sur l'écran total EmptyJeu 22 Mar 2018 - 23:48

Citation :
Le Form 0 est bien là, sur tout l'écran, invisible, mais le texte est lui aussi invisible.
Non, charge la DLL de mon WebDav, dossier DLLs, et essaie:
Code:
label sortir
dim res%

border_hide 0
full_space 0
color 0,255,255,255 : ' <========= couleur de transparence, à choisir librement !

font_size 0,24 : font_bold 0
print_locate 300,300
print "Panoramic"

dll_on "KGF.dll"
' 2ème paramètre: couleur de transparence hex("BBGGRR")
' 3ème paramètre: 0 (transparent) ... 255 (opaque)
res% = dll_call3("SetTranslucent",handle(0),hex("FFFFFF"),0)
res% = dll_call2("WindowTopMost",handle(0),1)
height 0,height(0) - 40
button 1 : caption 1,"Sortir" : on_click 1,sortir : width 1,150 : height 1,30

end
sortir:
terminate
tu obtiens:
Afficher un texte sur l'écran total Aa157
Tout ce qui n'est pas blanc dans cet exemple, sera affiché. Tout ce qui est blanc, disparaît. Tu peux choisir la couleur de transparence librement. Si tu veux afficher du blanc, tu peux utiliser
Code:
color 0,255,255,254
...
res% = dll_call3("SetTranslucent",handle(0),hex("FEFFFF"),0)
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Klaus

Klaus


Nombre de messages : 12295
Age : 74
Localisation : Ile de France
Date d'inscription : 29/12/2009

Afficher un texte sur l'écran total Empty
MessageSujet: Re: Afficher un texte sur l'écran total   Afficher un texte sur l'écran total EmptyJeu 22 Mar 2018 - 23:59

Je viens de publier officiellement une nouvelle version de KGF.dll avec cette fonction. La doc est à jour. Tout est disponible sur le WebDav et sur mes deux sites Web, comme d'habitude.
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
Klaus

Klaus


Nombre de messages : 12295
Age : 74
Localisation : Ile de France
Date d'inscription : 29/12/2009

Afficher un texte sur l'écran total Empty
MessageSujet: Re: Afficher un texte sur l'écran total   Afficher un texte sur l'écran total EmptyVen 23 Mar 2018 - 10:53

Et voici une horloge en sur-impressioin sur l'écran, avec uhn bouton de sortie:
Code:
label sortir, tick
dim res%

border_hide 0
color 0,255,255,255 : ' <========= couleur de transparence, à choisir librement !
timer 1 : timer_interval 1,1000 : on_timer 1,tick

font_size 0,24 : font_bold 0

dll_on "KGF.dll"
' 2ème paramètre: couleur de transparence hex("BBGGRR")
' 3ème paramètre: 0 (transparent) ... 255 (opaque)
res% = dll_call3("SetTranslucent",handle(0),hex("FFFFFF"),0)
res% = dll_call2("WindowTopMost",handle(0),1)
button 2 : caption 2,"Sortir" : on_click 2,sortir : width 2,150 : height 2,30

end
sortir:
terminate
tick:
print_locate 10,40
print time$
print_locate 10,80
print date$
return
Revenir en haut Aller en bas
http://klauspanoramic.comxa.com/index.html
JL35




Nombre de messages : 7095
Localisation : 77
Date d'inscription : 29/11/2007

Afficher un texte sur l'écran total Empty
MessageSujet: Re: Afficher un texte sur l'écran total   Afficher un texte sur l'écran total EmptyVen 23 Mar 2018 - 13:18

Effectivement, là ça marche, chapeau !
Une horloge, c'est une bonne idée.

Et question rapidité d'affichage, y'a pas photo !
Au moins 5 minutes avec ma méthode, une fraction de seconde avec KGF.dll.
Au résultat (texte quelconque, ou horloge Klaus):
(-> ajuster le chemin de KGF.dll)
Code:
dim txt$,fnt$,sz%,enr$,rgb%,rc$
rc$ = CHR$(13)+CHR$(10)
txt$ = "Bon Panoramic"+rc$+"      à tous !"
fnt$ = "Arial"
sz% = 128
enr$ = "BI"
rgb% = 65536*255+256*255: ' jaune
Text_Ecran(100,100,txt$,fnt$,sz%,enr$,rgb%): Terminate

' Horloge(100,100,"Arial",24,"G",rgb%)
End
' ==============================================================================
SUB Horloge(x%,y%,fnt$,sz%,enr$,rgb%)
  ' Afficher une horloge numérique en x% y% de l'écran total
  ' police fnt$, taille sz%,enrichissements enr$, couleur rgb% (65536*R+256*G+B)
  LABEL Tick,Finh
  DIM r%,g%,b%,yd%,lt%,ff%,res%
  r% = INT(rgb%/65536): g% = BIN_AND(rgb%,65280)/256: b% = BIN_AND(rgb%,255)
  BORDER_HIDE 0: FULL_SPACE 0: FONT_NAME 0,fnt$: FONT_SIZE 0,sz%: FONT_COLOR 0,r%,g%,b%
  COLOR 0,255,255,255
  IF INSTR(enr$,"G") > 0 THEN FONT_BOLD 0
  IF INSTR(enr$,"I") > 0 THEN FONT_ITALIC 0
  IF INSTR(enr$,"S") > 0 THEN FONT_UNDERLINE 0
  yd% = y%+TEXT_HEIGHT("1",0): lt% = TEXT_WIDTH(DATE$,0)
  DLL_ON "C:\PANORAMIC\KGF\KGF.dll"
  ' 2ème paramètre: couleur de transparence hex("BBGGRR")
  ' 3ème paramètre: 0 (transparent) ... 255 (opaque)
  res% = dll_call3("SetTranslucent",handle(0),hex("FFFFFF"),0)
  res% = dll_call2("WindowTopMost",handle(0),1)
  BUTTON 1: TOP 1,y%+7: LEFT 1,x%+lt%-20: WIDTH 1,20: HEIGHT 1,25: CAPTION 1,"X"
            FONT_SIZE 1,12: FONT_BOLD_OFF 1: ON_CLICK 1,Finh
  WHILE ff% = 0: GOSUB Tick: PAUSE 1000: END_WHILE
  DLL_OFF: TERMINATE
Tick:
  PRINT_LOCATE x%,y%: PRINT TIME$
  PRINT_LOCATE x%,yd%: PRINT DATE$
RETURN
Finh:
  ff% = 1
RETURN
END_SUB
' ==============================================================================
SUB Text_Ecran(x%,y%,txt$,fnt$,sz%,enr$,rgb%)
  ' Afficher le texte txt$ en x% y% de l'écran total
  ' Police fnt$, taille sz%,enrichissements enr$, couleur rgb% (65536*R+256*G+B)
  ' Texte multilignes éventuel -> chr$(13)+chr$(10)
  ' Cliquer sur la petite croix (en fin de texte) pour effacer
  LABEL Fintec
  DIM r%,g%,b%,lt%,ht%,ff%,res%,k%
  r% = INT(rgb%/65536): g% = BIN_AND(rgb%,65280)/256: b% = BIN_AND(rgb%,255)
  BORDER_HIDE 0: FULL_SPACE 0: FONT_NAME 0,fnt$: FONT_SIZE 0,sz%: FONT_COLOR 0,r%,g%,b%
  COLOR 0,255,255,255
  IF INSTR(enr$,"G") > 0 THEN FONT_BOLD 0
  IF INSTR(enr$,"I") > 0 THEN FONT_ITALIC 0
  IF INSTR(enr$,"S") > 0 THEN FONT_UNDERLINE 0
  ht% = TEXT_HEIGHT(txt$,0)
  DLL_ON "C:\PANORAMIC\KGF\KGF.dll"
  ' 2ème paramètre: couleur de transparence hex("BBGGRR")
  ' 3ème paramètre: 0 (transparent) ... 255 (opaque)
  res% = dll_call3("SetTranslucent",handle(0),hex("FFFFFF"),0)
  res% = dll_call2("WindowTopMost",handle(0),1)
  k% = INSTR(txt$,CHR$(13))
  WHILE k% > 0: ' si plusieurs lignes
      PRINT_LOCATE x%,y%: PRINT LEFT$(txt$,k%-1): txt$ = RIGHT_POS$(txt$,k%+2)
      k% = INSTR(txt$,CHR$(13)): y% = y%+ht%
  END_WHILE
  PRINT_LOCATE x%,y%: PRINT txt$: lt% = TEXT_WIDTH(txt$,0)
  BUTTON 1: TOP 1,y%+ht%-sz%/2: LEFT 1,x%+lt%: WIDTH 1,20: HEIGHT 1,25: CAPTION 1,"X"
            FONT_SIZE 1,12: FONT_BOLD_OFF 1: ON_CLICK 1,Fintec
  WHILE ff% = 0: PAUSE 1000: END_WHILE
  DLL_OFF: EXIT_SUB
Fintec:
  ff% = 1
RETURN
END_SUB
' ==============================================================================
Le programme reste actif pendant la durée de l'affichage, pour le tuer il faut cliquer sur le petit bouton à droite, avec la croix.
Revenir en haut Aller en bas
Contenu sponsorisé





Afficher un texte sur l'écran total Empty
MessageSujet: Re: Afficher un texte sur l'écran total   Afficher un texte sur l'écran total Empty

Revenir en haut Aller en bas
 
Afficher un texte sur l'écran total
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Capture d'une zone de l'écran total
» Capture d'une zone de l'écran total
» [RÉSOLU] Afficher du texte enrichi avec PANORAMIC
» Afficher un texte caractère par caractère
» Capture d'une zone de l'écran total

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC :: PANORAMIC :: Vos sources, vos utilitaires à partager-
Sauter vers: