Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

VB6 Errors


Superspyi
 Share

Recommended Posts

I'm very new to actually using VB6\.  I've used Eclipse for a very long time. I've used multiple different versions of it too.  Well, I was using the skywyre v6 engine and I asked about a question regarding classes and crashes related to it.  I was told how to fix it.  But when I'm in VB6 and edit the code and then go to recompile it I get "Compile error: Method or data member not found" and it highlights .Tabs in this section.

With frmEditor_Events

' set the tabs
.tabPages.Tabs.Clear
For I = 1 To tmpEvent.pageCount
.tabPages.Tabs.Add , , str(I)
Next

Could anybody please help me figure out what's going on?
Link to comment
Share on other sites

Sub EventEditorInit(eventNum As Long)
Dim I As Long
EditorEvent = eventNum
' copy the event data to the temp event
'CopyMemory ByVal VarPtr(tmpEvent), ByVal VarPtr(Map.Events(eventNum)), LenB(Map.Events(eventNum))
tmpEvent = Map.Events(eventNum)
frmEditor_Events.InitEventEditorForm
' populate form
With frmEditor_Events
' set the tabs
.tabPages.Tabs.Clear
For I = 1 To tmpEvent.pageCount
.tabPages.Tabs.Add , , str(I)
Next
' items
.cmbHasItem.Clear
.cmbHasItem.AddItem "None"
For I = 1 To MAX_ITEMS
.cmbHasItem.AddItem I & ": " & Trim$(Item(I).name)
Next

' variables
.cmbPlayerVar.Clear
.cmbPlayerVar.AddItem "None"
For I = 1 To MAX_VARIABLES
.cmbPlayerVar.AddItem I & ". " & Variables(I)
Next

' variables
.cmbPlayerSwitch.Clear
.cmbPlayerSwitch.AddItem "None"
For I = 1 To MAX_SWITCHES
.cmbPlayerSwitch.AddItem I & ". " & Switches(I)
Next

' name
.txtName.text = tmpEvent.name
' enable delete button
If tmpEvent.pageCount > 1 Then
.cmdDeletePage.Enabled = True
Else
.cmdDeletePage.Enabled = False
End If
.cmdPastePage.Enabled = False
' Load page 1 to start off with
curPageNum = 1
EventEditorLoadPage curPageNum
End With
' show the editor
frmEditor_Events.Show
End Sub

That's the whole section. I haven't modified the source code whatsoever. There was another error earlier, but that was fixed by adding a reference. Is there anything like that that would fix this?
Link to comment
Share on other sites

A reference is nothing but an another way to use an variable, using an existing memory address instead of making a new one for the method usage, i dont know how this can solve this problem.
Anyway, i found the component are you using, is the TabStrip component.
The method usage is correct, so the only visible problem is that you didnt set the project components or the VB didnt found it on start, so the component start as an PictureBox instead of a TabStrib, to be certain about this, please go to the frmEditor_Events and check if the tabPages is really an TabStrip and not a PictureBox.
Finally, try this method to solve:
-Open the Project tab > Components
-Select Microsoft Windows Common Controls 6.0
-Close the project and save only the .vbp one

If you dont have this component on your list, download MSCOMCTL.OCX and put it on your System32 folder, register the ocx using Windows + R > regsvr32 MSCOMCTL.OCX > Enter
Link to comment
Share on other sites

Alright I just did this and it hasn't helped me. I successfully registered it and replaced it. I put it in my SYSWOW64 folder, because that's what I was to do with the file because it said something about how it might not be compatible or whatever. But it's registered and when I go to Visual Basic I get "Errors during load. Refer to (path)\frmEditor_Events.log for details" Here's what the log says.

Line 1670: Class MSComctlLib.TabStrip of control tabCommands was not a loaded control class.
Line 3889: Class MSComctlLib.TabStrip of control tabPages was not a loaded control class.
Line 1676: The property name _ExtentX in tabCommands is invalid.
Line 1677: The property name _ExtentY in tabCommands is invalid.
Line 1678: The property name MultiRow in tabCommands is invalid.
Line 1679: The property name TabMinWidth in tabCommands is invalid.
Line 1680: The property name _Version in tabCommands is invalid.
Line 1691: The property name Tabs in tabCommands is invalid.
Line 3895: The property name _ExtentX in tabPages is invalid.
Line 3896: The property name _ExtentY in tabPages is invalid.
Line 3897: The property name MultiRow in tabPages is invalid.
Line 3898: The property name ShowTips in tabPages is invalid.
Line 3899: The property name TabMinWidth in tabPages is invalid.
Line 3900: The property name _Version in tabPages is invalid.
Line 3907: The property name Tabs in tabPages is invalid.

Also, when I try to enable Microsoft Windows Common Controls 6.0 I get "Object Library not Registered." and it doesn't apply it.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...