|
Why on earth, CheckBoxList in windows form doesn't have datasource property.
i just want to bind my checkboxlist with dataset. How am i suppose to do that?
Thanks
|
|
|
|
|
To ratate a rectangle at an angle where angle would not be referenced from default World Cordinate but custom defined reference point.
SHK
|
|
|
|
|
is there a question ?
Get your math equations, and code them inside your Paint handler.
You will need the Math class, with Cos and Sin methods, and Pi constant.
Or you can hide behind the Graphics.RotateTransform method !
And obviously there are lots of CodeProject articles that rotate something.
|
|
|
|
|
Luc Pattyn wrote: is there a question ?
I wondered that myself. I just see a statement that even the Plain English Compiler would have a tough time parsing
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi there,
I have two classes; ClassA and ClassB.
I want that ClassA has an object of classB by which call the methods of ClassB.
like this: objectOfClassB.Methods();
ClassB is an abstract class so it cannot be instantiated.
In other words I want other classes access to ClassB only by its object in ClassA.
How can I afford to do this?
|
|
|
|
|
Majid Shahabfar wrote: I have two classes; ClassA and ClassB.
No, you don't. Nobody gives threir classes stupid names like that. In reality they have better names, that says something about what they are for. By taking away those names and creating phony names, you only make it harder to understand what it is you are trying to do.
Majid Shahabfar wrote: I want that ClassA has an object of classB
As ClassB is an abstract class, you can't create instances of it, so ClassA can not have an instance of ClassB. You have to have a class that inherts from ClassB, so that you can create an instance of that class.
Majid Shahabfar wrote: How can I afford to do this?
You can't. You would have to buy Microsoft, so that you could make them change how the language works, and obviously you can't afford to buy Microsoft.
---
single minded; short sighted; long gone;
|
|
|
|
|
Ok,
Suppose ClassB is not an abstract class.
Now show me a way by which other classes make access to ClassB members only through ClassA. (not directly instantiate an object of ClassB).
|
|
|
|
|
What is it that you are trying to accomplish really?
You can prevent creations of ClassB insteances by making the constructor non-public. If you want to restrict creation of ClassB instances to ClassA, you have to put the two classes in an assembly by themselves, so that you can make the constructor internal.
---
single minded; short sighted; long gone;
|
|
|
|
|
A bit harsh don't you think Guffa?
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
Hi,
you could make ClassB a private inner class of ClassA, so nothing outside
ClassA would be able to instantiate or otherwise reference ClassB.
Making ClassB "abstract" is irrelevant in this; if you do you need yet another
concrete class that inherits from it.
|
|
|
|
|
Hi guys,
i have a form, which, on mouseclick, opens another form. Half of the time it's all well. But sometimes i get an InvalidOperationException with the message that this can't be done while resizing an automatically filled column.
Now, on the second form there is a gridview, which is filled at the LOAD event.
Creating Form 2:
<br />
FrmPaths f = new FrmPaths();<br />
f.Show(this);<br />
Load event:
<br />
foreach (string s in PathManagment.Directories)<br />
{<br />
dataSet1.Tables["paths"].Rows.Add(new object[] { (s) });<br />
}<br />
Could anybody please help me?
|
|
|
|
|
sounds strange .......
do you get this exception when you are debugging?
if so,
{
then there's no problem
}
else
{
i don't know
}
|
|
|
|
|
yes i got this exception when i was debugging.
i even know where it came from. I had ColumnsHeaderHeigthSizeMode on Auto by mistake. I turned it off and now the problem is gone.
I'd like to understand what the problem is, anyway. Nobody knows?
Btw. why isn't there a problem if i was debugging?
Thank you
|
|
|
|
|
i don't know whats wrong with VS, i have noticed that when im in debugging mode sometimes i get exception but when im running the project normally that when not in debugging mode, it runs fine. and mostly the exeception is null reference exception.
|
|
|
|
|
Ok thank you. That is good to know. I was really desperated.
|
|
|
|
|
and yes i forgot to mention one thing, this type of error usually occurs when you are going to another class/form, like the way you were doing
myform.show()
and in your myform load event you had something n there you get some error
|
|
|
|
|
I'm having the following issue:
i am using "Directory.GetFiles" to retrieve all filenames from a path.
In that path i have filenames which have hebrew characters in them.
I use a debugger to take a close look at the characters that constructs such a filename string and i can see that
the hebrew characters are not REAL char (they are numbers above 1000 - how can that be for char?).
This makes a problem when i try to write the string to a file - the characters looks weird when i open it later with a text editor,
and that is probably because the truly written thing for each char is 2 bytes instead of just one that represents each hebrew character.
How can that be solved?
Thanks.
|
|
|
|
|
Hi,
you can specify which character encoding should be used when writing text to
a file. By default ASCII is used, and non-ASCII characters get mapped onto
ASCII characters somehow (e.g. accents would be dropped); of course for very
different scripts, such mapping makes no sense. You really want a file that
can hold real 16-bit characters where appropriate.
One way of doing this is by using a StreamWriter; one of its constructor
overloads takes an Encoding object, you should consider Encoding.Unicode
BTW: your Hebrew characters are real characters, if Visual shows them as numbers
that's to make sure you can read them (if you're unfamiliar with the script),
and you can paste them like that in an ASCII file. Normally your source files
are ASCII files, taking one byte per character; as soon as you paste a non-ASCII
character in a string literal or so, the file will be saved as a UTF8 or a Unicode
file, and may no longer be readable by other apps.
|
|
|
|
|
Well - using UTF8 with the StreamWriter did the job!
Man - thanks a lot!
|
|
|
|
|
impeham wrote: they are numbers above 1000 - how can that be for char?
You're clearly an ex-C++ programmer. char in C# is not a byte-size quantity as it is in C++, it represents a single UTF-16 encoded value (i.e. it's a synonym for short ). All strings in the .NET Framework are Unicode internally, using UTF-16. Hebrew characters fall in a block between U+0590 and U+05FF, with alef encoded at U+05D0 = 1488.
The default encoding for .NET StreamWriter objects is UTF-8. Alef does indeed turn into two bytes in the output, 0xD7 0X90. If you want to use a different encoding, for example Windows codepage 1255 for Hebrew, you need to create a suitable Encoding object and pass it to the StreamWriter 's constructor.
|
|
|
|
|
i have seen the tags became popular now in many sites and blogs, last i have seen it in the qna.live.com and i want to know to deal with it? is it just a text file or database entry..
can anyone explain tags please..
|
|
|
|
|
jrahma wrote: i want to know to deal with it?
In what respect do you wish to "deal with it"? The way you've worded that, you make it sounds like you want some one to take it out back and shoot it.
jrahma wrote: is it just a text file or database entry..
I would imagine it would be database entries (plural)
jrahma wrote: can anyone explain tags please..
It is just a simplified way of saying categories, but more fuzzy warm and fluffy.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
any where i can find full details (including technical) about tags?
|
|
|
|
|
Tags are a fuzzy concept. I don't see what technical information you'd be looking for becuase they are, at their simplest, a many-to-many join between two (or more tables)
Take Flickr for example. Tags are associated with photographs.
One tag is associated with many photos
One photo is associated with many tags.
The three tables are:
Tag
---
TagID
Text
Photo
-----
PhotoID
PhotoBinary
PhotoTag
--------
TagID
PhotoID
That is the basis of a many-to-many join. The subject of a Databases 101 course.
There isn't much more to it than that.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
hi,
I have the following question about an internet cafe software?
How can I coctrol the cafa PCs (lock and unlock)?
Is there any way to create a system restore point so whenever client installed any programs of files i can go back to my first image?
how to protect both above point from normal user from stoppong or closing it?
|
|
|
|