Welcome, Guest.
Please login or register.
Converting Vb5 frm to X basic source
Forum Login
Login Name: Create a new account
Password:     Forgot password

XBLite Forum    General Boards    XBLite Programming  ›  Converting Vb5 frm to X basic source
Users Browsing Forum
No Members and 1 Guests

Converting Vb5 frm to X basic source  This thread currently has 4,785 views. Print Print Thread
1 Pages 1 Recommend Thread
OleControleXtension
September 28, 2010, 6:12pm Report to Moderator Report to Moderator
Baby Member
Posts: 4
i want to move some of my vb5 code into X basic lite
my vb programs use Ocx controls
i need help converting my vb5 form into an X basic lite source file
how does x basic load Ocx Does it use the Win95~6.1/7 ole dlls A library like Atl or threw internet exploiter
can it specify Globally unique identifier And file name
the vb5 frm is as follows

'{Vb5 FRM as follows this text is not part of it}


VERSION 5.00
Object = "{EF63EC2B-B221-4644-97D9-2C8FB420FAAB}#1.0#0"; "VB5Examples83.ocx"
Object = "{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0"; "fm20.dll"
Begin VB.Form Form1
BorderStyle = 1'Fixed Single
Caption = "Form1"
ClientHeight= 3015
ClientLeft= 45
ClientTop = 435
ClientWidth = 4575
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3015
ScaleWidth= 4575
StartUpPosition = 3'Windows Default
Begin VB.TextBox Text1
Height= 285
IMEMode = 3'DISABLE
Left= 0
TabIndex= 4
Top = 0
Width = 495
End
Begin VB.CommandButton Command1
Height= 375
Left= 120
TabIndex= 3
Top = 2040
Width = 855
End
Begin VB5Examples83.Example342 Example342ONE
Height= 753
Left= 0
TabIndex= 0
Top = 0
Width = 1143
_ExtentX= 2011
_ExtentY= 1323
End
Begin MSForms.SpinButton SpinButton2
Height= 855
Left= 960
TabIndex= 2
Top = 2040
Width = 495
Size= "873;1508"
End
Begin MSForms.SpinButton SpinButton1
Height= 495
Left= 120
TabIndex= 1
Top = 2400
Width = 855
Size= "1508;873"
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Text1.Left = "0"
Text1.Top = "0"
End Sub
Private Sub SpinButton1_SpinDown()
Text1.Left = CLng(Text1.Left) - CLng(15)
Example342ONE.Dinner1 = Text1.Left
Example342ONE.Dinner2 = Text1.Top
End Sub
Private Sub SpinButton1_SpinUp()
Text1.Left = CLng(Text1.Left) + CLng(15)
Example342ONE.Dinner1 = Text1.Left
Example342ONE.Dinner2 = Text1.Top
End Sub
Private Sub SpinButton2_SpinDown()
Text1.Top = CLng(Text1.Top) + CLng(15)
Example342ONE.Dinner1 = Text1.Left
Example342ONE.Dinner2 = Text1.Top
End Sub
Private Sub SpinButton2_SpinUp()
Text1.Top = CLng(Text1.Top) - CLng(15)
Example342ONE.Dinner1 = Text1.Left
Example342ONE.Dinner2 = Text1.Top
End Sub


'{End of Vb5 FRM this text is also not part of it}
Logged Offline
Private Message Private message
Guy1954
October 3, 2010, 8:40pm Report to Moderator Report to Moderator

Medium Member
Posts: 187
Hi former VB5ist,

OCX is a specificity of Visual Basic: XBLite is not able to use them "natively". You'll have to port the OCX from VB to XBLite.

I made sure that viXen could import the VB5 form you posted.

Object = "{EF63EC2B-B221-4644-97D9-2C8FB420FAAB}#1.0#0"; "VB5Examples83.ocx"
Begin VB5Examples83.Example342 Example342ONE

is imported as
Example342ONE: custom control.

It means that you have to provide a class for your custom control Example342ONE as viXen pute the pushbutton class because it does not know the real class.
You have to provide this class to viXen by typing it yourself the correct class in field "Label:".

I did not see another way to handle this peculiar situation and I'm open to study alternate ways.

Bye! Guy

You can donwload viXen (project VisualXBLite Environment in SourceForge) at:
http://sourceforge.net/project....._v1_99u.exe/download
Logged Offline
Site Site Private Message Private message Reply: 1 - 6
OleControleXtension
October 3, 2010, 10:22pm Report to Moderator Report to Moderator
Baby Member
Posts: 4
alternate ways could be using a library like Atl
Logged Offline
Private Message Private message Reply: 2 - 6
Guy1954
October 4, 2010, 7:18am Report to Moderator Report to Moderator

Medium Member
Posts: 187
AFAIK, ATL is not an alternative. ATL is for C++, and XBLite is not object-oriented.
Logged Offline
Site Site Private Message Private message Reply: 3 - 6
OleControleXtension
October 4, 2010, 4:59pm Report to Moderator Report to Moderator
Baby Member
Posts: 4
It can also be used in Free Basic & C
maybe it could use atl thru a FB dll
Logged Offline
Private Message Private message Reply: 4 - 6
Guy1954
October 8, 2010, 10:57pm Report to Moderator Report to Moderator

Medium Member
Posts: 187
I never used ATL in my xblite projects so I have no information about its use.
What about posting your question at XBLite Google Group?
http://groups.google.fr/group/xblite
Logged Offline
Site Site Private Message Private message Reply: 5 - 6
OleControleXtension
October 11, 2010, 3:23pm Report to Moderator Report to Moderator
Baby Member
Posts: 4
Logged Offline
Private Message Private message Reply: 6 - 6
1 Pages 1 Recommend Thread
Print Print Thread

XBLite Forum    General Boards    XBLite Programming  ›  Converting Vb5 frm to X basic source

Thread Rating
There is currently no rating for this thread