big-dog1965 Posted January 8, 2009 Share Posted January 8, 2009 Anyone know of some software that will convert vb code to php Quote Link to comment https://forums.phpfreaks.com/topic/140079-visual-basic-to-php/ Share on other sites More sharing options...
RichardRotterdam Posted January 17, 2009 Share Posted January 17, 2009 if its a simple vb script you can just post it here . I think there are some web based translators around though Quote Link to comment https://forums.phpfreaks.com/topic/140079-visual-basic-to-php/#findComment-739028 Share on other sites More sharing options...
big-dog1965 Posted January 17, 2009 Author Share Posted January 17, 2009 well heres one, but really if there was some software might be better. I dont know if you all can do it with out other information, but let me know and Ill provide what ever I need to. DB Structure attached Option Compare Database Public XTrk_Name As String Public XTrk_Oper As String Public XTrk_Short_Name As String Public XTrk_Desc As String Public XTrk_ID As Long Public XHome_ID As Long Public XHomeSet As Boolean Public Sub SetHomeTrack() Dim VarX As Variant VarX = "" VarX = DLookup("[Trk_Name]", "Track_Master", "[Trk_Home] = True") If Nz([VarX], "") = "" Then XTrk_Name = "Points Management System" XHomeSet = False Else XTrk_Name = VarX XHomeSet = True End If VarX = "" VarX = DLookup("[Trk_Short_Name]", "Track_Master", "[Trk_Home] = True") If Nz([VarX], "") = "" Then XTrk_Short_Name = "Home Trk Not Setup" Else XTrk_Short_Name = VarX End If VarX = "" VarX = DLookup("[Trk_Oper]", "Track_Master", "[Trk_Home] = True") If Nz([VarX], "") = "" Then XTrk_Oper = "Home Oper Not Setup" Else XTrk_Oper = VarX End If VarX = "" VarX = DLookup("[Trk_Desc]", "Track_Master", "[Trk_Home] = True") If Nz([VarX], "") = "" Then XTrk_Desc = "Home Desc Not Setup" Else XTrk_Desc = VarX End If VarX = "" VarX = DLookup("[Trk_ID]", "Track_Master", "[Trk_Home] = True") If Nz([VarX], "") = "" Then XTrk_ID = 0 XHome_ID = 0 Else XTrk_ID = VarX XHome_ID = VarX End If End Sub Function ParseTime(InTime, Outtime) 'Determine The Format For x = 1 To Len(InTime) If Mid(InTime, x, 1) < 0 Or Mid(InTime, x, 1) > 9 Then Mid(InTime, x, 1) = ":" End If Next x Outtime = InTime End Function Function IsLoaded(ByVal strFormName As String) As Integer ' Returns True if the specified form is open in Form view or Datasheet view. Const conObjStateClosed = 0 Const conDesignView = 0 If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> conObjStateClosed Then If Forms(strFormName).CurrentView <> conDesignView Then IsLoaded = True End If End If End Function Public Function GetHomeTrack(Track_Data, Get_Data) Select Case Get_Data Case 1 VarX = "" VarX = DLookup("[Trk_Name]", "Track_Master", "[Trk_Home] = True") Track_Data = VarX If Nz([VarX], "") = "" Then If Not IsLoaded("CM_TRK_MASTER_01") Then Msg = "You must setup at least one Track as the Home Track" & Chr(10) & Chr(13) Msg = Msg & "Open the Track Master Control Setup and Select a Home Track" MsgBox Msg Cancel = True End If Else Home_Setup = True End If Case 2 VarX = "" VarX = DLookup("[Trk_Short_Name]", "Track_Master", "[Trk_Home] = True") Track_Data = VarX Case 3 VarX = "" VarX = DLookup("[Trk_Oper]", "Track_Master", "[Trk_Home] = True") Track_Data = VarX Case 4 VarX = "" VarX = DLookup("[Trk_Desc]", "Track_Master", "[Trk_Home] = True") Track_Data = VarX Case 5 VarX = "" VarX = DLookup("[Trk_ID]", "Track_Master", "[Trk_Home] = True") Track_Data = VarX End Select VarX = "" End Function [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/140079-visual-basic-to-php/#findComment-739039 Share on other sites More sharing options...
RichardRotterdam Posted January 17, 2009 Share Posted January 17, 2009 here is a translator for you http://www.design215.com/toolbox/translator/trans_login.php it doesn't work perfect but it saves time and the not correct translated code can be done by hand Quote Link to comment https://forums.phpfreaks.com/topic/140079-visual-basic-to-php/#findComment-739058 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.