|
Hi,
I am trying to build my custom listbox control. The problem i am having is
that, if my list box shows 10 items and i have for suppose 20 items in it. now
when a user scroll down using lstBox 'VScroll' control then my application
doesn't know that the user has scroll down. Any Suggession without using
"Selected IndexChange " or "Click Event" or "Key Down" Events.
|
|
|
|
|
I know this is a cheesy solution, but perhaps you could periodically check if the listbox's TopIndex [^] has changed?
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
hi Ravi,
plz tell me which method or event of the listbox will going to help me in checking the top index periodically. Hoping to get the reply soon.
Thanks.
|
|
|
|
|
You'll need to set a timer and check the ListView 's TopIndex property every time the timer goes off.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
hi Ravi,
plz tell me which method or event of the listbox will going to help me in checking the top index periodically. Hoping to get the reply soon. I will also
look at the link you have mentioned. if in case it did provide me the desired result i will post the message for confirmation.
Thanks.
|
|
|
|
|
Can anyone tell me how to read all the nodes and their InnerText of an xml file?
|
|
|
|
|
Use an XmlDocument object to open the file. The DocumentElement propery is a reference to the root element that contains the nodes.
---
b { font-weight: normal; }
|
|
|
|
|
sample to read all the nodes of XML file
string[] sb=new string[4]{"","","",""};
XmlDocument doc = CreateDoc(XmlFile);
XmlNode root = doc.SelectSingleNode("FormatModule/Leads/Contents");
XmlNode root1;
string fieldname;
foreach(XmlNode node in root.ChildNodes)
{
if(root.NodeType != XmlNodeType.Comment)
{
string str=node.Name;
switch(str)
{
case "Body1":
root1=doc.SelectSingleNode("FormatModule/Leads/Contents/Body1");
foreach(XmlNode n in root1.ChildNodes)
{
if(n.NodeType != XmlNodeType.Comment)
{
XmlAttribute name = n.Attributes["type"];
if(name.InnerText=="text")
{
sb[0]+=n.InnerText.ToString()+"\n\n"+" ";
}
if(name.InnerText=="Field")
{
fieldname=n.Attributes["FieldName"].InnerText.Trim();
sb[0]+=DataLeads(id,fieldname);
}
}
}
break;
return sb;
}
Hope u might be knowing how to creaate XML file
Rizwan Afsar
Associate Member, Technical Team
IAP Company Ltd, Gurgaon
INDIA
www.iap-online.com
|
|
|
|
|
Hi,
You can also have a look at the code below..Hope it's useful to u..
class ReadXml
{
//private const String filename = "c:\\ala.xml";
private const String filename ="data.xml";
static void Main(string[] args)
{
XmlTextReader txtreader = null;
XmlValidatingReader reader = null;
try
{
// Load the reader with the data file and ignore
// all whitespace nodes.
txtreader = new XmlTextReader(filename);
txtreader.WhitespaceHandling = WhitespaceHandling.None;
// Implement the validating reader over the text reader.
reader = new XmlValidatingReader(txtreader);
reader.ValidationType = ValidationType.None;
// Parse the file and display each of the nodes.
while (reader.Read())
{
switch (reader.NodeType)
{
case XmlNodeType.Element:
Console.Write("\t<{0}>\n", reader.Name); break;
case XmlNodeType.Text:
Console.Write("\t{0}\n",reader.Value);
break;
case XmlNodeType.CDATA:
Console.Write("", reader.Value);
break;
case XmlNodeType.ProcessingInstruction:
Console.Write("", reader.Name, reader.Value);
break;
case XmlNodeType.Comment:
Console.Write("", reader.Value);
break;
case XmlNodeType.XmlDeclaration:
Console.Write("\n");
break;
case XmlNodeType.Document:
break;
case XmlNodeType.DocumentType:
Console.Write("\n", reader.Name);
break;
}
}
}
finally
{
if (reader!=null)
reader.Close();
}
Console.ReadLine();
}
}
Thank you,
Vaibhav
|
|
|
|
|
Hi,
I want to add or remove some algorithms used for SSL on IIS Web server, how can I do,
Thanks,
Hung
|
|
|
|
|
Hello! I have a strange question... I want to write a program that releases files that are in use by something I don't know...
Actually, I don't know where to start... If someone could help, I would be very thankful...
Thanks in advance!
|
|
|
|
|
First, you can't do that. The main reason is you don't control the file handle. Second, you can't clean up the resources in the app that has the file open in the first place. You'll only cause whatever app that is to crash because its file handle disappeared unexpectedly.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Firstly, chances are you won't be able to do this solely from the .NET framework. You'll probably have to dip into the Win32 API to find out which processes have loaded a particular file handle. That's where you'll want to start, see how you can get that information from the Win32 API.
Like Dave said, you couldn't really "unlock" the file. You could terminate the process that owns the file handle, if you can find out which process owns a particular file. And I don't know whether or not that's possible...I would guess it is, but I'm not knowledgeable enough to say.
|
|
|
|
|
Can anyone tell me how to write a Base64 Encoded xml file? I ve written the following 2 statements:
XmlTextWriter writer;
writer = new XmlTextWriter("msg.xml",null);
The second argument of XmlTextWriter is presently null, and it accepts the Encoding! Can anyone tell me what do I need to write in place of "null" to write the file as Base64 encoded?
|
|
|
|
|
I'm building a window base application, I'm supposed to use:
public class MemDoc : System.Collection.Generic.List<Member>
It's methods are simple add record, save file, open file.
I have a seperate Member class with all it's assignments and properties including an instance of another class.
Could someone point me to a good resource on how to access this when I'm not using :
static List<Member> MemberArray = new List<Member>
Trish Holt
|
|
|
|
|
Hi Trish.
Your question doesn't sound right, logically. So perhaps we can clear this up:
You're trying to make a class called MemDoc and have it inherit from a generic List of Member objects. Is this correct?
You're trying to access a static variable called MemberArray inside this MemDoc class. Is this correct?
|
|
|
|
|
GreenApple30 wrote: static List<member> MemberArray = new List<member>
Do you mean you wanted to use MemDoc instead of the above code? If that's the case then you just simply need to create an instance of MemDoc:
MemDoc MemberArray=new MemDoc();
...
foreach (Member memberItem in MemberArray) {
...
}
|
|
|
|
|
Hi,
I have a field of type datetime in my SQL database and I want to populate that field from parsed date from email message. My email message parser is giving me this following string as date.
"Thu, 13 Apr 2006 11:37:18 -0700 (PDT)", now , is there any common way to convert this string into C# DateTime Format so that I can insert this value in my SQL datetime field.
Please help...
Thanks
|
|
|
|
|
|
Thanks a loooooooooooot for the information.
|
|
|
|
|
|
I am adding items to a listView, but during runtime I see them being displayed one next to the other, instead of one below the other. I mean that I see that item 2 gets added to the listView and is displayed parallel to item 1 present in the listView instead of being displayed below item 1. Can anyone tell me the reason and possible solution to display it one below the other?
|
|
|
|
|
|
Hi,
I want to write a program that controls IIS. The reason that I don't want to use MMC(tool of Microsoft used to configure IIS) is that I want to group some operations to do a specific thing into 1 operation.
Can you give me some suggest?
thanks for your help,
Hung
|
|
|
|
|
Hi to all
In windows application (C# or Vb.net) How we can add (one time) some PictureBox or ImageList into project and reuse its in all Forms.
in normal we must for each form add its ImageList and PictureBoxe.
it is very important to reduce exectable file size.
Please Help me: zolfaghari@usa.com
zolfaghari <zolfaghari@usa.com>
|
|
|
|