|
|
Hello Guru,
How do you play avi movies files such as deleting, copying, etc. in C#? I there a movie or animation control for this?
Thanks so much,
Khang Nguyen
|
|
|
|
|
I saw some kind of Animation Control under Dialog Editor tab of Toolbox but it's disabled and can't drag it out onto a form or dialog. How can you enable this Animation Control?
Thanks,
Khang Nguyen
|
|
|
|
|
hello,
here is a small problem i am facing,
here it is: can i run my c# program on Linux. i.e. say i have a c# program (windown platform) and i want it to run on Linux, now can I?
looking for guidance,
KHURRAM.
Asim
|
|
|
|
|
|
I have some Mdiclient who's windowsState is "Maximized" and where minimumBox and maximumBox is set to false.
ControlBox is set to false.
FormBorderStyle is "FixedToolWindow".
But still there is 3 icons in top right, when the mdiClient is Maximized....
And there is also a restore icon in top left.
How do I remove these icons, so that my MdiClient always is Maximized??
See:
http://csharp.users.whitehat.dk/mdi.jpg
Thanks
|
|
|
|
|
I belive you set the control box property to false.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
No it won't work.
If the MdiClient is maximized, then the 3 icons are still there.
Anyway, the icon on top left is also there.
|
|
|
|
|
I tried this and it worked for me. No icons are displayed.
My MDIClient window had following properties
1. MaximizeBox - false
2. MinimizeBox - false
3. ControlBox - false
4. FormBorderStyle - FixedDialog
5. WindowState - Normal
Try with these property values and it should work!
Suhas
|
|
|
|
|
To get the user from directory service the below code works perfectly fine.
But i want to access files in the user name ou=myname. I have place a text file name note.txt in myname writeing this addres in explorer
ftp://.admin.myname.user.novell@nldap.com/USER/myname/
all i want to know how to access the files. How can i get the files which i have uploaded on myname..... so i can modify n delete them also.
i have got the help to add user modify user n delte user but not abot the files of users ...
string path = "LDAP://www.nldap.com";
System.DirectoryServices.DirectoryEntry entry = new .DirectoryServices.DirectoryEntry(path);
System.DirectoryServices.DirectorySearcher mySearcher = new
System.DirectoryServices.DirectorySearcher(entry);
mySearcher.Filter = ("(ou=myname )");
SearchResult result = mySearcher.FindOne() ;
if( result != null )
{
Console.WriteLine("User found");
foreach( string key in result.Properties.PropertyNames )
{
// Each property contains a collection of its own
// that may contain multiple values
foreach( Object propValue in result.Properties[key] )
{
Console.WriteLine(key + " = " + propValue);
}
}
}
else
{
Console.WriteLine("User not found");
}
|
|
|
|
|
I am interested in putting up some sort of "Please Wait" or other animated gif while a long search executes. I have created a popup with javascript launced with a button attribute. But I cannot close the page easily. Any suggetions on this or even a better way to do it would be great. thanks.
|
|
|
|
|
Add this to the top of the search page (the one that actually outputs the processing):
<script>
var waitwin ;
function waitwindow()
{
waitwin = open('',"","width=10,height=10,left=400,top=100,scrollbars=0")
waitwin.document.open();
waitwin.resizeTo(1, 1);
}
</script>
Right when you start processing search, do this:
<script>
waitwindow();
waitwin.document.write('< p align="center">Please Wait< /p>');
</script>
when the search ends, output this:
<script>
waitwin.close();
</script>
Make sure the page is not buffered, or it'll wait until then end and flash everything open and closed at once.
|
|
|
|
|
hi.
I have a treeview that has a context menu associated with it. When I run the application and select a node then right click on another node, the context menu appears, but since the node isn't "selected" (the focus reticle is on the left-clicked node), the contextmenu doesn't work right since it performs it's actions on treeview1.SelectedNode.
I hope I have explained myself cleary. I am looking for a way to update selectednode and move the focus reticle to the node where the context menu was popped up.
|
|
|
|
|
|
worked like a charm. thanks
|
|
|
|
|
what scewey logic is c# using for scope?
why does the second declaration of lenum cause this code not to compile ? but j is ok ?
using System;
using System.Collections;
public class Test {
public static int Main(String[] args) {
ArrayList b = new ArrayList();
ArrayList c = new ArrayList();
for( int i = 0; i < b.Count; i++ ) {
if( true ) {
IEnumerator lenum = b.GetEnumerator();
while( lenum.MoveNext() ) {
int j = 0;
j++;
}
}
IEnumerator lenum = c.GetEnumerator();
while( lenum.MoveNext() ) {
int j = 0;
j++;
}
}
return 0;
}
}
|
|
|
|
|
My guess is that the C# compile knows that the if( true ) block will ALWAYS be executed and optimizes the if statement out. The result is that lenum = b.GetEnumerator() and lenum = c.GetEnumerator() are in the same scope.
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
|
i just did that as a short example. my actual code where i found that oddity does the same thing.
|
|
|
|
|
This is no different to C. Just brace it.
public class Test
{
public static int Main(String[] args)
{
ArrayList b = new ArrayList();
ArrayList c = new ArrayList();
if( true )
{
IEnumerator lenum = b.GetEnumerator();
while( lenum.MoveNext() )
{
int j = 0;
j++;
}
}
{
IEnumerator lenum = c.GetEnumerator();
while( lenum.MoveNext() )
{
int j = 0;
j++;
}
}
return 0;
}
}
leppie::AllocCPArticle("Zee blog");
|
|
|
|
|
The scopes of the two lenum variables overlap whereas those of the j variables do not. Read section 5.1.7 of the C# language specification.
Within the scope of a local variable, it is a compile-time error to refer to the local variable in a textual position that precedes its variable-declarator.
However...
The lifetime of a local variable is the portion of program execution during which storage is guaranteed to be reserved for it. This lifetime extends from entry into the block, for-statement, switch-statement, or using-statement with which it is associated, until execution of that block, for-statement, switch-statement, or using-statement ends in any way.
These two statements together seem to indicate that the compiler is doing what it is suppose to. I wonder why the scope of a variable starts at the entry point of the block and not at the declaration point? Afterall, if you can't reference the variable in a textual position preceding the declaration then why not define its scope in the same manner? I'm sure there's a good answer. I just don't know what it is
Brian
Brian
|
|
|
|
|
so its not a bug because they say its feature. nice.
any other decent language would let this code compile.
oh I'll just add it to my list of screwed up things c# does
|
|
|
|
|
So C is not decent. Get a life or go back to whatever decent language you were using previously.
PS: did you even read my reply?
PSS: using a foreach loop allows you to do that.
PSSS: You are infact constructing your IEnumerator loop incorrectly. Here is the proper way:
IEnumerable nodes;
....
for (IEnumerator enumer = nodes.GetEnumerator(); enumer.MoveNext(); )
{
object node = enumer.Current;
...
}
leppie::AllocCPArticle("Zee blog");
|
|
|
|
|
leppie wrote:
So C is not decent. Get a life or go back to whatever decent language you were using previously.
you would think a made i made a comment about your mother.
PS: did you even read my reply?
i did read your reply but you didn't explain the problem you just posted a work around.
PSSS: You are infact constructing your IEnumerator loop incorrectly. Here is the proper way:
incorrectly ? there is very little difference between the two and in my opinion the while loop is more readably, you don't have an empty statement as in your for loop.
what's the deal anyways. i make a couple of comments about the quirks in the language( every language has them ) and you go off on me like i declare C# as the worst language in the world and every programmer who uses is stupid.
now if i have offended anyone, i apologize. but you should remember its just another programming language. i don't think knights running around defending its honour are necessary.
|
|
|
|
|
jpribele wrote:
now if i have offended anyone, i apologize. but you should remember its just another programming language. i don't think knights running around defending its honour are necessary.
I think I have misunderstood too. (rough week/boring weekend) I apologize. From the post below by Rich333 (pnet developer) he clarified it.
It appears to be a EMCA spec interpretation problem.
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
I think you may have misunderstood what the point of the original post was. It was a question about how C# handles scoping. It is a very legitimate and intelligent question. The author was not looking for a work-around.
Brian
|
|
|
|