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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by joko, Wed Sep 28 20:36:46 2005 UTC revision 1.3 by joko, Sun Oct 9 18:38:24 2005 UTC
# Line 2  VERSION 5.00 Line 2  VERSION 5.00
2  Begin VB.Form Form_Main  Begin VB.Form Form_Main
3     Caption         =   "VpnDial"     Caption         =   "VpnDial"
4     ClientHeight    =   3525     ClientHeight    =   3525
5     ClientLeft      =   60     ClientLeft      =   165
6     ClientTop       =   345     ClientTop       =   735
7     ClientWidth     =   6450     ClientWidth     =   6450
8       Icon            =   "Form_Main.frx":0000
9     LinkTopic       =   "Form1"     LinkTopic       =   "Form1"
10     ScaleHeight     =   3525     ScaleHeight     =   3525
11     ScaleWidth      =   6450     ScaleWidth      =   6450
# Line 48  Begin VB.Form Form_Main Line 49  Begin VB.Form Form_Main
49        Top             =   60        Top             =   60
50        Width           =   4605        Width           =   4605
51     End     End
52       Begin VB.Menu MenuPopup
53          Caption         =   ""
54          Begin VB.Menu MenuExit
55             Caption         =   "&Exit VpnDial"
56          End
57       End
58  End  End
59  Attribute VB_Name = "Form_Main"  Attribute VB_Name = "Form_Main"
60  Attribute VB_GlobalNameSpace = False  Attribute VB_GlobalNameSpace = False
# Line 58  Attribute VB_Exposed = False Line 65  Attribute VB_Exposed = False
65    
66  Option Explicit  Option Explicit
67    
68  Private Sub Command_RunScript_Click()  Private Sub Form_Load()
69      Dim script_name As String, args As String  '    Dim rasItem As RasEntryData
70        '    For Each rasItem In RasEntries
71      script_name = "ip-up.bat"  '        List_Connections.AddItem rasItem.entryname
72      args = Chr(34) & DetermineClientIP() & Chr(34)  '    Next
       
     Shell App.Path & "\" & script_name & " " & args, vbNormalFocus  
       
73  End Sub  End Sub
74    
75  Private Sub Form_Load()  Private Sub Form_Unload(Cancel As Integer)
76      Dim rasItem As RasEntryData      RemoveTrayIcon
77      For Each rasItem In RasEntries  End Sub
78          List_Connections.AddItem rasItem.entryname  
79      Next  ' TrayIcon specific implementation
80    Private Sub Form_MouseMove(Button As Integer, _
81      Shift As Integer, X As Single, Y As Single)
82      
83      ' Das MouseMove Ereignis wird ausgelöst, wenn die
84      ' Maus über das Symbol im Systray geführt wird
85    
86      Dim lMsg As Long
87      Dim sFilter As String
88      
89      lMsg = X / Screen.TwipsPerPixelX
90      Select Case lMsg
91         Case WM_LBUTTONDOWN
92          ' linke Maustaste wird gedrückt
93          
94         Case WM_LBUTTONUP
95          ' linke Maustaste wird losgelassen
96          'MsgBox "click"
97          
98         Case WM_LBUTTONDBLCLK
99          ' linke Maustaste - Doppelklick
100          
101         Case WM_RBUTTONDOWN
102          ' rechte Maustaste wird gedrückt
103          
104         Case WM_RBUTTONUP
105           ' rechte Maustaste wird losgelassen
106           ' (jetzt z.B. Popup-Menü öffnen)
107           PopupMenu MenuPopup
108          
109         Case WM_RBUTTONDBLCLK
110          ' rechte Maustaste - Doppeklick
111          
112      End Select
113  End Sub  End Sub
114    
115    Private Sub MenuExit_Click()
116        ' Symbol aus dem Systray entfernen
117        RemoveTrayIcon
118        ' Beenden
119        End
120    End Sub
121    
122    
123    
124    
125    ' ==========================================================
126    ' old code from here
127    ' ==========================================================
128    
129    
130  Private Sub Command_Dial_Click()  Private Sub Command_Dial_Click()
131            
132      Dim conName As String, rasItem As RasEntryData      Dim conName As String, rasItem As RasEntryData
# Line 95  Private Sub Command_Dial_Click() Line 147  Private Sub Command_Dial_Click()
147            
148      Dim ClientIP As String      Dim ClientIP As String
149      If (success = True) Then      If (success = True) Then
150          ClientIP = DetermineClientIP()          ClientIP = DetermineClientIP(rasItem.entryname)
151          MsgBox "Eingewählt: " & ClientIP, , "Status"          MsgBox "Eingewählt: " & ClientIP, , "Status"
152      Else      Else
153          MsgBox "Fehler bei der Einwahl!", , "Status"          MsgBox "Fehler bei der Einwahl!", , "Status"
# Line 129  Private Sub Command_RouteAdd_Click() Line 181  Private Sub Command_RouteAdd_Click()
181      MsgBox RouteAdd(0, "192.168.11.0", "255.255.255.0", "192.168.13.1")      MsgBox RouteAdd(0, "192.168.11.0", "255.255.255.0", "192.168.13.1")
182  End Sub  End Sub
183    
   

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

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