English
Forum

Done: In BMP of/ one Loop loading

 

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

210 kB
Kurzbeschreibung: Photoviewer
Hochgeladen:08/02/09
Downloadcounter106
Download
 
08/02/09  
 




Jörg
Sellmeyer
You mußßt whom Backslash double.
CompileMarkSeparation
loadbmp "files	o.bmp",0,0;0 falsch
e>

CompileMarkSeparation
loadbmp "files\to.bmp",0,0;0 richtig!
>

Nochwas: you should one WaitInput to "Whilenot e%" install, otherwise become You on Your Program not plenty joy having.
 
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.
CompileMarkSeparation
declare 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
 
08/02/09  
 




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??
 
08/02/09  
 




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.
 
08/02/09  
 




Roberto
Neu
means must I the ENTF with IF write or ??
or a new Loop make ??
 
08/02/09  
 




Rolf
Koch
OK - gives many Opportunities the Pfadermittlung here a integrally PROFANE:
CompileMarkSeparation
declare 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
 
08/02/09  
 




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
CompileMarkSeparation
declare 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
 
08/02/09  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

7.454 Views

Untitledvor 0 min.
Uwe Lang09/16/13
Stephan Sonneborn03/27/12
liveFamilie02/05/12

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie