473,398 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Not clearing Array....

133 100+
I am trying to clear the array STR but it does not clear it.
This sub is in a module.

Expand|Select|Wrap|Line Numbers
  1.         Dim STR As Array
  2.         'Dim str(6) As String
  3.  
  4.         STR = File.ReadAllLines(Application.StartupPath & "\login\details\" & Login.CboServicePerson.Text & ".pas") ' & (STR(1) & CboText & ".pas"))
  5.         Form1.txtUser.Text = STR(1) 'textline
  6.         Form1.txtPosition.Text = STR(2)
  7.         Form1.txtDepartment.Text = STR(3)
  8.         Form1.txtLicence.Text = STR(4)
  9.         Form1.txtCompany.Text = STR(5)
  10.         Form1.pbUser.Image = Image.FromFile(Application.StartupPath & "\login\image\" & STR(6))
  11.         Form1.pbUser.SizeMode = PictureBoxSizeMode.StretchImage
  12.         Form1.pbUser.BorderStyle = BorderStyle.FixedSingle
  13.         Login.CboServicePerson.DropDownStyle = ComboBoxStyle.DropDownList
  14.  
  15.         Array.Clear(STR, 0, STR.Length)

Also im getting no errors its just not clearing STR.
Thanks in Advanced.

Gobble.
Jul 6 '09 #1
4 1493
Plater
7,872 Expert 4TB
What do you mean by not clearing? It should just set all the values to an empty string?
Jul 9 '09 #2
gobblegob
133 100+
yeah i mean cannot set to nothing, any idea's ?
Jul 10 '09 #3
Plater
7,872 Expert 4TB
Why you want them set to nothing, instead of empty strings?
You are creating an array of strings after all
Jul 10 '09 #4
gobblegob
133 100+
thanks for the reply mate, but thats what i mean.
Jul 10 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Miki Tebeka | last post by:
Hello All, I'd like to bind <CTRL+L> so that it will clear IDLE's screen (in the interactive prompt). Any pointers/suggetions? Thanks. Miki
4
by: Gary | last post by:
Hi How does one clear an Array? Situation is when I am executing my program everything works fine, but when I try and repeat the program without resetting my program I get this error,...
28
by: Terry Andersen | last post by:
I have an array that I initialize to zero, like: Buffer = {0x00}; How do I in my code reset this array to all zeros ones more? Without running a whole for loop? Best Regards Terry
10
by: Liz - Newbie | last post by:
Does anyone know how to clear arrays? My C# books talk about creating arrays or talk about using Clear or RemoveAt but these methods don't appear to be available for my array. I have an array...
65
by: Steven Watanabe | last post by:
I know that the standard idioms for clearing a list are: (1) mylist = (2) del mylist I guess I'm not in the "slicing frame of mind", as someone put it, but can someone explain what the...
13
by: Adam Honek | last post by:
Instead of the ZeroMemory API what would one use in VB.NET to clean an array using a custom structure? The .clear isn't a member of it by default. Any suggestions? Thanks, Adam
4
by: timothytoe | last post by:
I can think of several easy ways to clear out an array. The most obvious: arr=; arr.length=0; arr=null; What do most JavaScript programmers expect to see? Since JS is transmitted, do I...
16
by: Ed Bitzer | last post by:
Trying to send groups of email with program using System.Net.Mail. I do not clear MailMessage but repeatedly loop changing only the Bcc entries. Works fine if all addresses are valid. As a simple...
3
by: Martin | last post by:
Is clearing a structure the following way well defined in C89? The structure ACTION contains no floating point or pointer members. Only integral types. My thoughts concern the padding - can and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.