Okano
asked on
Very simple problem but I am too stupid :(
************************** ********** ******
Declerations:
DIM Screen(20) as String
Private Sub Command1_Click()
For H = 1 To Picture1.Height - 15 Step 15
For W = 1 To Picture1.Width - 15 Step 15
Colorvalue$ = Right$("0000" + Hex$((Picture1.Point(W, H))), 6)
Blue = Val("&H" + Mid$(Colorvalue$, 1, 2))
L$ = L$ + Chr$(blau)
Next
Command2.Caption = Int((H / Picture1.Height) * 100) + "%"
Next
Screen(1) = "Hallo"
End Sub
***************
Why I get "Laufzeitfehler 13 - Typen unverträglich!" ???
Declerations:
DIM Screen(20) as String
Private Sub Command1_Click()
For H = 1 To Picture1.Height - 15 Step 15
For W = 1 To Picture1.Width - 15 Step 15
Colorvalue$ = Right$("0000" + Hex$((Picture1.Point(W, H))), 6)
Blue = Val("&H" + Mid$(Colorvalue$, 1, 2))
L$ = L$ + Chr$(blau)
Next
Command2.Caption = Int((H / Picture1.Height) * 100) + "%"
Next
Screen(1) = "Hallo"
End Sub
***************
Why I get "Laufzeitfehler 13 - Typen unverträglich!" ???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Both '+' and '&' will work.
The norm is to use '&' to avoid confusion with numeric calculations.
The norm is to use '&' to avoid confusion with numeric calculations.
Command2.Caption = Int((H / Picture1.Height) * 100) & "%"
Not 100) + "%"
Give points to mark2150 if answer is accepted