Still doesn't work, here is what I have for my itemeditor:
Code:
Public Sub ItemEditorInit()
'****************************************************************
'* WHEN WHO WHAT
'* ---- --- ----
'* 07/12/2005 Shannara Added gfx constant.
'****************************************************************
'App.Path
frmItemEditor.picPic.Picture = LoadPicture(App.Path & GFX_PATH & "items" & GFX_EXT)
frmItemEditor.txtName.Text = Trim(Item(EditorIndex).Name)
frmItemEditor.scrlPic.Value = (Item(EditorIndex).Pic)
frmItemEditor.cmbType.ListIndex = Item(EditorIndex).Type
' Npc(EditorIndex).Sprite = frmNpcEditor.scrlSprite.Value
If (frmItemEditor.cmbType.ListIndex >= ITEM_TYPE_WEAPON) And (frmItemEditor.cmbType.ListIndex <= ITEM_TYPE_SHIELD) Then
frmItemEditor.fraEquipment.Visible = True
frmItemEditor.scrlDurability.Value = Item(EditorIndex).Data1
frmItemEditor.scrlStrength.Value = Item(EditorIndex).Data2
Else
frmItemEditor.fraEquipment.Visible = False
End If
If (frmItemEditor.cmbType.ListIndex >= ITEM_TYPE_POTIONADDHP) And (frmItemEditor.cmbType.ListIndex <= ITEM_TYPE_POTIONSUBSP) Then
frmItemEditor.fraVitals.Visible = True
frmItemEditor.scrlVitalMod.Value = Item(EditorIndex).Data1
Else
frmItemEditor.fraVitals.Visible = False
End If
If (frmItemEditor.cmbType.ListIndex = ITEM_TYPE_SPELL) Then
frmItemEditor.fraSpell.Visible = True
frmItemEditor.scrlSpell.Value = Item(EditorIndex).Data1
Else
frmItemEditor.fraSpell.Visible = False
End If
frmItemEditor.Show vbModal
End Sub
Public Sub ItemEditorOk()
Item(EditorIndex).Name = frmItemEditor.txtName.Text
Item(EditorIndex).Pic = frmItemEditor.scrlPic.Value
Item(EditorIndex).Type = frmItemEditor.cmbType.ListIndex
If (frmItemEditor.cmbType.ListIndex >= ITEM_TYPE_WEAPON) And (frmItemEditor.cmbType.ListIndex <= ITEM_TYPE_SHIELD) Then
Item(EditorIndex).Data1 = frmItemEditor.scrlDurability.Value
Item(EditorIndex).Data2 = frmItemEditor.scrlStrength.Value
Item(EditorIndex).Data3 = 0
End If
If (frmItemEditor.cmbType.ListIndex >= ITEM_TYPE_POTIONADDHP) And (frmItemEditor.cmbType.ListIndex <= ITEM_TYPE_POTIONSUBSP) Then
Item(EditorIndex).Data1 = frmItemEditor.scrlVitalMod.Value
Item(EditorIndex).Data2 = 0
Item(EditorIndex).Data3 = 0
End If
If (frmItemEditor.cmbType.ListIndex = ITEM_TYPE_SPELL) Then
Item(EditorIndex).Data1 = frmItemEditor.scrlSpell.Value
Item(EditorIndex).Data2 = 0
Item(EditorIndex).Data3 = 0
End If
Call SendSaveItem(EditorIndex)
InItemsEditor = False
Unload frmItemEditor
End Sub
Public Sub ItemEditorCancel()
InItemsEditor = False
Unload frmItemEditor
End Sub
Public Sub ItemEditorBltItem()
Call BitBlt(frmItemEditor.picPic.hdc, 0, 0, PIC_X, PIC_Y, frmItemEditor.picItems.hdc, 0, frmItemEditor.scrlPic.Value * PIC_Y, SRCCOPY)
End Sub
Private Sub tmrPic_Timer()
Call ItemEditorBltItem
End Sub
Can you see any problem?