Public Sub Init_BrwoserInit(obELem as Element)
' m_objElem wurde als globale Variable vom Typ Element deklariert
If cInitBrowser Is Nothing Then
Set cInitBrowser = New clsInitBrowser
End If
If Not obElem Is Nothing Then
Set m_objElem = obElem
End If
cInitBrowser.RefreshBrowserControl
' Hier würde ich gerne wieder "zerstören"
' Set m_objElem = Nothing
End Sub
' in der Class clsBrwoserInit
Public Sub RefreshBrowserControl()
Dim objVar As Variable
Dim objControl As Object
Dim navPath As String
Dim iniPath As String
Dim strLangSuffix As String
On Error GoTo ErrorHandling
' Nachfolgend erfolgt zwar ein Sprung in die If-Abfrage, die anschließende
' Zuweisung funktioniert jedoch nicht mehr. objControl bleibt "Nothing"
If Not m_objElem Is Nothing Then
Set objControl = m_objElem.AktiveX
End If
Set objVar =
thisProject.Parent.Parent.Projects.Item("BAS").Variables.Item("LOCAL_LngExt")
If Not objVar Is Nothing Then
If objVar.value = "de" Then
strLangSuffix = "?languageId=de-DE"
ElseIf objVar.value = "en" Then
strLangSuffix = "?languageId=en-GB"
Else
' derzeit nicht definiert - Standart ist englisch
strLangSuffix = "?languageId=en-GB"
End If
Set objVar = Nothing
Else
strLangSuffix = "?languageId=en-GB"
End If
iniPath = thisProject.Path & "RT\FILES\zenOn\custom\additional\Settings\" & INI_FILE
navPath = Read_INI("LDS_CLIENT", "Path", iniPath)
Dim lngPos As Integer
lngPos = InStr(1, navPath, "?LanguageId", vbTextCompare)
If lngPos > 0 Then
navPath = Mid(navPath, 1, lngPos - 1)
End If
If navPath <> "" Then
navPath = navPath + strLangSuffix
If Not objControl Is Nothing Then
objControl.Navigate navPath
Else
Debug.Print "Kein Browserobject vorhanden!"
End If
End If
' Set objControl = Nothing
Exit Sub
ErrorHandling:
Call ErrorHandler(MODULE_NAME & "::RefreshBrowserControl")
End Sub
Public Sub RefreshBrowserLanguage()
If Not cInitBrowser Is Nothing Then
cInitBrowser.RefreshBrowserControl
Debug.Print "refresh browser language - mdlextroutines"
End If
End Sub
This document governs the use of our Community Forum. By registering and using the platform, you accept these conditions.
The COPA-DATA Community Forum serves to encourage the exchange of information and experience about the zenon software between forum users respectively zenon users.
Please mind that any published information on the Community Forum is the subjective opinion and view based on the experience and the level of knowledge of the author. COPA-DATA does not overtake any responsibility for the content and the accuracy of the shared information.
Users of the Community Forum are encouraged to share only well-founded experiences and to point out any risks associated with the implementation of proposed solutions to problems. COPA-DATA at its absolute discretion, reserves the right to moderate the forum. In this connection COPA-DATA may remove any information containing false facts, potentially dangerous solutions, bad language or content that may insult, degrade or discriminate others. COPA-DATA may block a non-complying user from forum access if the user violated this provision.
COPA-DATA reserves the right to change this document from time to time at own discretion.
Ing. Punzenberger COPA-DATA GmbH
Karolingerstraße 7b · 5020 Salzburg · Austria
www.copadata.com