VERSION 5.00 Begin VB.Form Main BackColor = &H00004000& BorderStyle = 1 'Fixed Single ClientHeight = 8100 ClientLeft = 150 ClientTop = 720 ClientWidth = 11250 LinkTopic = "Form1" MaxButton = 0 'False ScaleHeight = 8100 ScaleWidth = 11250 StartUpPosition = 3 'Windows Default Begin VB.TextBox Text2 Height = 285 Left = 1440 TabIndex = 60 Text = "Text2" Top = 2400 Width = 735 End Begin VB.CommandButton BtAddWinding Caption = "Add Winding" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 1080 TabIndex = 36 Top = 1920 Width = 1335 End Begin VB.Frame FrmWinding BackColor = &H000080FF& BorderStyle = 0 'None Caption = "Primary" Height = 495 Index = 0 Left = 3480 TabIndex = 35 Top = 600 Width = 7695 Begin VB.TextBox TxDia Alignment = 1 'Right Justify BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Index = 0 Left = 1560 TabIndex = 52 Text = "9999" Top = 120 Width = 615 End Begin VB.TextBox TxTurns Alignment = 1 'Right Justify BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Index = 0 Left = 2280 TabIndex = 46 Text = "9999" Top = 120 Width = 615 End Begin VB.TextBox TxAmps Alignment = 1 'Right Justify BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Index = 0 Left = 840 TabIndex = 45 Text = "9999" Top = 120 Width = 615 End Begin VB.TextBox TxVolts Alignment = 1 'Right Justify BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Index = 0 Left = 120 TabIndex = 42 Text = "9999" Top = 120 Width = 615 End Begin VB.Label LbHeight Alignment = 1 'Right Justify BackStyle = 0 'Transparent Caption = "9999" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Index = 0 Left = 6600 TabIndex = 59 Top = 165 Width = 495 End Begin VB.Label LbLayers Alignment = 1 'Right Justify BackStyle = 0 'Transparent Caption = "9999" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Index = 0 Left = 5760 TabIndex = 56 Top = 165 Width = 495 End Begin VB.Label LbLenght Alignment = 1 'Right Justify BackStyle = 0 'Transparent Caption = "9999" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Index = 0 Left = 4680 TabIndex = 55 Top = 160 Width = 495 End Begin VB.Label LbRealV Alignment = 1 'Right Justify BackStyle = 0 'Transparent Caption = "9999" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Index = 0 Left = 3840 TabIndex = 54 Top = 165 Width = 495 End Begin VB.Label LbOhms Alignment = 1 'Right Justify BackStyle = 0 'Transparent Caption = "9999" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Index = 0 Left = 3120 TabIndex = 53 Top = 160 Width = 495 End End Begin VB.Frame FrmCore BackColor = &H00808080& Caption = "Core" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 4095 Left = 120 TabIndex = 10 Top = 3840 Width = 2775 Begin VB.ComboBox CbSteel BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = 1200 TabIndex = 40 Text = "Steel" Top = 2400 Width = 1215 End Begin VB.TextBox Text1 Alignment = 2 'Center BackColor = &H00FFFFFF& BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = 1680 TabIndex = 38 Top = 3720 Width = 555 End Begin VB.ComboBox CbCore BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = 1200 TabIndex = 33 Text = "Cores" Top = 240 Width = 1215 End Begin VB.TextBox TxSectFer Alignment = 2 'Center BackColor = &H00E0E0E0& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = 1560 TabIndex = 19 Top = 720 Width = 800 End Begin VB.TextBox TxFeKg Alignment = 2 'Center BackColor = &H00E0E0E0& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = 1560 TabIndex = 18 Top = 960 Width = 800 End Begin VB.TextBox TxFeLen Alignment = 2 'Center BackColor = &H00E0E0E0& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = 1560 TabIndex = 17 Top = 1200 Width = 800 End Begin VB.TextBox TxCuH Alignment = 2 'Center BackColor = &H00E0E0E0& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = 1560 TabIndex = 16 Top = 1440 Width = 800 End Begin VB.TextBox TxCuW Alignment = 2 'Center BackColor = &H00E0E0E0& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = 1560 TabIndex = 15 Top = 1680 Width = 800 End Begin VB.TextBox TxCuMLen Alignment = 2 'Center BackColor = &H00E0E0E0& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = 1560 TabIndex = 14 Top = 1920 Width = 800 End Begin VB.CommandButton BtNewCore Caption = "Create" Height = 255 Left = 120 TabIndex = 13 Top = 3000 Width = 800 End Begin VB.CommandButton BtEditCore Caption = "Edit" Height = 255 Left = 120 TabIndex = 12 Top = 3360 Width = 800 End Begin VB.CommandButton BtDeleteCore Caption = "Delete" Height = 255 Left = 120 TabIndex = 11 Top = 3720 Width = 800 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Steel Grade" Height = 195 Index = 11 Left = 240 TabIndex = 41 Top = 2450 Width = 840 End Begin VB.Label Label2 BackStyle = 0 'Transparent Caption = "mm" Height = 255 Index = 6 Left = 2280 TabIndex = 39 Top = 3810 Width = 495 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Gap" Height = 195 Index = 10 Left = 1320 TabIndex = 37 Top = 3810 Width = 300 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Type / Name" Height = 195 Index = 9 Left = 240 TabIndex = 32 Top = 330 Width = 945 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "AFe" Height = 195 Index = 5 Left = 240 TabIndex = 31 Top = 720 Width = 285 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "mFe" Height = 195 Index = 3 Left = 240 TabIndex = 30 Top = 960 Width = 300 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "MPL" Height = 195 Index = 4 Left = 240 TabIndex = 29 Top = 1200 Width = 330 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Bobbin height" Height = 195 Index = 6 Left = 240 TabIndex = 28 Top = 1440 Width = 975 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Bobbin width" Height = 195 Index = 7 Left = 240 TabIndex = 27 Top = 1680 Width = 915 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Mean turn length" Height = 195 Index = 8 Left = 240 TabIndex = 26 Top = 1920 Width = 1200 End Begin VB.Label Label2 BackStyle = 0 'Transparent Caption = "cm²" Height = 255 Index = 0 Left = 2400 TabIndex = 25 Top = 720 Width = 495 End Begin VB.Label Label2 BackStyle = 0 'Transparent Caption = "Kg" Height = 255 Index = 1 Left = 2400 TabIndex = 24 Top = 960 Width = 495 End Begin VB.Label Label2 BackStyle = 0 'Transparent Caption = "cm" Height = 255 Index = 2 Left = 2400 TabIndex = 23 Top = 1200 Width = 495 End Begin VB.Label Label2 BackStyle = 0 'Transparent Caption = "mm" Height = 255 Index = 3 Left = 2400 TabIndex = 22 Top = 1440 Width = 495 End Begin VB.Label Label2 BackStyle = 0 'Transparent Caption = "mm" Height = 255 Index = 4 Left = 2400 TabIndex = 21 Top = 1680 Width = 495 End Begin VB.Label Label2 BackStyle = 0 'Transparent Caption = "cm" Height = 255 Index = 5 Left = 2400 TabIndex = 20 Top = 1920 Width = 495 End End Begin VB.Frame FrmGlobal BackColor = &H00008000& Caption = "Global Specs" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 1575 Left = 120 TabIndex = 0 Top = 120 Width = 2775 Begin VB.TextBox TPowerG Alignment = 2 'Center BackColor = &H00C0FFC0& BeginProperty Font Name = "Microsoft Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = 1800 TabIndex = 6 Text = "20" Top = 1080 Width = 735 End Begin VB.TextBox TIndG Alignment = 2 'Center BackColor = &H00C0FFC0& BeginProperty Font Name = "Microsoft Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = 1800 TabIndex = 5 Text = "1.2" Top = 720 Width = 735 End Begin VB.TextBox TFreqG Alignment = 2 'Center BackColor = &H00C0FFC0& BeginProperty Font Name = "Microsoft Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = 1800 TabIndex = 4 Text = "50" Top = 360 Width = 735 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Power (Watt)" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 195 Index = 2 Left = 120 TabIndex = 3 Top = 1080 Width = 1125 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Frequency (Hz)" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 195 Index = 1 Left = 120 TabIndex = 2 Top = 360 Width = 1305 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Induction (Tesla)" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 195 Index = 0 Left = 120 TabIndex = 1 Top = 720 Width = 1455 End End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Height" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 195 Index = 20 Left = 10080 TabIndex = 58 Top = 240 Width = 570 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Layers" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 195 Index = 19 Left = 9120 TabIndex = 57 Top = 240 Width = 570 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Lenght" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 195 Index = 18 Left = 8160 TabIndex = 51 Top = 240 Width = 600 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Real V" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 195 Index = 17 Left = 7320 TabIndex = 50 Top = 240 Width = 585 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Ohms" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 195 Index = 16 Left = 6600 TabIndex = 49 Top = 240 Width = 480 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Dia" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 195 Index = 15 Left = 5160 TabIndex = 48 Top = 240 Width = 300 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Turns" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 195 Index = 14 Left = 5760 TabIndex = 47 Top = 240 Width = 495 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Amps" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 195 Index = 13 Left = 4320 TabIndex = 44 Top = 240 Width = 465 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Volts" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 195 Index = 12 Left = 3600 TabIndex = 43 Top = 240 Width = 435 End Begin VB.Label Label3 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Bobin" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 195 Left = 240 TabIndex = 34 Top = 1800 Width = 495 End Begin VB.Label LbWinding BackColor = &H000080FF& Height = 735 Index = 0 Left = 240 TabIndex = 9 Top = 2880 Width = 2535 End Begin VB.Label LbBobH AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "H (mm)" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 195 Left = 2520 TabIndex = 8 Top = 1920 Width = 600 End Begin VB.Label LbBobW AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "W (mm)" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 195 Left = 240 TabIndex = 7 Top = 2040 Width = 645 End Begin VB.Line Lbobin BorderColor = &H00FFFFFF& BorderWidth = 3 Index = 2 X1 = 2880 X2 = 120 Y1 = 3720 Y2 = 3720 End Begin VB.Line Lbobin BorderColor = &H00FFFFFF& BorderWidth = 3 Index = 1 X1 = 2880 X2 = 2880 Y1 = 2280 Y2 = 3720 End Begin VB.Line Lbobin BorderColor = &H00FFFFFF& BorderWidth = 3 Index = 0 X1 = 120 X2 = 120 Y1 = 2280 Y2 = 3720 End Begin VB.Menu MnuProject Caption = "Project" Begin VB.Menu MnuNew Caption = "New" Begin VB.Menu MnuPower Caption = "Power" End Begin VB.Menu MnuOutput Caption = "Output" End End Begin VB.Menu MnuOpen Caption = "Open" End Begin VB.Menu MnuSaveAs Caption = "Save as ..." End Begin VB.Menu MnuSave Caption = "Save" End End End Attribute VB_Name = "Main" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Sub FillCbSteel() Dim S As String Dim T As String Dim I As Integer S = GetFileListe(App.Path & "\*.dat") CbSteel.Clear I = 1 T = Substring(S, I, ",") Do While Len(T) CbSteel.AddItem Substring(T, 1, ".") I = I + 1 T = Substring(S, I, ",") Loop CbSteel.ListIndex = 0 End Sub Private Function FillCoreTbl() Dim S As String Dim T As String Dim L As Integer Dim C As Integer Dim I As Integer Dim J As Integer S = GetKeysInSection(App.Path & "\core.tbx", "EI") L = CountStrings(S, ",") 'Compte les entrées T = GetIniString(App.Path & "\Core.tbx", "EI", Substring(S, 1, ",")) 'Lit la première entrée C = 1 + CountStrings(T, ",") 'Compte les éléments ReDim CoreTbl(L, C) 'Dimensionne le tableau For I = 1 To L 'Rempli le tableau J = 0 CoreTbl(I, J) = Substring(S, I, ",") T = GetIniString(App.Path & "\Core.tbx", "EI", Substring(S, I, ",")) For J = 1 To C CoreTbl(I, J) = Val(Substring(T, J, ",")) Next J Next I End Function Private Sub FillLstCore(Order As Boolean) Dim Col As Integer Dim I As Integer Dim TC As Boolean TC = Changed If Order Then TrieTableau CoreTbl, 1, 2 Else TrieTableau CoreTbl, 0, 1 End If CbCore.Clear For I = 1 To UBound(CoreTbl, 1) CbCore.AddItem CoreTbl(I, 0) Next I CbCore.ListIndex = 0 Changed = TC End Sub Private Sub SaveCore() WriteIniString App.Path & "\Core.tbx", "EI", TxName.Text, TxSectFer.Text & "," & TxFeKg.Text & "," & TxFeLen.Text & "," & TxCuH.Text _ & "," & TxCuW.Text & "," & TxCuMLen.Text CoreChanged = False End Sub Private Sub ClearCore() ' TxName.Text = "" TxSectFer.Text = "" TxFeKg.Text = "" TxFeLen.Text = "" TxCuH.Text = "" TxCuW.Text = "" TxCuMLen.Text = "" TxName.SetFocus CoreChanged = False End Sub Private Sub FillCore(CoreName As String) Dim S As String S = CoreName & "," & GetIniString(App.Path & "\Core.tbx", "EI", CoreName) ' TxName.Text = Substring(S, 1, ",") TxSectFer.Text = Substring(S, 2, ",") TxFeKg.Text = Substring(S, 3, ",") TxFeLen.Text = Substring(S, 4, ",") TxCuH.Text = Substring(S, 5, ",") LbBobH.Caption = TxCuH.Text & " mm" TxCuW.Text = Substring(S, 6, ",") LbBobW.Caption = TxCuW.Text & " mm" TxCuMLen = Substring(S, 7, ",") CoreChanged = False End Sub 'Private Sub Refresh(Core As String) 'Dim S As String ' ' S = Core & "," & GetIniString(App.Path & "\Core.tbx", "EI", Core) ' FillCore S 'End Sub Private Sub BtCore_Click() AddCore.Show AddCore.Top = Me.Top + BtCore.Top AddCore.Left = Me.Left + BtCore.Left End Sub Private Sub BtAddWinding_Click() NewWinding End Sub Private Sub CbCore_Click() FillCore CbCore.Text End Sub Private Sub CbSteel_Click() CoreData = App.Path & "\" & CbSteel.Text & ".dat" End Sub Private Sub Form_Load() FillCoreTbl FillLstCore (True) FillCbSteel End Sub Private Sub MnuOutput_Click() NewOutput End Sub Private Sub MnuPower_Click() NewPower End Sub Sub NewPower() AskForSave FrmGlobal.Visible = True TPowerG.Text = "0" FrmGlobal.Height = 100 Caption = "New Power" Tmax = 1.5 ShowBobin True End Sub Sub NewOutput() AskForSave FrmGlobal.Visible = True TPowerG.Text = "0" FrmGlobal.Height = 100 Caption = "New Output" ShowBobin True End Sub Sub ShowBobin(Show As Boolean) Dim I As Integer For I = 0 To 2 Lbobin(I).Visible = Show Next I LbBobH.Visible = Show LbBobW.Visible = Show End Sub Private Sub TFreqG_KeyPress(KeyAscii As Integer) Dim CC As Control Set CC = TFreqG IncDec CC, KeyAscii, 5, "###0" End Sub Sub IncDec(CControl As Control, key As Integer, Step As Single, Sf As String) Dim Value As Single Value = Val(CControl.Text) CControl.Tag = CControl.Text Select Case Chr(key) Case "+" Value = Value + Step CControl.Text = Format(Value, Sf) key = 0 Case "-" If Value >= Step Then Value = Value - Step CControl.Text = Format(Value, Sf) key = 0 End Select End Sub Private Sub TIndG_Change() Dim Value As Single Value = Val(TIndG.Text) If Value > 0 And Value <= Tmax Then TIndG.ForeColor = vbBlack Compute Else Beep TIndG.Text = TIndG.Tag ' If Value > Tmax Then TIndG.Text = Format(Tmax, "0.00") TIndG.ForeColor = vbRed End If End Sub Private Sub TIndG_KeyPress(KeyAscii As Integer) Dim CC As Control Set CC = TIndG IncDec CC, KeyAscii, 0.01, "0.00" End Sub Private Sub TPowerG_KeyPress(KeyAscii As Integer) Dim CC As Control Set CC = TPowerG IncDec CC, KeyAscii, 1, "##0" End Sub Private Sub NewWinding() If NbWinding <= 8 Then NbWinding = NbWinding + 1 Load FrmWinding(NbWinding) With FrmWinding(NbWinding) .Top = FrmWinding(NbWinding - 1).Top + FrmWinding(NbWinding - 1).Height If (NbWinding Mod 2) And 1 = 1 Then 'Odd .BackColor = &H80C0FF End If .Visible = True End With Load TxVolts(NbWinding) TxVolts(NbWinding).Top = 2000 'TxVolts(NbWinding - 1).Top + FrmWinding(0).Height ' TxVolts(NbWinding).Container = FrmWinding(NbWinding) TxVolts(NbWinding).Visible = True TxVolts(NbWinding).ZOrder Load TxAmps(NbWinding) Load TxDia(NbWinding) Load TxTurns(NbWinding) Load LbOhms(NbWinding) Load LbRealV(NbWinding) Load LbLenght(NbWinding) Load LbLayers(NbWinding) Load LbHeight(NbWinding) End If End Sub