Jump to content
Xtreme .Net Talk

Craz

Members
  • Posts

    6
  • Joined

  • Last visited

Craz's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. ow yes, i forgot that one. Thanks for reminding me!
  2. Hi I'm trying to fill 2 array vars but after filling all values come out empty, and i don't have a clue why. Here's my code in short: Module Functions Const lineSize = 80 Dim fsoScan As New FileSystemObject Dim myStreamTarget As TextStream Dim myDatFile = Application.StartupPath & "\data.dat" Dim myLeftBorder(0) As String Dim myRightBorder(0) As String Dim arrayTeller As Integer Public Sub initialize() myRightBorder.Initialize() myLeftBorder.Initialize() MsgBox("left length = " & myLeftBorder.Length & vbLf & "right length = " & myRightBorder.Length) FillArray(1, "[border_left]") 'filling left borderarray FillArray(2, "[border_right]") 'filling right borderarray MsgBox("left length = " & myLeftBorder.Length & vbLf & "right length = " & myRightBorder.Length) MsgBox("1st left = " & myLeftBorder(0) & vbLf & "1st right = " & myRightBorder(0)) End Sub Private Sub FillArray(ByVal borderArray As Integer, ByVal headerString As String) Dim myStreamSource As TextStream Dim myFile As File Dim lijn As String Dim startWrite As Boolean Dim stopRead As Boolean arrayTeller = 0 myFile = fsoScan.GetFile(myDatFile) myStreamSource = myFile.OpenAsTextStream(IOMode.ForReading) startWrite = False stopRead = False Do While Not myStreamSource.AtEndOfStream And stopRead = False lijn = myStreamSource.ReadLine If (lijn.Equals(headerString)) Then startWrite = True arrayTeller = 0 ElseIf (startWrite = True And lijn.Equals("")) Then stopRead = True ElseIf (startWrite = True) Then If borderArray = 1 Then ReDim myLeftBorder(arrayTeller + 1) myLeftBorder(arrayTeller) = lijn MsgBox("line " & arrayTeller & " added: " & lijn & vbLf & "--> " & myLeftBorder.GetValue(arrayTeller)) Else ReDim myRightBorder(arrayTeller + 1) myRightBorder(arrayTeller) = lijn MsgBox("line " & arrayTeller & " added: " & lijn & vbLf & "--> " & myRightBorder.GetValue(arrayTeller)) End If arrayTeller = arrayTeller + 1 End If Loop myStreamSource.Close() myStreamSource = Nothing myFile = Nothing End Sub Now what happens: When I initialize i fill up 2 arrays from a congig file. The array itself will be filled with strings. The config file is build like: [item1] value1 value2 [item2] values ... first msgbox returns: left length = 1 & right length = 1 then FillArray is called to fill up both arrays in that sub i have a msgbox saying what line it will enter in the array: e.g. line bleh added --> bleh So that seems to be all ok. But after the 2 calls to fill up the arrays it goes wrong. length msgbox gives me: left length = 17 & right length = 17 (= ok) but then when i want to msg the first values it gives me nothing: 1st left = 1st right = Where do i go wrong with this?
  3. aaah yes i added a thing called webcontrol from the .net framework components and i had to add the web browser from COM components :D Thx for the help, I think I can handle it from here ;)
  4. Hi, I've been searching this forum for an answer but couldn't find one. I have my GUI in windows forms, with on the left a listview control and when the user selects an entry in that list it shows the correct html page from that item on the right. But i don't have a clue how to display html content in a gui, i've read something about webcontrol, which i've added already to my toolbox. But I can't use it since it's grey (not selectable) so I'm out of ideas. Could someone tell me what control(s) i need to be able to display HTML files? Thx!
  5. Yep that does the trick :D Thx for the help!
  6. Hi, Is it possible in a listview to select a complete line? By selecting a complete line i mean so that the selected line is fully grey colored, in stead of only the item in first column.
×
×
  • Create New...