|
I want to use the DateTimePicker Control, but on language change the control should show in appropriate language? Example on French it changes the date format into french. I try to use the Globalization way but it didn't work, is any C# Guru help me out in this. I will be thankful.
|
|
|
|
|
Hey all, I'm trying to make a project that builds a directory of files so that a user can burn them to CD. One of the requirements is that I have to have an autorun file that starts up an HTML file in IE. I don't know if this is the right place...but I thought I'd ask here first.
David Stone
dstone@newcenturytitle.com
Procrastination is like masturbation; it's all good until you realize you just screwed yourself.
-Writing on a bench at college
|
|
|
|
|
I'd try:
Put an Autorun.inf file in the root of your dir for CD.
in Autorun.inf put:
[autorun]
open = your_html.html
; the icon of the CD shown in the explorer
icon = the_cd.ico
/////
Should launch with your default browser.
Nitron
_________________________________________--
message sent on 100% recycled electrons.
|
|
|
|
|
Cool. I'll try it out now. Thanks.
David Stone
dstone@newcenturytitle.com
Procrastination is like masturbation; it's all good until you realize you just screwed yourself.
-Writing on a bench at college
|
|
|
|
|
|
Check out the System.Windows.Forms.FormBorderStyle - this will make the dialog fixed:
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
Also, set the MaximizeBox to false
Andreas Philipson
|
|
|
|
|
I am trying to retrieve all the domains using ADSI. I don't know much about
ADSI and have been reading the docs on it with unavail.
I have currently used the code below to retrieve the users in the admin group
however, when the str variable is set to "WinNT://computer/Users,Group" it
gets to the loop stage and throws the exception: "specified cast is not valid"
To retrieve domains, I am guessing its similar to this code, however, I have
to change the Invoke method and filter etc.
Any help is greatly received
string str = "WinNT://computer/Administrators,Group";
DirectoryEntry ent = new DirectoryEntry(str);
IADsMembers mc = (IADsMembers)ent.Invoke("Members");
mc.Filter = new object [] {"user"};
foreach (IADsUser member in mc)
{
Console.WriteLine(member.ADsPath + ": " + member.Name);
}
|
|
|
|
|
Can anyone point me in the direction of how I might create a component that floats. eg. a floationf toolbar?
|
|
|
|
|
|
Andreas Philipson wrote:
Magic Library 1.6
Hmm, dont you mean Carlos Perez's UtilityLibrary? I cant find a single reference to toolbars in the MagicLibrary
READ MSDN
|
|
|
|
|
In the .NET samples (and its online version at www.gotdotnet.com) there is an article about hosting a custom control within IE. I am damned if I can get it working (on two totally different machines/operating-systems/web-servers).
The steps I've done:
1) Take the DLL and HTML page and install it on my web-server
2) Create a virtual directory and allow execute access (not sure if I really need it)
3) Access the HTML through my IE6
All I get is a empty/dead object area.
After some (lots of) hunting, I found this link explaining that the little "broken image" icon is actually as a result of not having the correct access rights (apparently an exception is being raised).
http://www.mastercsharp.com/article.aspx?ArticleID=72&&TopicID=8
So, now.. I've increased the "trust" for my web-server (and placed it within the Trusted zone). Following their instructions, I need to "trust" the assembly. However, on the wizard (The "Which assembly do you want to trust" step) after entring the URL to the .NET DLL, I get an error complaining about it being unable to open the assembly.
If I browse to the directory and try to "Save Target" the DLL, I get a server error 500. The same happens if I try to download it using something like WGET. Any ideas?
I've tried this on the following setups with identical results:
w2k, IIS
nt4, PWS
Has anyone got this working? Please...
Regards,
Ray
|
|
|
|
|
Ray Hayes wrote:
If I browse to the directory and try to "Save Target" the DLL, I get a server error 500. The same happens if I try to download it using something like WGET. Any ideas?
Does the directory you are trying to download from have read access?
Ray Hayes wrote:
So, now.. I've increased the "trust" for my web-server (and placed it within the Trusted zone). Following their instructions, I need to "trust" the assembly. However, on the wizard (The "Which assembly do you want to trust" step) after entring the URL to the .NET DLL, I get an error complaining about it being unable to open the assembly.
There are 2 ways of adding a remote assembly, one requires the filename including .dll extension, the other expects the type, normally filename excluding extension.
Try looking at some remoting examples.
Hope this helps
READ MSDN
|
|
|
|
|
leppie wrote:
Does the directory you are trying to download from have read access?
Since security isn't my biggest concern yet, yes. All rights are assigned.
leppie wrote:
Try looking at some remoting examples.
Remoting is something different to what I'm trying to do here. I've been very successful at remoting after reading "Advanced .NET Remoting" by Ingo Rammer.
leppie wrote:
There are 2 ways of adding a remote assembly, one requires the filename including .dll extension, the other expects the type, normally filename excluding extension.
Neither seem to allow the mscorfg.msc to load the assembly, thus grant runtime rights. Why is this so hard? On the web people either seem unable to get this working at all and others say it is simple (although I suspect that they were using the betas prior to the security being beefed up). The gotDotNet articles don't even touch upon the security issues (making me suspect that they just slightly updated it from the beta).
Regards,
Ray
|
|
|
|
|
Sorry it wasnt any help
READ MSDN
|
|
|
|
|
leppie wrote:
Sorry it wasnt any help
Thanks for the effort anyway...
leppie wrote:
READ MSDN
I have, they don't mention security in their examples. That's why I was trawling the web for keywords..
Regards,
Ray
|
|
|
|
|
Ray Hayes wrote:
leppie wrote:
READ MSDN
I have, they don't mention security in their examples. That's why I was trawling the web for keywords..
lol, I don't think you noticed that "READ MSDN" is leppie's signature so its on every post he makes
James
"Java is free - and worth every penny." - Christian Graus
|
|
|
|
|
HAHHA,
READ MSDN
|
|
|
|
|
Although I didn't get any success for my question here, I thought I'd post my solution incase anyone else is looking for the same:
In http://msdn.microsoft.com/msdnmag/issues/02/06/rich/rich.asp it mentions:
"The next tip is about virtual root settings. Surprisingly, if the IIS virtual root is set to allow execute permissions of 'Scripts and Executables,' your managed browser control will not be hosted by the browser because IIS will treat dll or exe like an ISAPI and try to run it. Setting the execute permissions for the virtual root to either "Scripts" or "None" will allow your control to be hosted."
So basically, my problem was with the web-server preventing the download of the DLL's, removing the "execute" fixed this...
Regards,
Ray
|
|
|
|
|
how do i make the form components to look like the XP controls?
[i bet its omethin reeeeealy simple, and im gonna feel stupid when i find out]
Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk "All programmers are playwrights and all computers are lousy actors."
|
|
|
|
|
|
not that hard, all you gotta do is copy the xml they give you into a file of name <project>.exe.manifest and put it in the same directory as the prog and it runs wiv xp style.
Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk "All programmers are playwrights and all computers are lousy actors."
|
|
|
|
|
I have an SqlCommand AuthUser which call a sproc in a database. When I call execute scalar it produces a NullReferanceException. Code below. Thanks.
private bool CustomAuthenticate(string username,string password)
{
AuthUser.Connection = Global.sqlConnection;
AuthUser.Parameters[0].Value = username;
AuthUser.Parameters[1].Value = password;
long ret = (long)AuthUser.ExecuteScalar();//Crashes here
return (ret > 0);
}
Steve
Not all who wander are lost...
|
|
|
|
|
I'm kinda guessing that your stored procedure is returning null....
|
|
|
|
|
ok...Thanks. Is there a way that I can tell?
Steve
Not all who wander are lost...
|
|
|
|
|
Steve Severance wrote:
ok...Thanks. Is there a way that I can tell?
Yes, not sure if you have tried this, but when you load up SQL Server Enterprise Manager you can run stored procedures from within the Query Analyser tool. Keep in mind that your stored procedure may return results, it may even return multiple results, however the ExecuteScalar() method will only extract the first column which could be null in your case. You may wish to consider using the ExecuteReader() method or changing your stored procedure to check for null values.
Nick Parker
|
|
|
|