I need this: see in the picture.
Attachment 30501
Please help me....
Printable View
I need this: see in the picture.
Attachment 30501
Please help me....
Ok, since you don't show any code all I can say is 'why don't you draw that...'
You see in vb 2010 i upload png picture and change design time control manualy. It no has any code. Its easy and fast. But in Vb6 if i upload png picture white area still show because that area is pictureBox. I Vb6design time is no manualy change pictureBox settings just like in Vb2010. So in order to manage do what i want to do in vb6 i need write code witch can make pictureBox white area transparent o disapear. I dont know how that code must be writen.
Attachment 30521
In this picture you see program with pictureBox witch is one of zodiac sings. Now i need add 12 zodiac sings and make that every sing show from curent answer.
My programs code is this:
I try add 12 picturebox with different names and make picBox visible = false.Code:If strAux >= "0321" And strAux <= "0420" Then
SDate.Caption = "Avinas"
psavt.Caption = "Įkvėpimas ir Drąsa"
psavn.Caption = "Impulsyvumas ir Nedisciplinuotumas"
kri.Caption = "Kantrybės"
trm.Caption = "Greit užsidega, greit perdega"
Tal.Caption = "Impulsas, Veiksmas, Energija"
Apie.Caption = " Apie tuos, kuriuos valdo impulsas"
tp.Caption = "Liūtas, Avinas, Jautis, Šaulys, Vandenis, Žuvys"
sns.Caption = "Vėžiu, Svarstyklėmis ir Ožiaragiu"
jr.Caption = "Nepriklausomybė"
dev.Caption = "Aš esu"
tll.Caption = "Plaktukas"
end if
Then i write this code:
And it work. When answer was "Avinas" then picBox show aries sing. And that i do with 12 zodiac sings. But now i came with problems:Code:If strAux >= "0321" And strAux <= "0420" Then
SDate.Caption = "Aries"
picBox1.visible = true (aries picture)
end if
1. Third zodiac sing not apears.
2. When first zodiac sings apear lets say "Aries" second time apear "Taurus" but when need show zodiac from "Taurus" sign to "Aries" it not work. Then i try write this code:
It work with only two picture. When i try in the same way add another zodiac in not apears. So can you know problem? I think it is code writen not corecly.Code:If strAux >= "0321" And strAux <= "0420" Then
SDate.Caption = "Aries"
picBox1.visible = true (aries)
picBox2.visible = false (taurus)
end if
If strAux >= "0421" And strAux <= "0521" Then
SDate.Caption = "Taurus"
picBox1.visible = false (aries)
picBox2.visible = true (taurus)
picBox1.visible = true (aries)
what I have highlighted in red should either not be there or should have a comment character in front of it. As is it is not valid code
I know that. In this code i put sample with name like (aries) so you can better understand witch code is wat. In program code is this.
You see picturebox1 is "aries", picturebox2 is "taurus" so in code end i writen wat is wat because when you see in picturebox1 you dont understand what purpose that code must be.Code:If strAux >= "0321" And strAux <= "0420" Then
SDate.Caption = "Aries"
picBox1.visible = true
picBox2.visible = false
end if
If strAux >= "0421" And strAux <= "0521" Then
SDate.Caption = "Taurus"
picBox1.visible = false
picBox2.visible = true
Wrong way to compare STRING FIELDS. Use a Function() and convert IF POSSIBLE.
Code:strAux >= "0321"
If you want to add comments to your code you should use the comment character so we know it is a comment otherwise we can not know that and as written the code would not have worked which is why I pointed it out.
where is strAux being assigned a value? Why are you using strings to compare a numeric value?
"Why are you using strings to compare a numeric value" - i using this because it is astrology program witch show info by date of birth. In picture you see 8 square, then must be writen numbers.
"where is strAux being assigned a value" - strAux being assigned to this value:
Code:If IsNumeric(Text1.Text) And _
IsNumeric(Text2.Text) And _
IsNumeric(Text3.Text) And _
IsNumeric(Text4.Text) And _
IsNumeric(Text5.Text) And _
IsNumeric(Text6.Text) And _
IsNumeric(Text7.Text) And _
IsNumeric(Text8.Text) Then
If Val(Text1.Text) <> 1 And Val(Text1.Text) <> 2 Then
MsgBox "Metai turi prasidėti skaičiuomi 1 ar 2", vbInformation, "Dėmesio!"
Exit Sub
End If
If Val(Text5.Text & Text6.Text) < 1 Or _
Val(Text5.Text & Text6.Text) > 12 Then
MsgBox "Mėnesiai turi būti tarp 01 ir 12", vbInformation, "Dėmesio!"
Exit Sub
End If
If Val(Text7.Text & Text8.Text) < 1 Or _
Val(Text7.Text & Text8.Text) > 31 Then
MsgBox "Dienos turi būti tarp 01 ir 31", vbInformation, "Dėmesio!"
Exit Sub
End If
intTotal1 = Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) + Val(Text7.Text) + Val(Text8.Text)
strTotal1 = Format(intTotal1, "00")
intTotal2 = Val(Left(strTotal1, 1)) + Val(Right(strTotal1, 1))
If intTotal2 > 9 Then
strTotal2 = Format(intTotal2, "00")
intTotal2 = Val(Left(strTotal2, 1)) + Val(Right(strTotal2, 1))
End If
Label1.Caption = Format(intTotal2)
Dim strAux As String
strAux = Text5.Text & Text6.Text & Text7.Text & Text8.Text
If strAux >= "0321" And strAux <= "0420" Then
I still have no clue why you would use strings when the values are numeric but that is beside the point what you are really looking for is a way to do a transparent image with a picture box. This is something I have not tryied to do. I know by default it is not supported but there are ways it can be done. Rather than me searching and giving you a link I suggest you do a search for somethign like VB6 transparent Picturebox and see what you turn up.
I did it my self with 12 picture. Only thing left is find out how remove picturebox white backround around picture. You can see first picture in this topic. If you are interesting what code i write solve my 12 picture, that is it this:
I do this with all 12 picture. Of course first i need disable all picture visible = false in desing property.Code:Pic1.Visible = True
Pic2.Visible = False
Pic3.Visible = False
Pic4.Visible = False
Pic5.Visible = False
Pic6.Visible = False
Pic7.Visible = False
Pic8.Visible = False
Pic9.Visible = False
Pic10.Visible = False
Pic11.Visible = False
Pic12.Visible = False
End if
Pic2.Visible = True
Pic3.Visible = False
Pic4.Visible = False
Pic5.Visible = False
Pic6.Visible = False
Pic7.Visible = False
Pic8.Visible = False
Pic9.Visible = False
Pic10.Visible = False
Pic11.Visible = False
Pic12.Visible = False
Pic1.Visible = False
End If
Pic3.Visible = True
Pic4.Visible = False
Pic5.Visible = False
Pic6.Visible = False
Pic7.Visible = False
Pic8.Visible = False
Pic9.Visible = False
Pic10.Visible = False
Pic11.Visible = False
Pic12.Visible = False
Pic1.Visible = False
Pic2.Visible = False
Because you probably NESTED all the loops into one. First fails, and it skips the rest...
Might want to POST the code as a sample, and upload that for someone (brave) to test it.
Like I said you are trying to do a transparent picture box which is not supported by default. Making pictures visible or invisible has nothing to do with it. Did you try the search I suggested? You indicated that you could do it in VB.Net, why are you not using VB.Net?
You misunderstand, my all program is transparent. PictureBox is not set that way and as a result we see white area around picture. Better way to deal with this is upload a png picture then set transparent picturebox backround. It works i tray do that. Problems is whether you set picturebox transparent or not, it will be that box backround. If you try set picturebox opacisy to zero then disapears that box.
I solve my problems, now program is build to exe file. I run it and tested, it works without any errors. I dont use VB.Net because i have vb6 and vb2010 express.
Who better, vb6 or vb.net? Vb2010 express too difficult to me.
VB2010 is VB.Net, in fact all versions of VB after 1998 are VB.Net
VB6 is VB1998
I'm not surprised that I missunderstood, very hard to determine what you are saying in most of the posts here. It sure sound slike you are trying to get a transparent background on a picture box though.