|
Is there anyone out there who knows how to bring Rich Text to a place other than in the windows controls? I need to be able to print RTF (rich text format) to paper, and I have no earthly idea how. Does anyone have any ideas at all? Thanks in advance
|
|
|
|
|
You can view some sample Printing Documentation here
You can also view some sample code from the SDK that uses a RichTextBox and prints the text from it.
Hope that helps!
--ChrisKo
|
|
|
|
|
I am not so fortunate as to have VS.NET yet so I make do with SharpDevelop. However most of you have VS.NET and release your apps as VS.NET projects.
I am trying to get a reference to Shell32 in my SD project. The reference is originally in the FTP client project in the C# section of CP.
The code has this:
private Shell32.Shell m_Shell;
Of course a compile error has appeared saying "What the hell is Shell32?". By examining the XML of the VS.NET project I can see that it references Shell32 as a GUID:
<Reference
Name = "Shell32"
Guid = "{50A7E9B0-70EF-11D1-B75A-00A0C90564FE}"
VersionMajor = "1"
VersionMinor = "0"
Lcid = "0"
WrapperTool = "tlbimp"
/>
How can I import this into SharpDevelop?
The Internet, whats that? Is it a car?
"There's a statistical theory that if you gave millions of monkeys typewriters and set them to work, they'd eventually come up with the complete works of Shakespere. Thanks to the Internet, we know this isn't true."
|
|
|
|
|
I need to do a comparison of two dynamic numbers - say 150 and 225. How can I figure out the percentage difference (in this case, 50%) between these two numbers in ASP.Net?
Thanks.
|
|
|
|
|
like (float - float2 ) / float2
READ MSDN
|
|
|
|
|
I finally downloaded the .NET SDK to do some experimentation with it. Unfortunately an upgrade to Visual Studio.NET is out of the question at the moment, so I decided to look for a nicer way to build my experiments than .bats or makefiles. I'd heard a bit about ANT, a java based build tool, but I happened to spot another one... based on ANT... NANT. A .NET version of the ANT tool.
After getting it from http://nant.sourceforge.net I've had a bit of a play. Very nice! The build files are in XML, and seem a bit more straight forward than the old makefiles. They also claim that certain failures with makefiles are resolved by ANT/NANT. I've still got a lot of experimentation to go with it, but it looks very positive at the moment.
Anyway, thought I'd share this with you guys in case you hadn't heard of it before. Cheers.
|
|
|
|
|
Thx man , you read my mind, was on my way there
READ MSDN
|
|
|
|
|
Hi! I need to be able to view web pages in a C# application. Does anyone know how to use the IE or Mozilla engine in .NET?
|
|
|
|
|
You'll have to use COM Interop and load up the MS COM-Based HTML engine. I dont know of a native HTML parser for C# yet.
|
|
|
|
|
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
|
|
|
|