Forum | | | | Roberto Neu | goes the?? Bmp in a Loop loading yesterday have I of 0-2watch Morgends attempts the hinzubekommen. but it comes immmer The Error Message BMP not ladbar |
| | | | |
| | Jörg Sellmeyer | | | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 08/02/09 ▲ |
| |
| | Rolf Koch | Hi Roberto Machs best draus, much have You not yet understood. to that example: one ought to \ between Pfaden and Files write. While without Endwhile can't functions Whilenot e% is ok but Why have You these circumstance as end not used If/Elseif have You do not understood, You uses only IF ENDIF and still this futile GOTO Vorallem in a Loop must You do not the Waitinput under there write and for one GOTO benefit, I Have you now aufgezeigt, that without Goto, richtiges Waitinput (place) and richtiges Endwhile (place) a Loop always go through becomes. means nocheinmal: drop it Goto lane and use: creep, If/Elseif and Procedures. CompileMarkSeparationdeclare load&, e%, button&, back&, Name$, text&, A%
Def DragAcceptFiles(2) !"SHELL32","DragAcceptFiles"
Def DragFinish(1) !"SHELL32","DragFinish"
Def DragQueryFile(4) !"SHELL32","DragQueryFileA"
Declare DragFile#,lade&,lade1&,beenden&,beenden1&,neu&,neu1&
Dim DragFile#, 261 In diesem Bereich finden die gedroppten Dateinamen Platz
WINDOW Optionen
WindowTitle "Photoviewer Pro"
Window 50,20 - 800,600
DESKTOP
usepen -0,-0,@RGB(31,31,31)
loadbmp "files\pp.bmp",100,0;0
loadbmp "files\to.bmp",0,0;0
POPUP MENÜ
Popup "Bildgröße 600x500"
PROC BUTTONS
lade& = Create("hpic",-1,"files\lade.BMP")
lade1& = Create("PicButton",%HWnd,lade&,0,0,100,20)
Create("Tooltip",%HWnd,lade1&,"Suchen sie sich ein Bild aus!")
beenden& = Create("hpic",-1,"files\be.bmp")
beenden1& = Create("PicButton",%HWnd,beenden&,0,526,100,20)
Create("Tooltip",%HWnd,beenden1&,"Das Programm wird beendet!")
neu& = Create("hpic",-1,"files\entf.bmp")
neu1& = Create("PicButton",%HWnd,neu&,0,20,100,20)
Create("Tooltip",%HWnd,neu1&,"Bild wird Entfernt!")
ENDPROC
buttons
Whilenot e%
waitinput
If Clicked(lade1&)
Name$ = @LoadFile$("Bilddateien","*.BMP")
While Name$ <> ""
If Name$ <> ""
LoadBMP Name$,101,1-0,0;0
WindowTitle "Photoviewer Pro - [" + Name$ + "]"
Endif
elseif Clicked(neu1&)
loadbmp "files\pp.bmp",100,0;0
elseif Clicked(beenden1&)
e%=1 ist ja Schleifenende also Ende
endif
endwhile
href='./../../funcion-referencias/XProfan/end/'>end
|
| | | | |
| | Roberto Neu | @ Rolf Vielen Thanks I had it in the beginning too with Elseif written. but then has it alike on whom Button I clicked have always only the image geladen^^ and the image load it by me still not?? |
| | | | |
| | Rolf Koch | Achso, you mean these ENTF? OK is logical, because after You your Images chosen have and then on ENTF click, must You before in that actually directory zurückwechseln. |
| | | | |
| | Roberto Neu | means must I the ENTF with IF write or ?? or a new Loop make ?? |
| | | | |
| | Rolf Koch | OK - gives many Opportunities the Pfadermittlung here a integrally PROFANE: CompileMarkSeparationdeclare load&, e%, button&, back&, Name$, text&, A%
Def DragAcceptFiles(2) !"SHELL32","DragAcceptFiles"
Def DragFinish(1) !"SHELL32","DragFinish"
Def DragQueryFile(4) !"SHELL32","DragQueryFileA"
Declare DragFile#,lade&,lade1&,beenden&,beenden1&,neu&,neu1&,pfad$
Dim DragFile#, 261 In diesem Bereich finden die gedroppten Dateinamen Platz
Pfad sichern - Heimverzeichnis
Ausklammern wenn zur Exe compiliert wird:
pfad$=getdir$("@") Aber Vorsicht - wenn Exe erstellt wird sollte hier $progdir stehen
Wenn Exe erstellt wird diese:
pfad$=$Progdir
WINDOW Optionen
WindowTitle "Photoviewer Pro"
Window 50,20 - 800,600
DESKTOP
usepen -0,-0,@RGB(31,31,31)
loadbmp "files\pp.bmp",100,0;0
loadbmp "files\to.bmp",0,0;0
POPUP MENÜ
Popup "Bildgröße 600x500"
PROC BUTTONS
lade& = Create("hpic",-1,"files\lade.BMP")
lade1& = Create("PicButton",%HWnd,lade&,0,0,100,20)
Create("Tooltip",%HWnd,lade1&,"Suchen sie sich ein Bild aus!")
beenden& = Create("hpic",-1,"files\be.bmp")
beenden1& = Create("PicButton",%HWnd,beenden&,0,526,100,20)
Create("Tooltip",%HWnd,beenden1&,"Das Programm wird beendet!")
neu& = Create("hpic",-1,"files\entf.bmp")
neu1& = Create("PicButton",%HWnd,neu&,0,20,100,20)
Create("Tooltip",%HWnd,neu1&,"Bild wird Entfernt!")
ENDPROC
buttons
Whilenot e%
waitinput
If Clicked(lade1&)
Name$ = @LoadFile$("Bilddateien","*.BMP")
While Name$ <> ""
If Name$ <> ""
LoadBMP Name$,101,1-0,0;0
WindowTitle "Photoviewer Pro - [" + Name$ + "]"
Endif
elseif Clicked(neu1&)
chdir pfad$
loadbmp "files\pp.bmp",100,0;0
elseif Clicked(beenden1&)
e%=1 ist ja Schleifenende also Ende
endif
endwhile
ss=s4 href='./../../funcion-referencias/XProfan/end/'>end
|
| | | | |
| | Roberto Neu | Juhuuuu now Have ichs understands. the Program remaining in the Ordner Files And if I dan loadbmp "filesild.bmp",0,0;0 eingeb seek it in the Ordner Files to the Ordner Files and dan there Yes not ^^ I Have the now so made CompileMarkSeparationdeclare load&, e%, button&, back&, Name$, text&, A%
Def DragAcceptFiles(2) !"SHELL32","DragAcceptFiles"
Def DragFinish(1) !"SHELL32","DragFinish"
Def DragQueryFile(4) !"SHELL32","DragQueryFileA"
Declare DragFile#,lade&,lade1&,beenden&,beenden1&,neu&,neu1&,pfad$
Dim DragFile#, 261In diesem Bereich finden die gedroppten Dateinamen Platz
Pfad sichern - Heimverzeichnis
Ausklammern wenn zur Exe compiliert wird:
pfad$=getdir$("@")Aber Vorsicht - wenn Exe erstellt wird sollte hier $progdir stehen
Wenn Exe erstellt wird diese:
pfad$=$Progdir
WINDOW Optionen
WindowTitle "Photoviewer Pro"
Window 50,20 - 800,600
DESKTOP
usepen -0,-0,@RGB(31,31,31)
loadbmp "files\pp.bmp",100,0;0
loadbmp "files\to.bmp",0,0;0
POPUP MENÜ
Popup "Bildgröße 600x500"
PROC BUTTONS
lade& = Create("hpic",-1,"files\lade.BMP")
lade1& = Create("PicButton",%HWnd,lade&,0,0,100,20)
Create("Tooltip",%HWnd,lade1&,"Suchen sie sich ein Bild aus!")
beenden& = Create("hpic",-1,"files\be.bmp")
beenden1& = Create("PicButton",%HWnd,beenden&,0,526,100,20)
Create("Tooltip",%HWnd,beenden1&,"Das Programm wird beendet!")
neu& = Create("hpic",-1,"files\entf.bmp")
neu1& = Create("PicButton",%HWnd,neu&,0,20,100,20)
Create("Tooltip",%HWnd,neu1&,"Bild wird Entfernt!")
ENDPROC
buttons
Whilenot e%
waitinput
If Clicked(lade1&)
Name$ = @LoadFile$("Bilddateien","*.BMP")
While Name$ <> ""
If Name$ <> ""
LoadBMP Name$,101,1-0,0;0
WindowTitle "Photoviewer Pro - [" + Name$ + "]"
Endif
elseif Clicked(neu1&)
loadbmp "pp.bmp",100,0;0
elseif Clicked(beenden1&)
e%=1ist ja Schleifenende also Ende
endif
endwhile
< s=s4 href='./../../funcion-referencias/XProfan/end/'>end
|
| | | | |
|
AnswerThemeninformationenthis Topic has 3 subscriber: |