|
You last visited: Today at 05:46
Advertisement
PictureBox anklicken nächstes bild
Discussion on PictureBox anklicken nächstes bild within the AutoIt forum part of the Coders Den category.
11/10/2012, 20:57
|
#1
|
elite*gold: 0
Join Date: Sep 2010
Posts: 257
Received Thanks: 20
|
PictureBox anklicken nächstes bild
Hallo,
Ich habe vollgendes Problem:
Ich möchte das wenn man auf eine PictureBox klickt das nächste Bild erscheint!
Jemand ne Idee? Habe bei google nichts gefunden/ falsch gesucht/ich bin zu dumm
Hoffe auf Hilfe
MFG
Dustin
|
|
|
11/10/2012, 21:31
|
#2
|
elite*gold: 528
Join Date: Jan 2012
Posts: 2,127
Received Thanks: 2,403
|
Was ist denn eine PictureBox?
Zeig bitte mal deinen Code.
MfG
|
|
|
11/11/2012, 00:19
|
#3
|
elite*gold: 0
Join Date: Jun 2012
Posts: 80
Received Thanks: 532
|
Try this, maybe help you.
GUICtrlSetImage
|
|
|
11/11/2012, 00:50
|
#4
|
elite*gold: 192
Join Date: May 2009
Posts: 2,227
Received Thanks: 3,262
|
Ich gehe mal davon aus, dass du sowas meinst. Eine Picturebox ist in AutoIT ebenfalls ein Control und kann somit mit Case ohne Probleme und großen Aufwand verwendet werden.
Code:
#RequireAdmin
Global Const $Path_Pic_1 = @ScriptDir & "\Bild1.bmp"
Global Const $Path_Pic_2 = @ScriptDir & "\Bild2.bmp"
Global $Pic_State = $Path_Pic_1
if not FileExists ($Path_Pic_1) And not FileExists ($Path_Pic_2) Then
Exit
EndIf
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$GUI_Form1 = GUICreate("Test", 322, 251, 192, 124)
$GUI_PictureBox = GUICtrlCreatePic("", 5, 5, 310, 240)
GUICtrlSetImage(-1, $Path_Pic_1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_PictureBox
if $Pic_State == $Path_Pic_1 Then
GUICtrlSetImage($GUI_PictureBox, $Path_Pic_2)
$Pic_State = $Path_Pic_2
ElseIf $Pic_State == $Path_Pic_2 Then
GUICtrlSetImage($GUI_PictureBox, $Path_Pic_1)
$Pic_State = $Path_Pic_1
EndIf
EndSwitch
WEnd
|
|
|
11/11/2012, 00:51
|
#5
|
elite*gold: 0
Join Date: Sep 2011
Posts: 435
Received Thanks: 55
|
Möchtest du es auf der Homepage einbinden ? wenn ja Ist es eine Slidebar
Google einfach mal für Visualbasic ( AutoIT etc ) Slidebar
|
|
|
11/11/2012, 09:51
|
#6
|
elite*gold: 0
Join Date: Sep 2010
Posts: 257
Received Thanks: 20
|
Quote:
Originally Posted by kanney'
Möchtest du es auf der Homepage einbinden ? wenn ja Ist es eine Slidebar
Google einfach mal für Visualbasic ( AutoIT etc ) Slidebar
|
Quote:
Originally Posted by Logtetsch
Ich gehe mal davon aus, dass du sowas meinst. Eine Picturebox ist in AutoIT ebenfalls ein Control und kann somit mit Case ohne Probleme und großen Aufwand verwendet werden.
Code:
#RequireAdmin
Global Const $Path_Pic_1 = @ScriptDir & "\Bild1.bmp"
Global Const $Path_Pic_2 = @ScriptDir & "\Bild2.bmp"
Global $Pic_State = $Path_Pic_1
if not FileExists ($Path_Pic_1) And not FileExists ($Path_Pic_2) Then
Exit
EndIf
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$GUI_Form1 = GUICreate("Test", 322, 251, 192, 124)
$GUI_PictureBox = GUICtrlCreatePic("", 5, 5, 310, 240)
GUICtrlSetImage(-1, $Path_Pic_1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_PictureBox
if $Pic_State == $Path_Pic_1 Then
GUICtrlSetImage($GUI_PictureBox, $Path_Pic_2)
$Pic_State = $Path_Pic_2
ElseIf $Pic_State == $Path_Pic_2 Then
GUICtrlSetImage($GUI_PictureBox, $Path_Pic_1)
$Pic_State = $Path_Pic_1
EndIf
EndSwitch
WEnd
|
Ich verstehe den Code nicht ganz:
Wenn ich AUF die PictureBox klicke soll ein nächstes Bild kommen!?
Kannst du den Code erläutern?
Danke
Dustin
|
|
|
11/11/2012, 10:05
|
#7
|
elite*gold: 64
Join Date: May 2011
Posts: 1,229
Received Thanks: 854
|
PHP Code:
#RequireAdmin ;Als Administrator ausführen
Global Const $Path_Pic_1 = @ScriptDir & "\Bild1.bmp" Global Const $Path_Pic_2 = @ScriptDir & "\Bild2.bmp" Global $Pic_State = $Path_Pic_1
;Hier werden die Variablen Deklariert ;$Path_Pic_1 = "ScriptVerzeichniss(@ScriptDir)" &"Bild1.bmp" ;$Path_Pic_2 = "ScriptVerzeichniss(@ScriptDir)" &"Bild2.bmp" ;$Pic = $Path_Pic_1 Variable $Pic wird deklariert mit den Inhalt von $Path_Pic_1
if not FileExists ($Path_Pic_1) And not FileExists ($Path_Pic_2) Then ;Hier wird abgefragt ob die datei Bild1.bmp oder Bild2.bmp existiert Exit EndIf
#include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $GUI_Form1 = GUICreate("Test", 322, 251, 192, 124) $GUI_PictureBox = GUICtrlCreatePic("", 5, 5, 310, 240) GUICtrlSetImage(-1, $Path_Pic_1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ###
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit
Case $GUI_PictureBox;Wenn Picture angeklickt wird if $Pic_State == $Path_Pic_1 Then ;Hier wird abgefragt ob das Bild $Pic_State gleich zu $Path_Pic_1 ist. GUICtrlSetImage($GUI_PictureBox, $Path_Pic_2) ;Hier wird das Bild zu $Path_Pic_2 geändert $Pic_State = $Path_Pic_2 ;Hier wird der Inhalt von der Variable $Pic_State ersetzt durch $Path_Pic_2 ElseIf $Pic_State == $Path_Pic_2 Then ;Hier wird abgefragt ob das Bild $Pic_State gleich zu $Path_Pic_2 ist. GUICtrlSetImage($GUI_PictureBox, $Path_Pic_1) ;Hier wird das Bild zu $Path_Pic_1 geändert $Pic_State = $Path_Pic_1 ;Hier wird der Inhalt von der Variable $Pic_State ersetzt durch $Path_Pic_1 EndIf
EndSwitch WEnd
Besser kann ichs mir nicht vorstellen
|
|
|
11/11/2012, 10:15
|
#8
|
elite*gold: 0
Join Date: Sep 2010
Posts: 257
Received Thanks: 20
|
Quote:
Originally Posted by BladeTiger12
PHP Code:
#RequireAdmin
;Als Administrator ausführen
Global Const $Path_Pic_1 = @ScriptDir & "\Bild1.bmp"
Global Const $Path_Pic_2 = @ScriptDir & "\Bild2.bmp"
Global $Pic_State = $Path_Pic_1
;Hier werden die Variablen Deklariert
;$Path_Pic_1 = "ScriptVerzeichniss(@ScriptDir)" &"Bild1.bmp"
;$Path_Pic_2 = "ScriptVerzeichniss(@ScriptDir)" &"Bild2.bmp"
;$Pic = $Path_Pic_1 Variable $Pic wird deklariert mit den Inhalt von $Path_Pic_1
if not FileExists ($Path_Pic_1) And not FileExists ($Path_Pic_2) Then
;Hier wird abgefragt ob die datei Bild1.bmp oder Bild2.bmp existiert
Exit
EndIf
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$GUI_Form1 = GUICreate("Test", 322, 251, 192, 124)
$GUI_PictureBox = GUICtrlCreatePic("", 5, 5, 310, 240)
GUICtrlSetImage(-1, $Path_Pic_1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_PictureBox;Wenn Picture angeklickt wird
if $Pic_State == $Path_Pic_1 Then
;Hier wird abgefragt ob das Bild $Pic_State gleich zu $Path_Pic_1 ist.
GUICtrlSetImage($GUI_PictureBox, $Path_Pic_2)
;Hier wird das Bild zu $Path_Pic_2 geändert
$Pic_State = $Path_Pic_2
;Hier wird der Inhalt von der Variable $Pic_State ersetzt durch $Path_Pic_2
ElseIf $Pic_State == $Path_Pic_2 Then
;Hier wird abgefragt ob das Bild $Pic_State gleich zu $Path_Pic_2 ist.
GUICtrlSetImage($GUI_PictureBox, $Path_Pic_1)
;Hier wird das Bild zu $Path_Pic_1 geändert
$Pic_State = $Path_Pic_1
;Hier wird der Inhalt von der Variable $Pic_State ersetzt durch $Path_Pic_1
EndIf
EndSwitch
WEnd
Besser kann ichs mir nicht vorstellen 
|
Ähhh ok Danke Danke jetzt verstehe ich! Habe nicht dran gedacht das Case ja Klick ist :P ok dann ist es einfach danke danke
|
|
|
 |
Similar Threads
|
Bild anklicken, dann öffnet sich ein Fenster mit dem Bild in der Mitte
07/02/2012 - Web Development - 3 Replies
N'Abend Leuts.
Ich habe endlich mein Portfolio Fertig :D
So. Ich habe im Content ein Bild, welches klein ist. Ich habe dann zum Bild ein Link eingefügt zum original Bild. Also wenn man das kleine anklickt, wird man z.B zum link www.deinehp.de/bild.jpg geleitet. Man sieht das ganze Bild oben links, und aussenrum alles weiß.
Meine Frage ist wie mache ich, dass wenn man das kleine anklickt, ein schönes sozusagen Pop Up rauskommt und man das Bild in der MItte sieht, und die Homepage auch...
|
get picturebox image name
03/18/2012 - .NET Languages - 2 Replies
Hallöchen...
Ich würde gerne wissen wie ich den Namen von dem Bild einer Picturebox bekomme..
ich setzte das Bild wärend der Laufzeit so:
Code:
((PictureBox)obj).Image = Resource.WasserU;
und später möchte ich einfach den Namen der Ressource wieder herausfinden...
|
[VB 2010] Bild aus PictureBox auf FTP Server hochladen
07/15/2011 - .NET Languages - 11 Replies
Wie kann ich ein Bild aus einer PictureBox direkt auf ein FTP Server hochladen ohne sie vorher auf den Computer zu speichern?
Ich habe schon viele Codes ausprobiert aber es Funktioniert nicht!
Ich habe schon Text oder abgespeicherte Dateien hochgeladen aber Bilder aus einer PictureBox hochladen geht nicht.
Ich wäre euch dankbar, wenn ihr mir hilft und den Code schreibt. :)
|
VB captcha bild in picturebox übertragen
01/20/2011 - .NET Languages - 1 Replies
wie kann ich eine captcha von einer internet seite in eine picturebox übertragen ?
|
VisualBasic Bild in Picturebox einfügen!
12/16/2009 - General Coding - 6 Replies
Hallo Leute,
Ich bin dabei bei meinem Taschenrechner ein Bild einzufügen. Ich bin ein Anfänger also hab nicht Sehr viel Ahnung aber soweit ich weis ist es richtig!
Dabei Markert er mir das LoadPicture an und sagt es sei nicht bekannt :(
Könnt ihr mir helfen?
Dankeschön
Mfg MiesMuschel
|
All times are GMT +1. The time now is 05:47.
|
|