vb.net - How to rotate an image based on a parameter vb form -


i rotate image based on value of parameter in program. have class called daylightform.vb pulls it's data class called daylightparameters.vb. there property called "north" user inputs text box, , picture box arrow want rotate based on value of "north". , want update when user makes changes.

thoughts? thank you!

try using image class; rotateflip method:

dim bitmap1 bitmap  private sub initializebitmap()     try         bitmap1 = ctype(bitmap.fromfile("c:\documents , settings\all users\" _             & "documents\my music\music.bmp"), bitmap)         picturebox1.sizemode = pictureboxsizemode.autosize         picturebox1.image = bitmap1     catch ex system.io.filenotfoundexception         messagebox.show("there error. check path bitmap.")     end try    end sub   private sub button1_click(byval sender system.object, _     byval e system.eventargs) handles button1.click      if bitmap1 isnot nothing         bitmap1.rotateflip(rotatefliptype.rotate180flipy) '<- here magic!         picturebox1.image = bitmap1     end if   end sub 

Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -