/[cvs]/joko/ToolBox/Windows/VpnDial/src/Form_Main.frm
ViewVC logotype

Annotation of /joko/ToolBox/Windows/VpnDial/src/Form_Main.frm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Wed Sep 28 20:36:46 2005 UTC (18 years, 9 months ago) by joko
Branch: MAIN
+ initial commit

1 joko 1.1 VERSION 5.00
2     Begin VB.Form Form_Main
3     Caption = "VpnDial"
4     ClientHeight = 3525
5     ClientLeft = 60
6     ClientTop = 345
7     ClientWidth = 6450
8     LinkTopic = "Form1"
9     ScaleHeight = 3525
10     ScaleWidth = 6450
11     StartUpPosition = 3 'Windows Default
12     Begin VB.CommandButton Command_RunScript
13     Caption = "&Run Script"
14     Height = 345
15     Left = 4770
16     TabIndex = 4
17     Top = 1560
18     Width = 1605
19     End
20     Begin VB.CommandButton Command_RouteAdd
21     Caption = "&Add Route"
22     Height = 345
23     Left = 4770
24     TabIndex = 3
25     Top = 1140
26     Width = 1605
27     End
28     Begin VB.CommandButton Command_Hangup
29     Caption = "&Hangup"
30     Height = 345
31     Left = 4770
32     TabIndex = 2
33     Top = 510
34     Width = 1605
35     End
36     Begin VB.CommandButton Command_Dial
37     Caption = "&Dial"
38     Height = 345
39     Left = 4770
40     TabIndex = 1
41     Top = 90
42     Width = 1605
43     End
44     Begin VB.ListBox List_Connections
45     Height = 3375
46     Left = 60
47     TabIndex = 0
48     Top = 60
49     Width = 4605
50     End
51     End
52     Attribute VB_Name = "Form_Main"
53     Attribute VB_GlobalNameSpace = False
54     Attribute VB_Creatable = False
55     Attribute VB_PredeclaredId = True
56     Attribute VB_Exposed = False
57     ' use http://www.codeproject.com/staticctrl/gifanimation.asp ???
58    
59     Option Explicit
60    
61     Private Sub Command_RunScript_Click()
62     Dim script_name As String, args As String
63    
64     script_name = "ip-up.bat"
65     args = Chr(34) & DetermineClientIP() & Chr(34)
66    
67     Shell App.Path & "\" & script_name & " " & args, vbNormalFocus
68    
69     End Sub
70    
71     Private Sub Form_Load()
72     Dim rasItem As RasEntryData
73     For Each rasItem In RasEntries
74     List_Connections.AddItem rasItem.entryname
75     Next
76     End Sub
77    
78     Private Sub Command_Dial_Click()
79    
80     Dim conName As String, rasItem As RasEntryData
81     Dim success As Boolean
82    
83     'InternetConnect "dachboden"
84     'success = RasConnect("dachboden", "C:\Dokumente und Einstellungen\All Users\Anwendungsdaten\Microsoft\Network\Connections\Pbk\rasphone.pbk")
85    
86     conName = List_Connections.Text
87    
88     If (conName = "") Then
89     MsgBox "Bitte Eintrag auswählen!"
90     Exit Sub
91     End If
92    
93     Set rasItem = RasEntries(conName)
94     success = RasConnect(rasItem.entryname, rasItem.PhonebookPath)
95    
96     Dim ClientIP As String
97     If (success = True) Then
98     ClientIP = DetermineClientIP()
99     MsgBox "Eingewählt: " & ClientIP, , "Status"
100     Else
101     MsgBox "Fehler bei der Einwahl!", , "Status"
102     End If
103    
104     'Picture_Animation.Appearance=
105    
106     End Sub
107    
108     Private Sub Command_Hangup_Click()
109    
110     Dim conName As String
111     Dim success As Boolean
112    
113     conName = List_Connections.Text
114    
115     If (conName = "") Then
116     MsgBox "Bitte Eintrag auswählen!"
117     Exit Sub
118     End If
119    
120     'Set rasItem = RasEntries(conName)
121     success = RasDisconnect(conName)
122     If (success = True) Then
123     MsgBox "Verbindung getrennt.", , "Status"
124     End If
125    
126     End Sub
127    
128     Private Sub Command_RouteAdd_Click()
129     MsgBox RouteAdd(0, "192.168.11.0", "255.255.255.0", "192.168.13.1")
130     End Sub
131    
132    

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed