|
http://www.cyberforum.ru/windows-forms/thread101334.html#post580926
|
|
|
|
|
Ask the question here. Don't post a link I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:40am.
|
|
|
|
|
When I wish to use listBox1 in a thread gives out an error:
"Cross-thread operation not valid: Control 'listBox1' accessed from a thread other
than the thread it was created on.".
I badly understand delegates.
public delegate void ListBoxCallback(string s);
public void listBox_1_ItemsAdd(string value1)
{
ListBoxCallback callback = new ListBoxCallback(listBox_1_ItemsAdd);
Invoke(callback); // Here a problem: "parameter count mismatch"
listBox1.Items.Add(value1);
}
I transfer to a method listBox_1_ItemsAdd string value value1.
listBox_1_ItemsAdd(dataGridView1[2, i].Value.ToString());
Also, how to transfer parametre here.
private delegate void ChangeProgressBarCallback(int size);
public void changeProgressBar(int MaxSize)
{
if (progressBar1.InvokeRequired)
{
// instantiate the callback instance out of this very method
ChangeProgressBarCallback callback = new ChangeProgressBarCallback(changeProgressBar);
// invoke it, when it comes to it again InvokeRequired will be false
Invoke(callback);
}
else
{
progressBar1.Minimum = 0;
progressBar1.Maximum = MaxSize;
progressBar1.Step = 1;
for (int x = 1; x <= MaxSize; x++)
{
progressBar1.PerformStep();
}
}
}
How to transfer parametre in the delegate.
That I to do not so prompt please
|
|
|
|
|
hello,
I write to excel in my project (c#.net) and i do that white command "File.AppendAlltText(filename,string);"
this is a simple way to write file in .net .
Now i need to add color and bold word in my excel file.
i cant do that with that command or i need to use a different command?
Thank You and Good Shabec!!
|
|
|
|
|
|
I know this, but more comfortable working with File.AppendAllText(filename,string);
You may not know a way to do it via File command?
|
|
|
|
|
You've been given the correct way to accomplish the task. You're on you own if you want something else. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
File.AppendAllText works for text file. An excel spreadsheet is not a text file, so you can't use File static methods to write on it.
|
|
|
|
|
|
Well then...this is a great opprtunity to get away from what your comfortable with and learn something new, isn't it?
|
|
|
|
|
|
If you can't do this and teach yourself new ways to do something, you're not going to last very long as a programmer.
|
|
|
|
|
You right,in fact i learned that before two minutes..
|
|
|
|
|
Hello every one,
I want to know the code to Enable/Disable local area network connection.
if it is applicable also , to define IP and subnetmask;
ThanksAll You Need Is A Good Friend
|
|
|
|
|
|
hey
This is for outlook vba for loading a ref at outlook
Whit this you can load a reference in it whitout any manual input the only thing you need
= a refernce to let vbe work
so this is no solution if you only whant to load 1 reference
Application.VBE.ActiveVBProject.References.AddFromFile "C:\WINDOWS\system32\redemption.dll"
is there a other way at vba
or a way true c#.net or vb.net to load a ref en set active in outlook
thanks
|
|
|
|
|
Original is here[^].
Do NOT post the same question over and over again and do not post them in different forums. It makes collaborating on an answer very difficult.
|
|
|
|
|
i want to get the url from the address bar each time when the new address is entered.
i have the code to get the url of current opened IE instances.
But i donot know how to programatically get the url each time without pressing the button.
|
|
|
|
|
Hi All;
how do make microsoft exchange address book all record. C# language.
Help Please.
|
|
|
|
|
asdxxxx wrote: Hi All;
Hi yourself!
asdxxxx wrote: how do make microsoft exchange address book all record. C# language.
No. Don't understand at all what you are trying to achieve.
asdxxxx wrote: Help Please.
More Information Please.You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
i need The information in the address book name,surname,mail .etc
|
|
|
|
|
are you trying to make a database?
|
|
|
|
|
See here[^] You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|