看板 Visual_Basic 關於我們 聯絡資訊
我在VB2005弄了一個picturebox1(名稱亂取的) 也弄了一個imgList 然後我把picturebox1的BackgroundImage設成imgList的圖形 picturebox.BackgroundImage = imgList.image(0) 然後我想判斷如果picturebox1圖形是imgList的圖形就做某某動作 可是我寫 If picturebox1.BackgroundImage Is imgList.image(0) Then Msgbox("HAHA") 判斷出來的結果卻是不符合 但如果我改成加個picturebox2 然後判斷picturebox1.BackgroundImage Is picturebox2.BackgroundImage 這樣卻可以順利判斷,請問有人能告訴我為什麼嗎? 是imgList不能拿來做判斷嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.59.68.3
rocksan:Is 運算子 應該是拿來判斷資料型別 08/18 16:34
catchtest:可是我用=卻有錯誤,請問可以告訴我怎麼改嗎? 08/19 19:12