Forum | | | | - Page 1 - |
| | Hi,
means now I already a little bit moreover be with my Program have I here yet The small problem whom keyboard means by Mousepressed with the Rolltor To link. means i will the Rolltor by keyboard (but only as long as it pressed becomes) high and runterfahren let, once one The Button loslässt should the goal but stand stay. CompileMarkSeparationWindow 1,1 - 1024,768
cls
declare hBild1&,hBild2&,hBild3&,hBild4&,hBild5&,hBild6&,hBild7&,hBild8&\
,hBild9&,hBild10&,hBild11&,hBild12&,hBild13&,hBild14&,hBild15&,hBild16&
Proc BMP
hBild1& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tagn0.BMP")
hBild2& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tagn1.BMP")
hBild3& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tart0.BMP")
hBild4& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tart1.BMP")
hBild5& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\nota1.BMP")
hBild6& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\trt1.BMP")
hBild7& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\trt0.BMP") ;Störungsleuchte ein
hBild8& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tabl0.BMP")
hBild9& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tge0.BMP")
hBild10& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tgn1.BMP")
hBild11& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\sertar1.BMP")
hBild12& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\sertar0.BMP")
hBild13& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\objekte\\druckzr.BMP")
hBild14& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\objekte\\emotl1.BMP")
hBild15& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\lichtschr.BMP")
hBild16& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\objekte\\rolltor.BMP")
Endproc
Proc BMP1
roundrect 600,130-500,300;30,30
rectangle 1,290-200;0
DrawSizedPic hBild1&,40,50 - 30,30;0
DrawSizedPic hBild1&,40,210 - 30,30;0
DrawSizedPic hBild1&,40,170 - 30,30;0
DrawSizedPic hBild1&,40,250 - 30,30;0
DrawSizedPic hBild3&,40,130 - 30,30;0
DrawSizedPic hBild3&,40,10 - 30,30;0
DrawSizedPic hBild5&,120,10 - 30,30;0
DrawSizedPic hBild8&,120,50 - 30,30;0
DrawSizedPic hBild6&,120,130 - 30,30;0
DrawSizedPic hBild9&,120,170 - 30,30;0
DrawSizedPic hBild10&,120,210 - 30,30;0
DrawSizedPic hBild10&,225,125 - 30,30;0
DrawSizedPic hBild10&,225,215 - 30,30;0
DrawSizedPic hBild6&,225,305 - 30,30;0
DrawSizedPic hBild12&,255,305 - 30,30;0
DrawSizedPic hBild11&,255,215 - 30,30;0
DrawSizedPic hBild12&,255,125 - 30,30;0
DrawSizedPic hBild13&,420,305 - 30,30;0
DrawSizedPic hBild14&,420,120 - 40,40;0
DrawSizedPic hBild15&,390,350 - 30,30;0
rem DrawSizedPic hBild16&,270,130 - 160,220;0
DrawSizedPic hBild3&,510,140 - 30,30;0
DrawSizedPic hBild1&,510,180 - 30,30;0
DrawSizedPic hBild1&,510,220 - 30,30;0
DrawSizedPic hBild1&,510,260 - 30,30;0
Endproc
Proc Texte
Locate 2,2
Print "Aus"
Locate 5,2
Print "Ein"
Locate 8,5
Print "Anlage"
Locate 12,2
Print "STOP"
Locate 15,2
Print "AUF"
Locate 18,2
Print "HALB"
Locate 21,2
Print "ZU"
Locate 23,6
Print "Tor"
Locate 2,10
Print "Notaus"
Locate 5,10
Print "verriegelt"
endproc
rem Ausführung der Prozeduren
BMP
BMP1
Texte
Proc Taster1
While %mousepressed
DrawSizedPic hBild2& ,40 , 50 - 30, 30; 0
EndWhile
DrawSizedPic hbild1& ,40 , 50 - 30, 30; 0
Endproc
Proc Rolltor
mLoadBmp "D:\\Xprofan\\BMP\\Objekte\\rolltor.BMP"
startPaint -1
usepen 0,0,$FFFFFF
line 0,181 - 127,181
endPaint
endproc
Proc Torzu
whileLoop 182,0,-1
mCopyBmp 0,&loop - 127,182 > 290,140 ; 0
sleep 30
wend
endproc
Proc Torauf
Taster1
whileLoop 182
mCopyBmp 0,&loop - 127,182 > 290,140 ; 0
sleep 30
wend
endproc
Rolltor
Torzu
Torauf
While 1
waitinput
if @Mouse (40,50 - 30,30)
offset%=0
Taster1
Elseif @Mouse (40,50 - 30,90)
offset%=50
Taster1
Elseif @Mouse (40,50 - 30,140)
offset%=100
Taster1
Elseif @Mouse (10,0 - 30,190)
offset%=150
Taster1
else
@Mouse (10,160 - 30,190)
Break
Endif
Endwhile
Proc Rolltor
mLoadBmp "D:\\Xprofan\\BMP\\Objekte\\rolltor.BMP"
startPaint -1
usepen 0,0,$FFFFFF
line 0,181 - 127,181
endPaint
endproc
Proc Torzu
whileLoop 182,0,-1
mCopyBmp 0,&loop - 127,182 > 100,100 ; 0
sleep 30
wend
endproc
Proc Torauf
waitInput
whileLoop 182
mCopyBmp 0,&loop - 127,182 > 100,100 ; 0
sleep 30
wend
endproc
Rolltor
href='./../../references-fonction/XProfan/torzu/'>Torzu
Torauf
end
|
| | | | |
| | | | - Page 2 - |
| | Jörg Sellmeyer | but for panel will need you still too only one Image, or? or is eachone button on the panel too still in two Zuständen present? too there reicht each the squeezed status, the then the Gesamtbild laid becomes. |
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 06/23/11 ▲ |
| |
| | | hm hm, means we've complete everything in 2 Zuständen, each keyboard,Sensor etc. everything as BMP and moreover another Komplettansicht and the should I then use? means so seen only The squeezed keyboard above lay?
I füg The at times The Images so the bissl verständlicher is. |
| | | | |
| | | means well, have the now time so attempts, only now shows it me first the Komplettbild and then can I the window as goal high and down rad comic Why lying me c# rather...... CompileMarkSeparationWindow 1,1 - 1024,768
cls
declare torhoehe&,hBild1&
hBild1& = @create ("HPic",-1,"C:\\Bmp\\komplett.BMP")
rem mcopybmp 0,0 - 1024,768 > 0,0 ;0
DrawSizedPic hBild1&,0,0 - 1024,768;0
var tor&=(%hWnd,"Tor",0,0,0,0)
waitinput
while 1
waitinput 10
if external("user32","GetAsyncKeyState",1)
case torhoehe&<100 : inc torhoehe&
Elseif external("user32","GetAsyncKeyState",2)
case torhoehe& : dec torhoehe&
endif
setWindowPos tor&=450,450 - 768,torHoehe&;0
wend
|
| | | | |
| | Jörg Sellmeyer | two Listviews because the his? CompileMarkSeparation
only now shows it me first the Komplettbild
How would have You it because gladly? first the goal runterfahren and then the image Show? in the momentum schnall I none More, what You achieve want. and the The panel so looks, How on the Image understand so did i not. what shall these komischen metallischen pair? |
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 06/24/11 ▲ |
| |
| | | Hey, the was NEN example where only one graues goal with Schriftzug "Tor" opened watts. so siehts rather from still think I make I yet what wrong with the Bitmap CompileMarkSeparationWindow 1,1 - 1024,768
cls
declare torhoehe&,hBild1&,hTor1&,hwin&,bmp$,hBmp&,stBmp&
hBild1& = @create ("HPic",-1,"C:\\Bmp\\komplett.BMP")
DrawSizedPic hBild1&,0,0 - 1000,700;0
bmp$ = "C:\\Bmp\\Objekte\\rolltor.BMP"
hBmp& = Create("hSizedPic",-1,bmp$,515,205 - 328,240)
var tor&=@Create("bitmap",%hWnd,hBmp&,100,100,100,100)
while 1
waitinput 10
if external("user32","GetAsyncKeyState",1)
case torhoehe&<410 : inc torhoehe&
Elseif external("user32","GetAsyncKeyState",2)
case torhoehe& : dec torhoehe&
endif
setWindowPos tor&=515,205 - 328,torHoehe&;0
wend
|
| | | | |
| | | the Program should by keyboard (The rounds button left and right) bedient go can, means speak if You whom keyboard loslässt remaining the goal stand, The metallischen pair are Sensoren also on the real goal sit, once the goal The position one Sensors(LED) happens light the Sensor short on. Desweiteren are The others rounds Objects Kontrollleuchten The Show whether it opened,eingeschaltet is or a jamming reports.
The Codeschnipsel are a little muddy into Posts, I yet for me The best Variante rausfinden would like.
so far so well, goal drives only mach I yet something with the Bitmap of the Tores wrong.... |
| | | | |
| | | and No it should first the Komplettbild Show and in the Image then the goal Shutdown be there in the mom hold bissl confused,but this is the target and once the then with the Tastern on and To functions can I me without Probs whom Sensoren and Kontrolleuchten consecrate. |
| | | | |
| | Jörg Sellmeyer | How I already written having: If the pattern on the Torbitmap vertically are, is the whole free from problems so To regulate. If the pattern wagerecht is and yet additional pattern has, becomes it tougher. You can then the image ausschnittweise (angepaßt on The jeweilige Size the Controls) from the Memory bitmap into Static-Control reinkopieren. yet rather: You lay you one aray with the Handles To ca 100 Torzuständen on and "spielst" The then sozusagen ex. |
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 06/24/11 ▲ |
| |
| | | ah everything clear, therefore come hold The Schlieren naja nu is closing-time, I mach me home time ran thanks again |
| | | | |
| | Jörg Sellmeyer | you have too yet a Error in hSizedPic: CompileMarkSeparationhBmp& = Create("hSizedPic",-1,bmp$,515,205 - 328,240) > it must no hyphen drin his and its one Parameter To plenty drin.
@Create("hSizedPic", n1, s, DX, DY, n2) |
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 06/24/11 ▲ |
| |
| | Jörg Sellmeyer | I versteh now too, what You a little while ago so meant, that the goal before To see is. Eigenartigerweise becomes the Staticcontrol always first displayed, even if The sizes on zero stand: CompileMarkSeparationhBmp& = Create("hPic",-1,bmp$)',0,0 ,0)
var tor&=@Create("bitmap",%hWnd,hBmp&,0,0,0,0)e> Perhaps another Bug in XProfan? it helps, if you it so make: CompileMarkSeparation means far aushalb the visible Bereichs create. |
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 06/24/11 ▲ |
| |
| | | Hi, and oha thanks naja ifs NEN bow is Have I at least what ausgemerzt.... Yes with the the Image disturbing vast but outside the Bereichs is perfect. |
| | | | |
|
AnswerThemeninformationenthis Topic has 5 subscriber: |