Results 1 to 35 of 35

Thread: Need some help with my code

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2012
    Posts
    33

    Need some help with my code

    Hi, everyon. I want to add folders and beable to open and nothing is there and i want to put files there just like windows and I have a text editor that i made and i want to be able to save it to that folder to my main form here is what the code i have now, and what this code dose is make items like programs added to my menu list.

    This code is under my menu when click.

    Code:
    Public Parent As Form
    Public ChildFrm As Form
    Private GC As Boolean
    Public Root As Boolean
    Public Folder As String
    Public Li As Long
    Public MO As Boolean
    Private t As Byte
    Private rC As Boolean
    
    Private Sub Form_Load()
    
    Li = -1
    If Function_Exist("user32", "SetLayeredWindowAttributes") = True Then SetLayered Me.hWnd, True, t
    
    WindowPos Me, 1
    
    End Sub
    
    Private Sub lblItem_Click(index As Integer)
    
    If lblFolder(index).Visible = True Then
    
        If GC Then ChildFrm.KillMenu
        Set ChildFrm = LoadMenu(Me, Folder & lblItem(index).Tag, Me.Top + Me.Li * 270 - 270, Me.Left + lblItem(index).Left + 1860)
            
        GC = True
        
    Else
    
        If Not Root Then Parent.KillMenu
        If GC Then ChildFrm.KillMenu
        
        If lblItem(index).Tag = "ADDSTART:" Then
        
            frmAddStart.Show
            
        ElseIf lblItem(index).Tag = "SHUTDOWN:" Then
        
            frmMain.wsckModule.SendData "CORE,SHUTDOWN,"
        
        Else
        
            frmMain.wsckModule.SendData "CORE,LOADESL," & lblItem(index).Tag
        
        End If
        
        Unload Me
        
    End If
    
    End Sub
    
    Private Sub lblItem_MouseMove(index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
    
    If Li = index Then Exit Sub
    
    If Li <> -1 Then lblItem(Li).ForeColor = vbBlack: lblFolder(Li).ForeColor = vbBlack
    Li = index
    lblItem(Li).ForeColor = vbWhite
    lblFolder(Li).ForeColor = vbWhite
    
    End Sub
    
    Private Sub tmrTrans_Timer()
    
    If t < 255 And Function_Exist("user32", "SetLayeredWindowAttributes") = True Then
    
        SetLayered Me.hWnd, True, t
        t = t + 5
    
    Else
    
        tmrTrans.Enabled = False
    
    End If
    
    End Sub
    
    Private Sub tmrClose_Timer()
    
    Dim x As Long, y As Long
    Dim k As Boolean
    
    x = GetX * 15: y = GetY * 15
    
    If x < Me.Left Then k = True
    If x > Me.Width + Me.Left Then k = True
    If y < Me.Top Then k = True
    If y > Me.Height + Me.Top Then k = True
    
    If MO = False And k = False Then MO = True
    If Not Root Then Parent.MO = True
    If GC Then k = False
    
    If k And MO And rC Then KillMenu (True)
    If k And MO Then
        rC = True
    Else
        rC = False
    End If
    
    End Sub
    
    Public Function KillMenu(Optional force As Boolean = False)
    
    On Error Resume Next
    
    If GC Then ChildFrm.KillMenu
    
    GC = False
    
    If Not force And MO Then Exit Function
    
    If Not Root Then Parent.KillMenu
    Unload Me
    
    End Function
    
    Public Function SetChildFrm(frm As Form)
    
    Set ChildFrm = frm
    
    End Function
    Attached Images Attached Images      

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width