Menu principale:
... From ideas to projects ...
VERSION 5.00Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"Begin VB.Form Form4 Begin VB.CommandButton Command3 BackColor = &H00C0C0C0& Caption = "&ESCI" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 735 Left = 8760 Style = 1 'Graphical TabIndex = 21 Top = 7200 Width = 4695 End Begin VB.TextBox Text5 Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00000000& Enabled = 0 'False BeginProperty Font Name = "Arial" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 495 Left = 12720 TabIndex = 19 Text = "W" Top = 8040 Width = 735 End Begin VB.CommandButton Command1 BackColor = &H0000FF00& Caption = "&SALVA" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 975 Left = 8760 Style = 1 'Graphical TabIndex = 12 Top = 6000 Width = 4695 End Begin VB.CommandButton Command2 BackColor = &H00C0E0FF& Caption = "C&lear" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 9240 Style = 1 'Graphical TabIndex = 11 Top = 360 Width = 855 End Begin VB.ListBox List1 Appearance = 0 'Flat BeginProperty Font Name = "Arial" Size = 14.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 4980 Left = 120 TabIndex = 10 Top = 240 Width = 10095 End Begin VB.TextBox Text4 Appearance = 0 'Flat BeginProperty Font Name = "MS Sans Serif" Size = 13.5 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 10440 TabIndex = 1 Text = "Text4" Top = 2040 Width = 3015 End Begin VB.TextBox Text3 Appearance = 0 'Flat BeginProperty Font Name = "MS Sans Serif" Size = 13.5 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 10440 TabIndex = 0 Text = "Text3" Top = 720 Width = 3015 End Begin VB.TextBox Text2 Appearance = 0 'Flat BeginProperty Font Name = "MS Sans Serif" Size = 13.5 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 10440 TabIndex = 3 Text = "Text2" Top = 4800 Width = 3015 End Begin VB.TextBox Text1 Appearance = 0 'Flat BeginProperty Font Name = "MS Sans Serif" Size = 13.5 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 10440 TabIndex = 2 Text = "Text1" Top = 3480 Width = 3015 End Begin VB.Data Data1 Caption = "Data1" Connect = "Excel 3.0;" DatabaseName = "Articoli.xls" DefaultCursorType= 0 'DefaultCursor DefaultType = 2 'UseODBC Exclusive = 0 'False Height = 375 Left = 10440 Options = 0 ReadOnly = 0 'False RecordsetType = 0 'Table RecordSource = "listini$" Top = 7080 Visible = 0 'False Width = 1695 End Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 Bindings = "Form4.frx":0000 Height = 1935 Left = 120 TabIndex = 4 Top = 6600 Width = 8415 _ExtentX = 14843 _ExtentY = 3413 _Version = 393216 FixedCols = 0 ForeColorSel = 16777215 ScrollTrack = -1 'True Appearance = 0 BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 12 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin VB.Label Label13 Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00000000& Caption = "Metri" BeginProperty Font Name = "MS Sans Serif" Size = 24 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H0000FFFF& Height = 495 Left = 4320 TabIndex = 23 Top = 6000 Width = 3975 End Begin VB.Label Label12 Alignment = 1 'Right Justify Appearance = 0 'Flat BackColor = &H00E0E0E0& BorderStyle = 1 'Fixed Single Caption = "Salva su _ " BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H80000008& Height = 495 Left = 10440 TabIndex = 20 Top = 8040 Width = 2175 End Begin VB.Label Label11 BackStyle = 0 'Transparent Caption = "E" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H0080FF80& Height = 495 Left = 12600 TabIndex = 18 Top = 2520 Visible = 0 'False Width = 375 End Begin VB.Label Label10 BackStyle = 0 'Transparent Caption = "F" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H0080FF80& Height = 495 Left = 13080 TabIndex = 17 Top = 2520 Visible = 0 'False Width = 375 End Begin VB.Label Label9 BackStyle = 0 'Transparent Caption = "D" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H0080FF80& Height = 495 Left = 12120 TabIndex = 16 Top = 2520 Visible = 0 'False Width = 375 End Begin VB.Label Label8 BackStyle = 0 'Transparent Caption = "C" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H0080FF80& Height = 495 Left = 11640 TabIndex = 15 Top = 2520 Visible = 0 'False Width = 375 End Begin VB.Label Label7 BackStyle = 0 'Transparent Caption = "B" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H0080FF80& Height = 495 Left = 11160 TabIndex = 14 Top = 2520 Visible = 0 'False Width = 375 End Begin VB.Label Label6 BackStyle = 0 'Transparent Caption = "A" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H0080FF80& Height = 495 Left = 10680 TabIndex = 13 Top = 2520 Visible = 0 'False Width = 375 End Begin VB.Label Label5 Caption = "Ordine" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 10440 TabIndex = 9 Top = 1560 Width = 3015 End Begin VB.Label Label4 Caption = "Cliente" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 10440 TabIndex = 8 Top = 240 Width = 3015 End Begin VB.Label Label3 Caption = "Metri" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 10440 TabIndex = 7 Top = 4320 Width = 3015 End Begin VB.Label Label2 Caption = "Articolo" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 10440 TabIndex = 6 Top = 3000 Width = 3015 End Begin VB.Label Label1 Appearance = 0 'Flat BackColor = &H00000000& Caption = " Articolo" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H0000FFFF& Height = 495 Left = 120 TabIndex = 5 Top = 5400 Width = 13335 EndEndAttribute VB_Name = "Form4"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = FalsePrivate Sub Command1_Click()'SalvaSe_EsisteEnd SubPrivate Sub Command2_Click()List1.ClearText3.Text = ""Text3.SetFocusEnd SubPrivate Sub Command3_Click()Form1.Timer2.Enabled = TrueUnload MeEnd SubPrivate Sub Command4_Click() 'Data1.Recordset.Delete 'Data1.Recordset.MoveNext Text6.Text = "" Text7.Text = "" Text8.Text = "" Data1.Refresh MSFlexGrid1.Refresh Text1.Text = "" Text1.SetFocus Frame1.Visible = FalseEnd SubPrivate Sub Command5_Click()If Len(Trim(Text8.Text)) > 1 Then Data1.UpdateRecord Data1.Recordset.Bookmark = Data1.Recordset.LastModified Data1.Refresh MSFlexGrid1.RefreshEnd If Text1.Text = "" Text1.SetFocus Frame1.Visible = FalseEnd SubText5.Text = Form1.V1_DRV'Data1.DatabaseName = Form1.V1_DRV & ":\GES_PRO\Articoli.xls"Data1.DatabaseName = "C:\GES_PRO\Articoli.xls"End SubPrivate Sub Label6_Click()'Text4.Text = Text4.Text & "_A"End SubPrivate Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = vbKeyReturn Then Trova End IfEnd SubSub Trova()Dim Txt As StringNO_T = 0For a = 1 To MSFlexGrid1.Rows - 1 Txt = Trim(MSFlexGrid1.TextMatrix(a, 2)) & " " & Trim(MSFlexGrid1.TextMatrix(a, 3)) Label1.Caption = Trim(Txt) If Trim(Text1.Text) = Trim(Txt) Then Label1.Caption = Trim(MSFlexGrid1.TextMatrix(a, 2)) & " " & Trim(MSFlexGrid1.TextMatrix(a, 3)) & " " & Trim(MSFlexGrid1.TextMatrix(a, 4)) List1.AddItem Trim(MSFlexGrid1.TextMatrix(a, 2)) & " " & Trim(MSFlexGrid1.TextMatrix(a, 3)) List1.AddItem Trim(MSFlexGrid1.TextMatrix(a, 4)) NO_T = 1 Exit For End IfNextIf NO_T = 0 Then 'Dim K1 As String 'Dim K2 As String 'K1 = Left(Text1.Text, 4) 'K2 = Right(Text1.Text, 4) Label1.Caption = " ARTICOLO NON TROVATO !!! " MsgBox (" ARTICOLO NON TROVATO !!! ") Frame1.Visible = True Data1.Recordset.AddNew L1G = "" For A1 = 1 To Len(Trim(Text1.Text)) If Mid(Text1.Text, A1, 1) = " " Then L1G = A1 Next Text8.Text = Trim(Left(Text1.Text, L1G)) Text7.Text = Trim(Mid(Text1.Text, L1G)) Text6.SetFocusElse Text1.Text = "" Text2.SetFocusEnd IfLabel13.Caption = " "End SubPrivate Sub Text2_KeyPress(KeyAscii As Integer) If KeyAscii = vbKeyReturn Then List1.AddItem Text2.Text Label13.Caption = Text2.Text Text2.Text = "" Text1.SetFocus End IfEnd SubPrivate Sub Text3_KeyPress(KeyAscii As Integer) If KeyAscii = vbKeyReturn Then List1.AddItem Text3.Text Text4.Text = "" Text4.SetFocus End IfEnd SubPrivate Sub Text4_KeyPress(KeyAscii As Integer) If KeyAscii = vbKeyReturn Then List1.AddItem Text4.Text Text1.Text = "" Text1.SetFocus End IfEnd SubSub Salva() Dim FSO Dim NOME_F As String Set FSO = CreateObject("Scripting.FileSystemObject") NOME_F = Trim(Text3.Text) & "_" & Trim(Text4.Text) & ".txt" qualefile = Trim(Text5.Text) & ":\GES_PRO\Ordini\" & NOME_F Set a = FSO.CreateTextFile(qualefile, True) a.WriteLine Format(Date, "DDDD.dd.Mmmm.YYYY") & " " & "Ore " & Time a.WriteLine (" ") n = List1.ListCount - 1 For i = 0 To n List1.ListIndex = i a.Write List1.List(List1.ListIndex) 'vedi esempio precedente a.WriteLine (" ") Next i MsgBox ("Salvataggio Eseguito!") a.Close Set FSO = Nothing Set a = NothingEnd SubSub Se_Esiste() Dim FSO As Object Dim FIn As Object If Dir(qualefile) = Trim(Text3.Text) & "_" & Trim(Text4.Text) & ".txt" Then 'Dir1.Visible = False 'Set FIn = FSO.OpenTextFile(Qualefile) MsgBox ("ORDINATIVO GIA' MEMORIZZATO !!!") 'SName = FIn.ReadLine 'FIn.Close Else Disco = Trim(Text5.Text) If FSO.DriveExists(Disco) Then If FSO.GetDrive(Disco).IsReady Then If FSO.FolderExists(Trim(Text5.Text) & ":\GES_PRO\Ordini") Then Salva Else MsgBox ("Cartella " & Disco & ":\GES_PRO\Ordini Non Trovata !!!") Text5.SetFocus End If Else MsgBox ("Disco " & Disco & " Non Pronto !!!") Text5.SetFocus End If Else MsgBox ("Disco " & Disco & " Non Trovato !!!") Text5.SetFocus End If End If Set FSO = Nothing Set FIn = NothingEnd Sub
... Work in Progress ...
Home Page | Products | Projects | Start Up | Services | Contacts | Mappa del sito