I did that the label1 is scrolling moving from down bottom to up top and back again in a loop.
So in form1 i can give any text i want to be show and any color to color the text in.
Now instead one label i want that therw will be maximum 5labels running one after one each one with another text and another color.
So i created array of labels but what now?
This is the code so far using one label. I want to delete the current label1 from the control designer and instead using the array of labels i created. -
using System;
-
using System.Collections.Generic;
-
using System.ComponentModel;
-
using System.Drawing;
-
using System.Data;
-
using System.Linq;
-
using System.Text;
-
using System.Windows.Forms;
-
-
namespace WindowsFormsApplication1
-
{
-
public partial class NewsFeederControl : UserControl
-
{
-
string[] newsTF;
-
Label[] labelarray;
-
int jump = 0;
-
string newsTextFeed;
-
Color TextColor;
-
public NewsFeederControl()
-
{
-
InitializeComponent();
-
labelarray = new Label[5];
-
for (int i = 1; i < 5; i++)
-
{
-
//intialize new label
-
labelarray[i] = new Label();
-
labelarray[i].Size = new System.Drawing.Size(33, 33);
-
labelarray[i].Location = new System.Drawing.Point(i, i);
-
labelarray[i].Text = i.ToString();
-
this.Controls.AddRange(new System.Windows.Forms.Control[] {labelarray[i]});
-
}
-
TextColor = new Color();
-
}
-
-
private void NewsFeederControl_Load(object sender, EventArgs e)
-
{
-
-
}
-
-
private void NewsFeederControl_Paint(object sender, PaintEventArgs e)
-
{
-
startCustom();
-
-
}
-
-
public void newsTextFeeds(string newsText)
-
{
-
newsTextFeed = newsText;
-
}
-
-
public void newsTextColor(Color color)
-
{
-
TextColor = color;
-
}
-
-
private void timer1_Tick(object sender, EventArgs e)
-
{
-
label1.Location = new Point(label1.Location.X, label1.Location.Y - jump);
-
}
-
-
public void startCustom()
-
{
-
label1.Text = newsTextFeed;
-
label1.ForeColor = TextColor;
-
timer1.Interval = 50;
-
jump = 1;
-
timer1.Start();
-
-
}
-
-
private void label1_LocationChanged(object sender, EventArgs e)
-
{
-
if (label1.Location.Y <= -20)
-
{
-
label1.Location = new Point(label1.Location.X, this.Height + label1.Height);
-
}
-
}
-
-
-
}
-
}
-
Thanks.
21 3903
firstly change all references of label1 to labelarray[0].
Resize your control so that its height + 40 is approximately divisible by 5 and try to make it at least 200 tall.
In the tick event write this code. -
for (int i = 1; i < 5; i++)
-
{
-
labelarray[i].Location = new Point(labelarray[i].Location.X, labelarray[i].Location.Y - jump);
-
-
if (labelarray[i].Location.Y <= -20)
-
labelarray[i].Location = new Point(labelarray[i].Loaction.X, this.Height + labelarray[i].Height);
-
}
-
And in the startCustom() event, add this: -
int x = 20
-
int y = (int)(this.Height/2) //In the middle
-
for (int i = 1; i < 5; i++)
-
{
-
labelarray[i].Location = new Point(x,y + 40*i);
-
}
-
Hope this helps (and works! I just wrote it freehand :D)
Sam
Samuel i tried it i got error in the designer i see box X in Red inside the control. Something i did wrong.
Here is my code now can you please fix it and show me the complete code how it should be? -
using System;
-
using System.Collections.Generic;
-
using System.ComponentModel;
-
using System.Drawing;
-
using System.Data;
-
using System.Linq;
-
using System.Text;
-
using System.Windows.Forms;
-
-
namespace WindowsFormsApplication1
-
{
-
public partial class NewsFeederControl : UserControl
-
{
-
string[] newsTF;
-
Label[] labelarray;
-
int jump = 0;
-
string newsTextFeed;
-
Color TextColor;
-
public NewsFeederControl()
-
{
-
InitializeComponent();
-
labelarray = new Label[5];
-
TextColor = new Color();
-
}
-
-
private void NewsFeederControl_Load(object sender, EventArgs e)
-
{
-
-
}
-
-
private void NewsFeederControl_Paint(object sender, PaintEventArgs e)
-
{
-
startCustom();
-
-
}
-
-
public void newsTextFeeds(string newsText)
-
{
-
newsTextFeed = newsText;
-
}
-
-
public void newsTextColor(Color color)
-
{
-
TextColor = color;
-
}
-
-
private void timer1_Tick(object sender, EventArgs e)
-
{
-
// label1.Location = new Point(label1.Location.X, label1.Location.Y - jump);
-
for (int i = 1; i < 5; i++)
-
{
-
labelarray[i].Location = new Point(labelarray[i].Location.X, labelarray[i].Location.Y - jump);
-
if (labelarray[i].Location.Y <= -20)
-
{
-
labelarray[i].Location = new Point(labelarray[i].Location.X, this.Height + labelarray[i].Height);
-
}
-
}
-
}
-
-
public void startCustom()
-
{
-
int x = 20;
-
int y = (int)(this.Height / 2); //In the middle
-
for (int i = 1; i < 5; i++)
-
{
-
labelarray[i].Location = new Point(x, y + 40 * i);
-
-
labelarray[i].Text = newsTextFeed;
-
labelarray[i].ForeColor = TextColor;
-
}
-
timer1.Interval = 50;
-
jump = 1;
-
timer1.Start();
-
-
}
-
-
private void label1_LocationChanged(object sender, EventArgs e)
-
{
-
/* if (labelarray[i].Location.Y <= -20)
-
{
-
labelarray[].Location = new Point(label1.Location.X, this.Height + label1.Height);
-
}*/
-
}
-
-
-
-
}
-
}
-
Thanks.
Can you attach the file? id rather not have to spend another 40min recreating your project :D
Or could you copy out the error and tell me what it says?
Thorsten i tried this code: -
using System;
-
using System.Collections.Generic;
-
using System.ComponentModel;
-
using System.Drawing;
-
using System.Data;
-
using System.Linq;
-
using System.Text;
-
using System.Windows.Forms;
-
-
namespace WindowsFormsApplication1
-
{
-
public partial class NewsFeederControl : UserControl
-
{
-
List<Label> list;
-
int jump = 0;
-
string newsTextFeed;
-
Color TextColor;
-
public NewsFeederControl()
-
{
-
InitializeComponent();
-
list = new List<Label>(5);
-
TextColor = new Color();
-
}
-
-
private void NewsFeederControl_Load(object sender, EventArgs e)
-
{
-
-
}
-
-
private void NewsFeederControl_Paint(object sender, PaintEventArgs e)
-
{
-
startCustom();
-
-
}
-
-
public void newsTextFeeds(string newsText)
-
{
-
newsTextFeed = newsText;
-
}
-
-
public void newsTextColor(Color color)
-
{
-
TextColor = color;
-
}
-
-
private void timer1_Tick(object sender, EventArgs e)
-
{
-
for (int i = 1; i < 5; i++)
-
// Loop through List with for
-
{
-
list[i].Location = new Point(list[i].Location.X, list[i].Location.Y - jump);
-
if (list[i].Location.Y <= -20)
-
{
-
list[i].Location = new Point(list[i].Location.X, this.Height + list[i].Height);
-
}
-
}
-
-
}
-
-
public void startCustom()
-
{
-
int x = 2;
-
int y = (int)(this.Height / 2); //In the middle
-
for (int i = 1; i < 5; i++)
-
{
-
list[i].Location = new Point(x,y+40*i);
-
}
-
timer1.Interval = 50;
-
jump = 1;
-
timer1.Start();
-
-
-
}
-
-
private void label1_LocationChanged(object sender, EventArgs e)
-
{
-
/* if (list[i].Location.Y <= -20)
-
{
-
list[i].Location = new Point(list[i].Location.X, this.Height + list[i].Height);
-
}*/
-
}
-
-
-
-
}
-
}
-
But when i make Built solution and then going to the form1 designer before im running the program im getting on the control inside the control in the form1 designer exception say on the control code in line 66 that the index was out of range must be none negative and less then the size of the collection paramet name : index.
The line (66) is : list[i].Location = new Point(x,y+40*i);
And in general im not sure the code is good at all.
Thanks.
Samuel thats the complete exception message im getting but again im sure the whole array code isnt good:
13/01/2011 22:36:34 ==> Newsfeeder Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.Generic.List`1.get_Item(Int32 index)
at WindowsFormsApplication1.NewsFeederControl.startCu stom() in D:\C-Sharp\Download File\Downloading-File-Project-Version-011\Downloading File\Downloading File\NewsFeederControl.cs:line 69
13/01/2011 22:36:47 ==> Last Downloaded file is :C:\Users\Chocolade\AppData\Local\WindowsFormsAppl ication1\My Weather Station\satellite\satellite817.jpg
Combine these two together - List<Label> list;
-
list = new List<Label>(5);
to make this - Label[] list = new Label[5];
Note: if you want to pragmatically change the size, change each line to this: - Label[] list;
-
-
//Put in a public method ie. public void changeSize(int size);
-
list = new Label[size];
And change your for loops to this: - for (int i = 0; i < 5; i++)
note 'int i = 0' instead of 'int i = 1', this is because an arrays first reference is at 0.
Also note that this forum supports attaching files to posts
under post box
select 'Go advanced'
select 'Manage Attachments'
you can upload projects in .zip format
I'd also suggest to use for-each instead of for when iterating through a collection (list, array, dictionary, ...) -
private void timer1_Tick(object sender, EventArgs e)
-
{
-
foreach (Label label in list)
-
// Loop through List with for-each
-
{
-
label.Location = new Point(label.Location.X, label.Location.Y - jump);
-
if (label.Location.Y <= -20)
-
{
-
label.Location = new Point(label.Location.X, this.Height + label.Height);
-
}
-
}
-
}
-
Samuel now im getting error exception null:
This is the code now i changed as you wrote and im getting the exception inside the startCustom() function wich is calling in the paint event in the control.
Here is the complete code now: -
using System;
-
using System.Collections.Generic;
-
using System.ComponentModel;
-
using System.Drawing;
-
using System.Data;
-
using System.Linq;
-
using System.Text;
-
using System.Windows.Forms;
-
using DannyGeneral;
-
-
namespace WindowsFormsApplication1
-
{
-
public partial class NewsFeederControl : UserControl
-
{
-
Label[] list = new Label[5];
-
int jump = 0;
-
string newsTextFeed;
-
Color TextColor;
-
public NewsFeederControl()
-
{
-
InitializeComponent();
-
TextColor = new Color();
-
}
-
-
private void NewsFeederControl_Load(object sender, EventArgs e)
-
{
-
-
}
-
-
private void NewsFeederControl_Paint(object sender, PaintEventArgs e)
-
{
-
startCustom();
-
-
}
-
-
public void newsTextFeeds(string newsText)
-
{
-
newsTextFeed = newsText;
-
}
-
-
public void newsTextColor(Color color)
-
{
-
TextColor = color;
-
}
-
-
private void timer1_Tick(object sender, EventArgs e)
-
{
-
for (int i = 0; i < 5; i++)
-
// Loop through List with for
-
{
-
list[i].Location = new Point(list[i].Location.X, list[i].Location.Y - jump);
-
if (list[i].Location.Y <= -20)
-
{
-
list[i].Location = new Point(list[i].Location.X, this.Height + list[i].Height);
-
}
-
}
-
-
}
-
-
public void startCustom()
-
{
-
try
-
{
-
int x = 2;
-
int y = (int)(this.Height / 2); //In the middle
-
for (int i = 1; i < 5; i++)
-
{
-
list[i].Location = new Point(x, y + 40 * i);
-
}
-
timer1.Interval = 50;
-
jump = 1;
-
timer1.Start();
-
}
-
catch (Exception err)
-
{
-
Logger.Write("NewsFeeder Error: " + err);
-
}
-
-
-
}
-
-
private void label1_LocationChanged(object sender, EventArgs e)
-
{
-
/* if (list[i].Location.Y <= -20)
-
{
-
list[i].Location = new Point(list[i].Location.X, this.Height + list[i].Height);
-
}*/
-
}
-
-
-
-
}
-
}
-
Note that im not using anymore the label1 changed event ill remove it later.
The null error is on line 65 means this line: -
list[i].Location = new Point(x, y + 40 * i);
-
wich is in the startCustom() function.
Thats the complete exception error:
14/01/2011 10:23:52 ==> NewsFeeder Error: System.NullReferenceException: Object reference not set to an instance of an object.
at WindowsFormsApplication1.NewsFeederControl.startCu stom() in D:\C-Sharp\Download File\Downloading-File-Project-Version-011\Downloading File\Downloading File\NewsFeederControl.cs:line 68
14/01/2011 10:23:55 ==> NewsFeeder Error: System.NullReferenceException: Object reference not set to an instance of an object.
at WindowsFormsApplication1.NewsFeederControl.startCu stom() in D:\C-Sharp\Download File\Downloading-File-Project-Version-011\Downloading File\Downloading File\NewsFeederControl.cs:line 68
Ill upload the file in few if you need it again.
Thanks.
You have to assign your labels to the list before you access them.
If you create them with the designer, you have to assign them by name, e.g. in method startCustom -
list[1] = label1;
-
list[2] = label2;
-
...
-
or you create them if you don't use the designer. -
for(int i = 1; i < 5; i++)
-
list[i] = new Label();
-
Samuel now im not getting exceptions but i dont see anything moving inside the control when im running my application.
This is the complete code now please review it: -
using System;
-
using System.Collections.Generic;
-
using System.ComponentModel;
-
using System.Drawing;
-
using System.Data;
-
using System.Linq;
-
using System.Text;
-
using System.Windows.Forms;
-
using DannyGeneral;
-
-
namespace WindowsFormsApplication1
-
{
-
public partial class NewsFeederControl : UserControl
-
{
-
Label[] list = new Label[5];
-
int jump = 0;
-
string newsTextFeed;
-
Color TextColor;
-
public NewsFeederControl()
-
{
-
InitializeComponent();
-
TextColor = new Color();
-
-
}
-
-
private void NewsFeederControl_Load(object sender, EventArgs e)
-
{
-
-
}
-
-
private void NewsFeederControl_Paint(object sender, PaintEventArgs e)
-
{
-
startCustom();
-
-
}
-
-
public void newsTextFeeds(string newsText)
-
{
-
newsTextFeed = newsText;
-
}
-
-
public void newsTextColor(Color color)
-
{
-
TextColor = color;
-
}
-
-
private void timer1_Tick(object,sender,EventArgse)
-
{
-
foreach (Label label in list)
-
// Loop through List with for-each
-
{
-
label.Location = new Point(label.Location.X, label.Location.Y - jump);
-
if (label.Location.Y <= -20)
-
{
-
label.Location = new Point(label.Location.X, this.Height + label.Height);
-
}
-
}
-
}
-
-
public void startCustom()
-
{
-
try
-
{
-
for (int i = 0; i < 5; i++)
-
{
-
list[i] = new Label();
-
}
-
int x = 2;
-
int y = (int)(this.Height / 2); //In the middle
-
for (int i = 1; i < 5; i++)
-
{
-
list[i].Location = new Point(x, y + 40 * i);
-
}
-
list[1].Text = newsTextFeed;
-
list[1].ForeColor = TextColor;
-
timer1.Interval = 50;
-
jump = 1;
-
timer1.Start();
-
}
-
catch (Exception err)
-
{
-
Logger.Write("NewsFeeder Error: " + err);
-
}
-
}
-
}
-
}
-
I changed it to foreach.
and in the form1 im sending the text and color by: -
newsFeederControl1.newsTextFeeds("Hello hi");
-
newsFeederControl1.newsTextColor(Color.Red);
-
But i dont see anything in to control moving.
To start, when i recreated the control, paint was never called, so it never started startCustom();
To make a note as well, try to comment your code as much as possible. It helps us and yourself figure out what the code does.
I made the following code on an empty user control with a timer named timer1, with a size of 200 by 200.
Here is your code with modifications which worked on my computer.
Call this code in your main form ONLY ONCE to start it.
(I put it on a button, but will work well within main form's load event.) - newsFeederControl1.newsTextFeed = "somestring";
-
newsFeederControl1.TextColor = Color.Red;
-
newsFeederControl1.startFeed();
To change the settings, use this code - newsFeederControl1.newsTextFeed = "otherstring";
-
newsFeederControl1.TextColor = Color.Blue;
-
newsFeederControl1.changeFeed();
My suggestion is to now make newsTextFeed and TextColor arrays so each item has its own settings.
Samuel working great!
Could you show me how to make the text and the color array? And how to call them then in form1?
Now its moving same text same color wich is good.
But lets say in the labels array i have 5 labels so i want to see in the control when im running the program eahc label with different text and different color.
Thank you very much!
Samuel another thing i saw now that between the first label and the other 4 there is a space. All the other 4 labels same spaces the first one come before the else.
Did you mean to do it like that?
And where in the code do i change/play with the spaces?
Thanks.
Underneath the 'int jump = 0' line add this
Change that number to change the space, currently in my code i have it set to 40 in this line: - list[i].Location = new Point(x, y + (40 * i));
Change it to: - list[i].Location = new Point(x, y + (space * i));
That should do it.
Try not to make space smaller than about 20, or the labels will overlap.
Samuel this is what i did now to get the text from the Form1 to the labels and i have some questions please:
First the code in the control i changed:
Then in form1 i created two new functions: -
private void SetupColors(Color[] colors)
-
{
-
if (this.newsFeederControl1.TextColor.Length > 0 && colors.Length > 0)
-
this.newsFeederControl1.TextColor[0] = colors[0];
-
if (this.newsFeederControl1.TextColor.Length > 1 && colors.Length > 1)
-
this.newsFeederControl1.TextColor[1] = colors[1];
-
if (this.newsFeederControl1.TextColor.Length > 2 && colors.Length > 2)
-
this.newsFeederControl1.TextColor[2] = colors[2];
-
if (this.newsFeederControl1.TextColor.Length > 3 && colors.Length > 3)
-
this.newsFeederControl1.TextColor[3] = colors[3];
-
if (this.newsFeederControl1.TextColor.Length > 4 && colors.Length > 4)
-
this.newsFeederControl1.TextColor[4] = colors[4];
-
}
-
-
private void SetupText(string[] textToDisplay)
-
{
-
if (this.newsFeederControl1.newsTextFeed.Length > 0 && textToDisplay.Length > 0)
-
this.newsFeederControl1.newsTextFeed[0] = textToDisplay[0];
-
if (this.newsFeederControl1.newsTextFeed.Length > 1 && textToDisplay.Length > 1)
-
this.newsFeederControl1.newsTextFeed[1] = textToDisplay[1];
-
if (this.newsFeederControl1.newsTextFeed.Length > 2 && textToDisplay.Length > 2)
-
this.newsFeederControl1.newsTextFeed[2] = textToDisplay[2];
-
if (this.newsFeederControl1.newsTextFeed.Length > 3 && textToDisplay.Length > 3)
-
this.newsFeederControl1.newsTextFeed[3] = textToDisplay[3];
-
if (this.newsFeederControl1.newsTextFeed.Length > 4 && textToDisplay.Length > 4)
-
this.newsFeederControl1.newsTextFeed[4] = textToDisplay[4];
-
}
-
And in the form1 form1_load event i did: -
private void Form1_Load(object sender, EventArgs e)
-
{
-
this.newsFeederControl1.newsTextFeed = new string[5];
-
this.newsFeederControl1.TextColor = new Color[5];
-
SetupText(new string[] { "Hello This is the dfdf for today the dffd will be cloudy and ok", "From", "Daniels", "Latest", "Control" });
-
SetupColors(new Color[] { Color.Blue, Color.Red, Color.Green, Color.Pink, Color.Brown });
-
this.newsFeederControl1.startFeed();
-
-
}
-
And its working great.
Now i have two questions:
Why when im typing some text for example into label[1] : SetupText(new string[] {"Text1", "Text2", "3 Text 3", "Text 4 -> 4", "Text Nr. 5"});
Instead "Text1" lets say i typed "hello world this is a test for long text what do you think?" So why i dont see all the text only the first 17-18 chars.
I want if its out of the label range or something so the text will automatic drop down toa news line without a spce. like:
" hello this is my first label
and now its a new line ok"
just without the space between the lines so this is for example lable[1]
Something like in www.ynet.co.il on the right. How the text goes up.
Thanks.
Now another thing i wonder is how to change the space between each of the labels! so first label coming up and lets say only when he touch the top of the control the top of the label control with the top of the control then the next label coming up and so on. something like that.
How to make this thing where to change it in the code explain to me please so i can wriote it down and understand.
Thanks a lot.
Okay, lets tackle the first two questions.
The reason you can't see all the text is because the label isn't wide enough, just make it wider by setting its AutoSize property to true.
This will cause the label to exceed the boundaries of the control. so implement the following code in the for loop. - list[i].AutoSize = true;
-
list[i].Text = genString(newsTextFeed[i])
-
-
//Instead of 'list[i].Text = newsTextFeed;' line
somewhere near the bottom of your code, we are going to make a method that measures the length of the string and if too big, make it go to a new line. Add this method: - private string genString(string line)
-
{
-
string splitline = "";
-
string templine = null;
-
Graphics graphics = this.CreateGraphics();
-
-
string[] words = line.Split(' '); // Splits string by spaces
-
-
foreach (string word in words)
-
{
-
templine = splitline;
-
splitline = splitline + word + " ";
-
-
// Measures length of string in pixels
-
SizeF textSize = graphics.MeasureString(splitline, this.Font);
-
-
// If the width is too large, put word
-
// on a new line.
-
if (textSize.Width >= this.Width)
-
splitline = templine + "\r\n" + word;
-
}
-
-
return splitline;
-
}
That should fix the first two questions.
In relation to the one about as soon as it leaves the top, send a new message, we will go back to the single label code from the other thread you made. But we are going to modify the code that brings it back to the bottom. - public string[] newsTextFeed = new string[5];
-
int index = 0;
-
-
private void label1_LocationChanged(object sender, EventArgs e)
-
{
-
if (label1.Location.Y <= -20)
-
{
-
index++; // adds 1 to the current value
-
if (index >= 5)
-
index = 0;
-
-
label1.Text = newsTextFeed[index];
-
label1.Location = new Point(label1.Location.X, this.Height + label1.Height);
-
}
-
}
Hope this does the trick.
Samuel.
Samuel for the first two questions thisi s the code of the control after changed it as you wrote but it dosent work the text in the first label is dosent show and dosent go to the next line its getting hidden to the right.
Thanks for helping.
Its because your block of code as follows: - if (list.Length > 4 && newsTextFeed != null)
-
{
-
//get the label at this position in the list
-
//and assign some text
-
if (list[0] != null && this.newsTextFeed[0] != null && newsTextFeed.Length > 0)
-
list[0].Text = this.newsTextFeed[0];
-
-
if (list[1] != null && this.newsTextFeed[1] != null && newsTextFeed.Length > 1)
-
list[1].Text = this.newsTextFeed[1];
-
-
if (list[2] != null && this.newsTextFeed[2] != null && newsTextFeed.Length > 2)
-
list[2].Text = this.newsTextFeed[2];
-
-
if (list[3] != null && this.newsTextFeed[3] != null && newsTextFeed.Length > 3)
-
list[3].Text = this.newsTextFeed[3];
-
-
if (list[4] != null && this.newsTextFeed[4] != null && newsTextFeed.Length > 4)
-
list[4].Text = this.newsTextFeed[4];
-
}
You reassign the OLD string of text to it every 'tick' not the modified multi-line string.
We will change this line to suit your code: - list[i].Text = genString(newsTextFeed[i]);
to: - newsTextFeed[i] = genString(newsTextFeed[i]);
-
list[i].Text = newsTextFeed[i];
That should work.
Sam
Sign in to post your reply or Sign up for a free account.
Similar topics
by: avashisht |
last post by:
Hi,
I am veeeery new to perl..
i have a script where i am outputting the Environment variable to a HASH.
either i want to output hash values into a text file,
Or
get hash into an array and then...
|
by: Geoff Hague |
last post by:
I've got a small little problem with my 'website-in-progress':
http://www.captainsoftheworld.com/modernrepublic/strict/index.php...
|
by: Buddy |
last post by:
Hello,
Does anyone know how to stop labels from wrapping text. If
the text is to long for the label then I want it to hide
the text just like out the TextBox control works.
Thanks,
|
by: Woody Splawn |
last post by:
When placing labels and text boxes on winforms they are coming up by default
in a size that is just a little too small. How do I change this so that in
the future they will come up with a bigger...
|
by: B |
last post by:
Hello,
I am trying to migrate a vb6 app to vb.net. In one piece
of the vb6 app I have a label where the label backcolor
changes every 5 seconds on a timer. So I created an array
of colors as...
|
by: tnspc |
last post by:
I have a function in my program to write an array to a text file, but every way I've tried results in the same result: when I open the file to check what's been written to it, all it displays is the...
|
by: OliveOyl3471 |
last post by:
In Visual Basic.NET 2003, how do you populate a two dimensional array from a text file? I know how to check file existence, open the file for read, etc. I just can't get it to read more than one...
|
by: deeptismuley |
last post by:
Hello,
i want to write an array to a text file using visual basic. the output should look like this for a 5X5 sized array.
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 1 0
0 0 0 0...
|
by: tivicoo |
last post by:
I have a 16 bit array called ADData, and i want to save this array to a text file using C#. i tried to use different codes that i located online but when i open the saved data on notepad the data...
|
by: anfetienne |
last post by:
i have this code below that i made....it loads vars from txt file splits it then puts it into an array....once in an array it the brings the pics in from the array to create thumbnails and a larger...
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
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...
|
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...
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
|
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...
| |