|
Derive a class from System.Windows.Forms.Form, and override the WndProc method.
As a side note, it's not a good idea to do custom drawing on the title bar. The title bar is maintained by the OS; in new versions of Windows, your app may not port well. In fact, Vista migration guidlines specifically mention that drawing on the title bar will be corrupted in Vista since the window manager composites how the title bar is blended with the background (as windows are translucent in Vista).
|
|
|
|
|
so what do you suggest me to do?
|
|
|
|
|
In regards to the WndProc or the titlebar drawing?
|
|
|
|
|
I am developing GUI of my Project in C# for easness and core functionallity is implemented in C++ (UN Managed).
So, I write a wrapper class in Managed C++ which handles all Marshalling-Un Marshalling issues as well as calling unmanaged C++ class.
The problem is that the wrapper class is compiled properly but when i call this wrapper class which is Managed DLL i got an exception System.IO.FileNotFoundException at dll loading time. so catch block can not handle it and exception is thrown directly.
Please help me in this regards
Zeeshan
|
|
|
|
|
|
I want to increment the size of array at run time and also want to preserve the data already existing in the array
Help me please
|
|
|
|
|
There is no way of changing the size of an array. You have to create a new array of the desired size and copy the contents of the old array to the new.
Perhaps you want to use a list or dictionary instead of an array.
---
b { font-weight: normal; }
|
|
|
|
|
We use redim in vb.net is not there any redim like function in C#.
Thanks
|
|
|
|
|
No, there isn't any ReDim in C# or in the .NET framework.
The ReDim command in VB.NET just does what I described. It probably exists mostly for historical reasons, and I suggest that you don't use it at all. Leave the ancient commands behind and use what's in the framework.
---
b { font-weight: normal; }
|
|
|
|
|
|
There is a Collection Class called ArrayList. There are three methods: (Add, Insert, Remove). You can find this code example in Visual C# .NET Step by Step.
Quick Example:
ArrayList numbers = new ArrayList();
//fill the arrayList
foreach (int number in new int[12}{10,9,8,7,7,6,5,4,3,2,1})
{
numbers.Add(number);
}
//Remove first element whose value is 7 (the fourth (4th) index 3)
numbers.Remove(7);
//Now remove the element that's now the 7th element. index: 6 (10)
numbers.RemoveAt(6);
Hope this helps. . .
Tom Johnson
A+, MCP MCSD .NET SQL
|
|
|
|
|
Hi.
I have VS 2003 on my computer and I am wondering if I can install VS 2005 also on my computer without uninstalling 2003. Can I have both VS 2003 and VS 2005 on my computer at the same time?
Thanks,
F
F
|
|
|
|
|
|
Sure you can (If your PC requrments for installing both of vs.net 2003 and vs.net 2005).
|
|
|
|
|
having following problem
i use a xmltextreader to read a xml document. After i construct it, i create a xmlvalidating reader based on this xmltextreader.
Then i create a xpathdocument on this object
XmlTextReader reader = new XmlTextReader(XXX);
XmlValidatingReader validatingReader = new XmlValidatingReader(reader);
validatingReader.Schemas.Add(XmlSchemaCache.GetInstance().GetSchema("MYSCHEMA"));
validatingReader.ValidationType = ValidationType.Schema;
XmlReader readerToUse = validatingreader
XPathDocument document = new XPathDocument(readerToUse );
document.createnavigator() --> here my code crashes.
why? in the incoming (XXX) xml file, the default namespace is missing. Now i can't add the namespace to the file manually. So my question is now, how can i add the namespace is added to the reader, before i do document.createnavigator, without using DOM.
i hope someone can help me out
|
|
|
|
|
Com'on people, no one can help me out here?
|
|
|
|
|
I'm trying to figure out how i can access the source of a website or read the text right off the page. in more detail, i want to be able to run the program and have it automatically open up, lets say cnn.com (example), and do searches for html tags or words to load all the "latest news" headlines into a database for later access.
-Scott
|
|
|
|
|
Do you want to use something like a RSS feed?
|
|
|
|
|
You can use an HttpWebRequest object to request a web page.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks, that pointed me in the right direction.
|
|
|
|
|
I have looked all over the place for source code to PING another host written in C#.
I want to read hostnames from a config file and check to see if they are alive.
Can anyone help me?
-- modified at 8:12 Monday 10th April, 2006
|
|
|
|
|
|
Hi, quick question.
Anyone know how to use quotes in c#.
In vb.net, I can write:
Console.Writeline ("This is a " & chr(34) & "quote" & chr(34));
which would output:
This is a "quote"
So how can I do it in C#?
PS: I need a quote ("), not a hypen thingy (')
|
|
|
|
|
You can insert meta-symbols directly into text after "\" symbol.
Your sample:
Console.WriteLine("This is a \"quote\"");
-- modified at 7:03 Monday 17th April, 2006
|
|
|
|
|
GAAH!
Always something simple.
Thanks so much.
Andy
|
|
|
|