Google

Rabu, 03 Oktober 2007

Custom Mouse Icon in VB6

  1. Create Add New Resource File in Menu Project.if you doesn’t see it, click Add-Ins then choice Add-In Manager. And you choice VB 6 Resource Editor, don’t forget if you want load this add-ins you must choice loaded/unload and load startup
  2. where you click Add New resource file, create name what you like and then click open, and there is a dialog form and u choice ok, id you want new create it
  3. there is 3 function add (cursor,bitmap,custom) , click add cursor and. Each cursor u add there is ID, ID can be change of name, if you close it you save it
  4. now, back a new form. Create a component which there is mouse icon procedure eg. Command button. First set mousepointer = custom 99
  5. write code form load

Command1.MouseIcon = LoadResPicture(101, 2)

And write code command button

Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

Command1.MouseIcon = LoadResPicture(102, 2)

End Sub

Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

Command1.MouseIcon = LoadResPicture(101, 2)

End Sub

  1. you can try use add bitmap or custom, custom I usualy for audio, why use resource editor?? Because where it compiled, you no need copy file resource (*.res), automaticly in exe

2 komentar:

tuanjuan_ mengatakan...

OK kite cobain yah....
btw dari bandung akang....??
sayah ada rumah di Lembang...
AAkang asli bandung??

Xeltra mengatakan...

:) ya. asli bandung. jgn panggil akang. saya bukan org sunda asli :)