|
Thanks, I will give it a try tomorrow.
Gideon
|
|
|
|
|
Hello,
In my application I'm using the PrintPreviewControl to let the user see the reports without having to print them. But if the system doesn't have any installed printers, an exception is thrown.
Is there any way to make the control work without having a printer? I would think that if I could just provide the paper size, the control could do its rendering correctly.
Also, I would like to change (or remove) the status dialog displayed when generating the preview. But I think it's hardwired into the control
Any suggestions?
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
|
|
|
|
|
Not sure how to get it, but on printerless systems I've seen 'xyz file' listed as the default printer in some apps.
|
|
|
|
|
Printing to a file... could work! Let me check on it.
Thanks for the pointer!
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
|
|
|
|
|
hi,
I have developed an add-in for excel applications and successfully loaded/run in developed computer. But in other machines with different OS (XP , 2000 , 2003...) and Excel (2000,XP,2003...) versions i had problems.
I created a setup and tested in those systems. My problem is that :
The add-in dll is not loaded in Excel 2000. Works well in other newer versions (2003 and XP, also caused problems but solved them) but the toolbar and button is not shown in the excel.
I have tried everything about registry (LoadBehavior=3 , DLL CLSID's) and also Excel options such as "Disabled Items" and "Macro Security" etc... Those techniques worked on newer versions of Excel but I need to load my add-in in Excel 2000 too.
Do i miss something? I do not think i have a mistake on it because on newer versions works well.
I appreciate any help...
Thanx.
a.k. Mack Scynox...
|
|
|
|
|
MS changes the details of it's office interop between versions at a whim. Some of the changes are niether forward or backwards compatable. You might have to fork your sourcebase to support multiple versions.
|
|
|
|
|
I've loaded an assembly by reflection, and now wish to re-combile the resource it represents, before continuing my testing of it.
The problem i have is, once i load an assembly, it remains in use until i exit my application. I've closed all refferences to this assembly, and all types used by it have been disposed and garbage collected.
How would i go about unloading the assmebly completely from my application?
Cheers
Tris
|
|
|
|
|
Unloading of single assemblies is not possible. You can unload only at the AppDomain level, so a solution in your case could be loading your assembly in a separate appdomain and then unload it when it is no longer used.
For a better explanation on the reasons why you cannot unload single assemblies and alternative ways of doing it i suggest you
this
Bye!
|
|
|
|
|
Hi!
I'm trying to retrieve a value from a XML using XPath. However, I get this exception:
Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.
My code is as following:
XPath Query: /rdf:RDF/geo:Point/geo:lat/text()
C# Code:
public static string GetValue(XPathDocument doc, string query) <br />
{<br />
XPathNavigator nav = doc.CreateNavigator(); <br />
XPathNodeIterator iter = nav.Select(query);<br />
<br />
if (iter.MoveNext()) <br />
return iter.Current.Value;<br />
else<br />
return null;<br />
}
XML:
<rdf:RDF xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<geo:Point>
<geo:long>-0.15</geo:long>
<geo:lat>50.8333333</geo:lat>
</geo:Point>
</rdf:RDF>
Anyone has an idea of what's going on? It must be pretty simple but I couldn't find much on Google.
Thanks!
|
|
|
|
|
You need to pass an instance of the XmlNamespaceManager to the function so that namespace prefixes can be resolved.
xacc-ide 0.0.99-preview7 now with C#, C, C++, IL, XML, Nemerle, IronPython, Perl, Caml, SML, Ruby, Flex, Yacc, Java, Javascript, Lua, Prolog and Boo highlighting support!
|
|
|
|
|
How can I do this? I assume italicizing one word in the middle of a sentence is beyond the capabilities of a label object, but haven't been able to find a way to do it using a (crippled) richtextbox either.
|
|
|
|
|
First use the SelectionStart and SelectionLength properties of the control to select the part of the text you want to italicise, the go with this:
[RichTextBox].SelectionFont =
new System.Drawing.Font(
[RichTextBox].SelectionFont,
FontStyle.Italic);
Hope it helps.
|
|
|
|
|
That looks like it should work. I was trying to do it in the designer since it's a static string.
|
|
|
|
|
I'm looking to protect my application by hacker.
But i don't know how hackers work, so i asked you if is possible to get an embedded file from an .exe, and someone answered me yes.
Now i ask you, how?
If i set a bitmap file inside an exe what program or other way i can use to get the bitmap embedded?
I watched for the software reshack but it find just icons embedded.
|
|
|
|
|
If you haven't already you should look at Lutz Roeder's .NET Reflector (http://www.aisto.com/roeder/dotnet/[^]).
This excellent tool shows just how vulnerable your .NET assemblies are to hacking and reverse engineering - it will also show you what embedded resources you have in your assembly.
Rob Philpott.
|
|
|
|
|
so it is impossible to hide
|
|
|
|
|
Obfuscators will make it more difficult to reverse engineer. Nothing's perfect though, and native code is crackable by the determined as well. I wouldn't worry too much the people who steal apps generally won't buy a copy in any circumstance so you're not looking at real losses.
|
|
|
|
|
Did you try .NET reflector?
I'm probably not the best person to answer this question, but my current understanding is that the most common approach to protecting your code is to 'obfuscate' it - jumble it around a bit to make it hard for anything with less patience than a computer to understand. Take a look at http://www.preemptive.com/products/dotfuscator/index.html[^], as an example of one such tool.
There's plenty of companies touting their solutions on the web - have a look around.
As regards embedded resources - they've always been accessible in standard exes. In the old days you could open up an .exe with AppStudio and play around its resources direct - I don't know if you can still do this with Visual Studio. You could obfuscate this too I guess, using some simple encryption of your image which you decrypt at runtime.
I would seriously question whether .NET is the correct technology to use for anyone seriously concerned about their intellectual property.
Regards,
Rob Philpott.
|
|
|
|
|
Sh*t i havn't no idea it was so easy other get embedded resources but also the whole code!!!
These solution doesn't protect fully the code.
Is it possible to get the code in other ways?
Then do u think making a c++ pure application i've not problem like this?
|
|
|
|
|
ALL computer code is readily hackable and decompilable, it's just a matter of patience. It's very easy in .NET, even with obfuscated code, but much easier than people realize when using native C/C++. I've long ceased worrying about it.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I am wrting a .NET run-time compiler. It is fine if i compile a C# code using the following code :
Microsoft.CSharp.CSharpCodeProvider = new Microsoft.CSharp.CSharpCodeProvider ();
ICodeCompiler compiler = provider.CreateCompiler ();
CompilerParameters compilerparams = new CompilerParameters ();
CompilerResults results = compiler.CompileAssemblyFromSource(compilerparams, code);
the compiler run fine. But if i change the comipler to compile a VB.NET code as:
Microsoft.VisualBasic.VBCodeProvider provider = new Microsoft.VisualBasic.VBCodeProvider ();
ICodeCompiler compiler = provider.CreateCompiler ();
CompilerParameters compilerparams = new CompilerParameters ();
CompilerResults results = compiler.CompileAssemblyFromSource(compilerparams, code);
it is a error at the last line !!! what cause the problem ????
In fact, there are a serveral assembilies i wrote in C# in order to compiler the source code. Does this possibly cause the problem ? it sounds so strange !!!!
|
|
|
|
|
Tee+ wrote: it is a error at the last line !!! what cause the problem ????
Probably your code. An indication of the error you receive would be helpful.
xacc-ide 0.0.99-preview7 now with C#, C, C++, IL, XML, Nemerle, IronPython, Perl, Caml, SML, Ruby, Flex, Yacc, Java, Javascript, Lua, Prolog and Boo highlighting support!
|
|
|
|
|
Seems that it is not my code error:
System.IO.FileNotFoundException: Could not find file "C:\DOCUME~1\Vithan\LOCALS~1\Temp\srxzw0s0.dll".
File name: "C:\DOCUME~1\Vithan\LOCALS~1\Temp\srxzw0s0.dll"
at System.IO.__Error.WinIOError(Int32 errorCode, String str)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.CodeDom.Compiler.CodeCompiler.FromFileBatch(CompilerParameters options, String[] fileNames)
at System.CodeDom.Compiler.CodeCompiler.FromSourceBatch(CompilerParameters options, String[] sources)
at System.CodeDom.Compiler.CodeCompiler.FromSource(CompilerParameters options, String source)
at System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSource(CompilerParameters options, String source)
at Utility.ActionScript.BuildAssembly(String code)
Please help.
|
|
|
|
|
Given CultureInfo object, how can i determine the text orientation of this culture?
For example, arabic and hebrew are written from right to left, some eastern languages are written from top to bottom and right to left and so on.
Thank in advanced, ilan
|
|
|
|
|
Hi
I need to ge the node that the user right clicked on. BAsed on information stored in the tag value I need to change the context menu before the user sees it.
How do I get this NodeItem. The node is not selected during a right click action so SelectedNode does not work.
I am using VS 2003. 2005 does a lot more with the addition of treeview.hittest but it is not an option for this project.
Any good ideas out there
tcss
|
|
|
|