|
You've got a full 101-key keyboard in front of you - use it. SMS-speak is frowned upon because it makes your posts hard to read.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
GermanDM wrote: I know the using of sockets or remoting but everywhere i look it all just goes down to an tcp/ip chat.
You do know what TCP/IP means? it means Transmission Control Protocol over Internet Protocol. Which should give you a clue to how data is transmitted over the internet.
|
|
|
|
|
I've been to the database and retrieved 1 or more values from a table that match with values for my ListBox text. eg
1 = John
2 = Peter
3 = Fred
etc
I have values say, 1 and 3 in a dataSet and can view each row
I want to get back to my page and have 1 or more names (John and Fred) highlighted. It's fine if there is one but multiple?
Code so far :
for (int i=0;i < dataSet.Tables[0].Rows.Count; i++)
{
mylistbox.SelectedValue = dataSet.Tables[0].Rows[i]
"PersonID"].ToString();
}
This only highlights Fred, the last row in my listbox on my page.
Any advice would be great.
|
|
|
|
|
You can create a ListItem and set its Selected property to true. Or iterate throught
ListItems in your ListBox .
Something like this:
int i = 0
foreach(ListItem li in ListBox1.Items)
{
if( (li.Value == dataSet.Tables[0].Rows[i]["PersonID"].ToString())
{
li.Selected = true;
}
i += 1;
}
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
|
Hi All,
I have a little problem...
From one form to another i am sending an array list.
ArrayList _line = new ArrayList();<br />
_line.Add(strNum);<br />
new frmCellNumberListCheck().Chekker(ref _line);
On the next form i have a list view. How do i populate the a list view with the values in my array list?
Here is the part on my next form...
public void Chekker(ref ArrayList _NewList)<br />
{<br />
_Confirmer = _NewList;<br />
this.ShowDialog();<br />
NewList = _Confirmer;<br />
}
Now in the load method of the form i want to use the _Confirmer to populate the listview called ChekkerList.
How do i go about doing so...
Thank you in advance
Nico
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
u can try
ListViewItem lst = new ListViewItem();
for(int i=0 ;i < _NewList.Count ;i++)
{
lst.subitems.add(_NewList[i].ToString());
}
CheckerList.items.add(lst);
-- modified at 6:51 Friday 27th October, 2006
rahul
|
|
|
|
|
Hi!
I try to make som kind of install monitor program, I try sevral ways, the current working soltion is take before and after snapshots, and compares it. The problem with it, is the other activities on the computer, to filter it, I must know who make the canges.
Can somebody tell me how can I monitor the filesystem, and registry changes, occures by a specified application/thread?
I opened for any soltion.
Thanks for help!
|
|
|
|
|
plz help me
i am new to word addins i want to create my menubar for word document by using c# sheared addins i am not able to inshilize word menubar object
private Office.CommandBar menuBar;
menuBar = this.ActiveExplorer().CommandBars.ActiveMenuBar;
|
|
|
|
|
Hello,
i am using a treeview so to assign different icons to different nodes i used a imagelist and assigning the imageindex and selected imageindex properties of the treenodes with the index of the imagelist icons collection. But for some nodes in the treeview that setting is not working its displaying the icon at the 0th index in the imagelist and whenever i display the index value associated with that node using a messagebox its giving "-1" value.
Why thats happening how can i get the icon which i assigned using imageindex and selectedindex to those nodes.
Please help me,
thanks in advance.
|
|
|
|
|
i'm new cumer for C#,so i have created small programme that display sum details as wel as retrive there details as they want.so i've puted the menu there for open a new windows when user to view many windows,hw can i give coding for that?
In VB.net i can give
Main Window name-:frmmain
In the sub window i can create object of the main window an call that window from the sub window like as follows
dim object_name as new frmmain
object_name.show()
how can i give coding for call the windows in C#?
|
|
|
|
|
The way I read it you want to open a new Window..
form name: frmName
frmName frmName = new frmName();
frmName.Show();
If you didn't mean to open a form then I am misreading your post and am sorry
|
|
|
|
|
Chris Maunder wrote: Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Click here![^]
Regards
|
|
|
|
|
How to generate a random number.
I have Visual Studio 2003.
Help.
Vasildb
|
|
|
|
|
use the following code snippet:
Random rand=new Random();
and then u can use
rand.Next(1,100);
to generate a random no. between 1 & 100
Basically u have to specify the limits in which u want to generate a random no.
Hope this will work.
NEHA GUPTA
|
|
|
|
|
Neha_Gupta wrote: and then u can use
rand.Next(1,100);
to generate a random no. between 1 & 100
That will generate a random number between 1 and 99.
---
b { font-weight: normal; }
|
|
|
|
|
Thanx Guffa for correcting me
NEHA GUPTA
|
|
|
|
|
Thanks Guffa. This information helped me too. I was using the random generation in my program and was thinking the probability of generating last number could be less... but now came to know it does not generate. Intead it generates till one less(as in your example betwen 1-99) Thanks again!!!
- ashish
|
|
|
|
|
dear programmers
i have an application made in c# support multi language when installing on other pc i dont want to install language support from windows cd i want to intall it through my installing program how can i do it.
how to install asian language support for windows when installing my software any idea or where can i get setup files thant can run when installing a software.
sikandar
|
|
|
|
|
The whole setup this implies is difficult at best (if you are just looking to have your program running in a certain language). It probably would be best to get a Multi-Language Windows-Release and install your program there, then choose your program's display language according to the language options currently selected in Windows.
However, I would roam the net and look for a language installation package, then add it as a script to your install-packet-creator.
Or, x-copy-installations, check if the computer has the language support and run the language installation if it does not.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
can u plz tell me where i can get multi language support file..
sikandar
|
|
|
|
|
Hi,
Im looking forward to create my own component (Eg:Combobox) using C# by adding my own appearence and features without inhariting inbuilt controls in .net framework.But still i couldn't find the way of doing this.Please send me a way to do this and related references.
Thanking you,
Pubudu
|
|
|
|
|
|
This is my comparer:
public class movieIdCompareValueClass:IComparer
{
public int Compare(object a, object b)
{
return ((allInfo)a).movieId.CompareTo(((allInfo)b).movieId);
}
}
I am using it in:
found = Array.BinarySearch(outerContents, movieId, new movieIdCompareValueClass());
I have tried a couple different ways to set up the comparer, but I always get a runtime error on the above line:
System.InvalidOperationException
Additional information: Specified IComparer threw an exception.
What is causing this error? Is the comparer looking beyond the last element of the outerContents array? If so how do I prevent it?
|
|
|
|
|
It would be nice to know what exception the IComparer threw. It should be accessible through the InnerException property of the thrown InvalidOperationException .
If I have to guess, I'd say that you are getting an InvalidCastException . It seems your outerContents array contains allInfo objects as you're casting the objects a and b to it in your compare method. As object to search for you pass in something called movieId, so I guess it's a plain int or something similar which can't be cast to allInfo.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|