home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 5.00 Object = "{48E59290-9880-11CF-9754-00AA00C00908}#1.0#0"; "MSINET.OCX" Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX" Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX" Begin VB.Form Form1 Caption = "HelpACoder" ClientHeight = 7695 ClientLeft = 2940 ClientTop = 2145 ClientWidth = 9180 Icon = "Form1.frx":0000 LinkTopic = "Form1" ScaleHeight = 7695 ScaleWidth = 9180 Begin MSComDlg.CommonDialog cd Left = 8520 Top = 6600 _ExtentX = 847 _ExtentY = 847 _Version = 393216 End Begin InetCtlsObjects.Inet Inet Left = 8520 Top = 7080 _ExtentX = 1005 _ExtentY = 1005 _Version = 393216 End Begin MSComctlLib.ListView list1 Height = 7695 Left = 0 TabIndex = 0 Top = 0 Width = 9135 _ExtentX = 16113 _ExtentY = 13573 LabelWrap = -1 'True HideSelection = -1 'True FullRowSelect = -1 'True _Version = 393217 ForeColor = -2147483640 BackColor = -2147483643 BorderStyle = 1 Appearance = 1 NumItems = 0 End Begin VB.Menu File Caption = "File" Begin VB.Menu Refresh Caption = "Refresh" End End Begin VB.Menu Tools Caption = "Tools" Begin VB.Menu Download Caption = "Download Selected" End Begin VB.Menu Upload Caption = "Upload" End Begin VB.Menu Email Caption = "Email" End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'This is an update to my last two versions of HelpACoder this one' 'now has the option to upload your files though right now it is ' 'sent to a request and i will check them before adding but i plan' 'to allow in future versions direct upload but there are two ' 'problems 1)I need to create a filter checking for already added ' 'projects under that name and other things. And 2) i dont know if' 'it will work im thinking what if two people try to upload at the' 'same time do to the way i deal with it one will be dropped if ' 'not both but im not sure the reason i think this is because it ' 'may load someone else saves then they save, it dropped the first' 'one, is there a way i can save a line to a file rather than ' 'loading and resaving? just like add a line no replacement at all' 'Please help thanks ' 'Please leave votes and comments. ' 'Thankyou for downloading this program. ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'If you use this source in your program do not give me credit in ' 'any way this code is now yours to use,though please do visit my ' 'Site www.jemisp.com/Visualcode ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'used to email Private Declare Function ShellExecute& Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) Private tlist As ListItem 'provides extra info on project Private Pinfo(5000) As String Public Sub GetNew() 'it will error if no connection On Error Resume Next ' 'dim some splitters Dim splitter() As String Dim split2() As String ' 'If it errors then we are done On Error GoTo done ' 'Load File frmSplash.Status.Caption = "Loading File..." Cfile = Inet.OpenURL("www.jemisp.com/Visualcode/Want.rsd", icString) 'Open App.Path & "\want.rsd" For Input As #1 'Do Until EOF(1) 'Line Input #1, temp 'Cfile = Cfile & temp & vbCrLf 'Loop 'Close #1 ' 'Split it into lines splitter() = Split(Cfile, vbCrLf) ' For i = 0 To (UBound(splitter) + 1) frmSplash.Status.Caption = "Adding Files..." 'info = the i number if i was 5 then the 5th number Info = splitter(i) split2() = Split(Info, " ' 'This command is what we use when adding to a listview Set tlist = list1.ListItems.Add ' 'this is what we want to add tlist.SubItems(1) = split2(0) tlist.SubItems(2) = split2(1) tlist.SubItems(3) = split2(2) tlist.SubItems(4) = split2(3) ' 'Put the info and download location in a variable 'for later use Pinfo(i) = split2(4) & " " & split2(5) & " " & split2(2) & " " & split2(0) ' Next i done: End Sub Private Sub Download_Click() If list1.ListItems.Count <= 0 Then Exit Sub On Error Resume Next 'dim a splitter Dim splitter() As String ' 'Tmp2 = selected projects info tmp2 = Pinfo(list1.SelectedItem.Index - 1) ' 'splitter = the split version of tmp2 splitter() = Split(tmp2, " ' 'If no downloadable file then leave sub If splitter(1) = "None" Then MsgBox "No Download Available": Exit Sub ' 'set the default extension for cd or Common Dialog cd.DefaultExt = Right(splitter(1), 4) cd.Filter = "Original File Type|*" & Right(splitter(1), 4) & "|" ' 'Make it make them save as original file extension cd.Filter = "Original File Type|*" & Right(splitter(1), 4) & "|" ' 'let them chose a destination to save to cd.ShowSave ' 'Check and be sure theres a file If cd.FileName = "" Then Exit Sub ' 'Now that we found where it is download it Splitter(1) is the url URLDownloadToFile 0, splitter(1), cd.FileName, 0, 0 ' End Sub Private Sub Email_Click() On Error Resume Next 'dim a splitter Dim splitter() As String ' 'Tmp2 = selected projects info tmp2 = Pinfo(list1.SelectedItem.Index - 1) ' 'splitter = the split version of tmp2 splitter() = Split(tmp2, " ' 'Email the person ShellExecute Form1.hwnd, "Open", "Mailto:" & splitter(2), "", "", True ' End Sub Private Sub Form_Load() 'Add an empty column list1.ColumnHeaders.Add 1, , "", 0 ' 'Add filled columns list1.ColumnHeaders.Add 2, , "Author", 2000 list1.ColumnHeaders.Add 3, , "Program Name", 3400 list1.ColumnHeaders.Add 4, , "E-mail", 2130 list1.ColumnHeaders.Add 5, , "Type", 1500 ' 'Now make it use the columns list1.View = lvwReport ' 'Get info GetNew ' End Sub Private Sub Form_Unload(Cancel As Integer) 'Close all forms End ' End Sub Private Sub list1_Click() On Error Resume Next 'dim a splitter Dim splitter() As String ' 'Tmp2 = selected projects info tmp2 = Pinfo(list1.SelectedItem.Index - 1) ' 'splitter = the split version of tmp2 splitter() = Split(tmp2, " ' 'Email the person Email.Caption = "Email " & splitter(3) ' End Sub Private Sub list1_DblClick() On Error Resume Next 'used because if nothing in the list it will error 'and if no internet connection found it will be empty On Error Resume Next ' 'dim a splitter Dim splitter() As String ' 'Tmp2 = selected projects info tmp2 = Pinfo(list1.SelectedItem.Index - 1) ' 'splitter = the split version of tmp2 splitter() = Split(tmp2, " ' 'The info textbox is = to the info Form2.Text1.Text = splitter(0) ' 'Show form2 Form2.Show ' End Sub Private Sub list1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) 'show the menu If Button And vbRightButton Then PopupMenu Tools, 23, x, y End If ' End Sub Private Sub Refresh_Click() 'empty the information variable For i = 0 To 5000 Pinfo(i) = "" Next i ' 'clear the list list1.ListItems.Clear ' 'Get New Info GetNew ' End Sub Private Sub Upload_Click() Form3.Show End Sub