|
Thank you, i solved the problem. I found an error in my code.
|
|
|
|
|
Hi!!!
i have created a custom text Box inherited from TextBox Class. When I drag 'n' drop it from toolbox to Form. It shoes wait cursor and nothing happens . But creating at runtime works fine....any hints???
sorry for my bad English.
|
|
|
|
|
You may have included some code that causes an infinite loop or the like at design time. Check your code for anything that relies on something that only exists at runtime. You can then do some logic arounbd this checking for whether it is designtime or runtime.
if(!this.DesignMode)
{
this.DoSomething();
}
Let me know if you need more info.
|
|
|
|
|
how can i add a user in active directory?
i want to add a user in active directory and set his password.
how can i.
|
|
|
|
|
use
DirectoryEntries.Add method
Sonork ID 100:25668
|
|
|
|
|
Hi,
I am doing some owner drawn menus that are supposed to display when right clicking on a NotifyIcon in the Tray. This has lead me to discover these 2 issues...
1. You can't use the OwnerDraw property on menuitems that are added to the "ContextMenu" property of a NotifyIcon. When you do, the user defined "MeasureItem" and "DrawItem" events never fire so you end up with a blank menu. - I fixed this by switching to use the NotifyIconEx that I downloaded from this site, and all my menus work fine then.
2. When you call e.DrawBackground() in the DrawItem event of the menu it draws the correct highlight color, but it draws the background as "KnownColor.Window" instead of "KnownColor.Menu" when the item isn't selected.
Does anybody know anything about these 2 things? Anybody know any way to get this work correctly? Or are they already working correctly and I just didn't RTFM?
Cheers,
Chris.
|
|
|
|
|
Hi,
In what dll is stored the GET_X_LPARAM(GET_Y_LPARAM) macro from the win32 SDK?
It is declared in WindowsX.h, but in what dll it is located?
As for my custom caption form I need to get the non-client mouse coordinates and to override the wndproc and catch the WM_NCHITTEST message.
Thanks in advance!
Gogou
GAtanasov
|
|
|
|
|
Macros aren't "stored" in DLL's. Macros are simply code substitution constructs which allows you to substitute a block of code with a friendly name. In other words, when you compile a source file and a macro is encountered, it removes the macro name from the source location and places the macros code at that place and continues compilation. The macro itself, just like a comment, isn't located in the resultant binary file. You'll have to write your own version of it.
|
|
|
|
|
C++ macros are not located in DLLs, they are parsed at compile time.
Alexandre Kojevnikov
MCP (SQL2K, Win/C#)
Leuven, Belgium
|
|
|
|
|
Hi. I'm a C# newbie and I'm having a bit difficult time to understand using "this". For example:
public class DBBool
{
public DBBool(int value)
{
this.value = value;
}
.....
}
By using "this.value = .." to what do we assing the value and how will we use that value afterwards?
|
|
|
|
|
The this pointer is a reference to "yourself". Use it to access members (properties and methods) you inherited from other classes, and for a way to pass a ref of yourself to another object.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Nice sig...
Hawaian shirts and shorts work too in Summer.
People assume you're either a complete nut (in which case not a worthy target) or so damn good you don't need to worry about camouflage...
-Anna-Jayne Metcalfe on Paintballing
|
|
|
|
|
jdunlap wrote:
"Do unto others as you would have them do unto you." - Jesus
Not to sound picky, but I thought that was quoted by confucious??
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|
|
Both of them said it. It is the basic tenet of morality - loving and caring for others. But you are right - that exact wording was probably Confucius's.
It will be different depending on which translation of the Bible you use, but here is the NASB-U version, which puts it in plain, every-day English:
Luke 6:31 "Treat others the same way you would want them to treat you."
Something to think about from day to day, isn't it?
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
this refers to that particular instance of the class.
In the snippet above you have to use this.value in order to assign the value passed in as value to the variable called value in the class.
If you didn't specify this the compiler wouldn't know that you mean the variable named value in the class instead of the local variable called value .
Make a little more sense?
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
So this code translates as: "Assign the value from parameter to the 'value' variable of the DBBool class". Am I right?
|
|
|
|
|
Short and Sweet: "this" refers to the class in which you are typing the word "this" in. It just specifies that you are working with THIS class and not any other class the you refernse to, just the one were you are currently coding in....
public class OtherClass
{
string MyVar = "OtherVar";
public OtherClass()
{
}
}
public class MyClass
{
string MyVar = "YourVar";
public MyClass()
{
string OUTCOME = this.MyVar //is anything in MyClass, nowhere else
}
}
the OUTCOME would be "YourVar";
Leon v Wyk
|
|
|
|
|
I'm pretty new to .NET and XML here, and now I want to write a program in C# to remove the heading line from input XML file. For example, my input XML file will look sth. like this:
- <rptindex>
<title>xxxxx
<description>yyyyyyyy.
<subject>
..............
Now, I want modify this file and remove the first line "", so the modified file will be:
- <rptindex>
<title>xxxxx
<description>yyyyyyyy.
<subject>
..............
Can anybody advise me how to do it? Thanks!
|
|
|
|
|
Read the file line by line, and throw away the first line.
|
|
|
|
|
If you're talking about the pre-processing line or a DOCTYPE, that would work. However, if you're talking about removing the root element, you should read-in the document as an XmlDocument , get the child node(s) of the DocumentElemnt , and write those out to a file.
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
How do I make my own exception class?
This is as far as I got:
class WhatEverException : System.ApplicationException<br />
{<br />
}
Now...
How do I set the exception message from my class? I didn't notice any members that would allow it... am I just missing soemthing?
|
|
|
|
|
|
|
Hi,
I have a problem with streaming XML. I have created an aspx which return me an xml file format (Type text/xml, Encoding.UTF8). Also now, I try to read this stream in the XmlTextReader but I receive an Error Message when I parse it. And of course, I don't understand that.
Could you help me?
It is a bit urgent....
Thanks a lot
Code Source
XmlTextReader XR = new XmlTextReader(Server.MapPath("GenerateXmlTreeView.aspx"));
while(!XR.EOF){
XR.ReadElementString(); //Here Thrown exception
}
Sr.Close();
When I run may aspx
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Xml.XmlException: The '%' character, hexadecimal value 0x25, cannot begin a name. Line 1, position 2.
Source Error:
Source XML:
<?xml version="1.0" encoding="utf-8"?>
<treeview title="Licenses Tool">
<custom-parameters>
<param name="shift-width" value="15" />
<param name="img-directory" value="images/" />
</custom-parameters>
<folder title="1999" url="49">
<folder title="Gis Eastern" url="39">
<leaf title="Azerbaijan" url="37" reg="N" />
<leaf title="Belarus" url="20" reg="N" />
<leaf title="Bulgaria" url="21" reg="N" />
<leaf title="Croatia" url="22" reg="N" />
<leaf title="Czech Republic" url="23" reg="N" />
<leaf title="Estonia" url="24" reg="N" />
<leaf title="Hungary" url="25" reg="N" />
<leaf title="Kazakhstan" url="26" reg="N" />
<leaf title="Latvia/Lettonia" url="27" reg="N" />
<leaf title="Lithuania" url="28" reg="N" />
<leaf title="Poland" url="29" reg="N" />
<leaf title="Rumania" url="30" reg="N" />
<leaf title="Russia" url="31" reg="N" />
<leaf title="Slovakia" url="32" reg="N" />
<leaf title="Slovenia" url="33" reg="N" />
<leaf title="Turkey 1" url="38" reg="N" />
<leaf tit
-=zoltx=-
|
|
|
|
|
zoltix wrote:
Server.MapPath("GenerateXmlTreeView.aspx")
This just returns the path to the "GenerateXmlTreeView.aspx" file on the server. It doesn't execute the code contained in that file or do anything but take the virtual filename and give you the physical path to it.
You will probably be better served if you ask this in the ASP.NET forum to find out how to get the output of that page into another page.
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|