|
I wrote a program that would change edi to xml.
Anyway the problem is to be able run the program from a network drive.
I keep getting Security Exception errors, regardless of how much I tried to play with the Security class (FileIOPermission or PermissionSet ....)
My question is:
Is there a way to request for the permission without using the .NET configuration or caspol.exe?
Thank you so much.. please help if you can
Elapid For The Win
|
|
|
|
|
No. The network is not a trusted source of executeable code. The application can't get permissions when the code is not trusted in the first place. You MUST configure CAS to allow the appropriate permissions for code running from a remote location.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I am writing an email client application in C#. Do you know if there is any .net Component that I can use to show the email message body..(since sometimes the message contains html)
|
|
|
|
|
Yes, use the Microsoft web browser control (put %system32%\shdocvw.dll in your Visual Studio toolbox, then drop it on your form). For advanced manipulation of the Microsoft web browser control, you may also need to add a reference to %program files%\microsoft.net\primary interop assemblies\Micrsoft.mshtml.dll
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Lies of Our Fathers: A Must-Know About Lent
Judah Himango
|
|
|
|
|
Yes that is what i used but i thought maybe there is something else to handle every type of email message
|
|
|
|
|
Hello folks,
I would like to personalize my windows forms based on my security setting.I will define some user rights into my code and then I will try to apply these rules to my windows forms.
How can I start?What must I do?
Do you have any advices??
|
|
|
|
|
Hi All!
How to add controls dynamically inside a Richtextbox and set properties for the same......I know how to add controls to a Richtextbox dynamically but when i start typing in the Richtextbox the control overlaps whatever i type... how can i make it look like a normal text and the controls should be links..
I have a another question is it possible to identify the text which is getting deleted in a Textbox.... i mean the exact character which gets deleted when i press backspace.
Regards
Deepak.S
|
|
|
|
|
<br />
public enum Colors {Green, Red, Blue}<br />
How do I programatically know how many items are in that enum ? I need to create an array with the size of how many items are in that enum. For example when I have two items in the enum (Green, Blue), I have an array of size 2 (int[2]).
Regards,
Desmond
|
|
|
|
|
This will do it.
Enum.GetValues(typeof([type name of your enum])).Length;
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Very simple (if you know how, of course ):
Enum.GetValues(typeof(Colors)).Length GetValues() already returns an array, so perhaps you can use this one directly instead of creating one yourself.
Regards,
mav
|
|
|
|
|
I have a customized Print Preview dialog made of a Print Preview control.
When I increase zoom property, the document inside it gets enlarged and two scroll bars appear. But when I scroll down with Vertical scroll bar, it doesn't go till the bottom and bounce back upwords if I resize(enlarge) the Dialog it self. It doesn't show the bottom of the document in any case.
More over when the dialog is compressed and the document in side the preview control is not 100 % visible widthwise, the expected horizontal scroll doesn't appear.
What is the reason for such behavior?
Please guide
|
|
|
|
|
hi
i use a requer validator to control a textbox in a web page.
it works correctly on local but when i upload it to server the validator dosnt works.
whats the problem?
thanks
|
|
|
|
|
hi
Check if all the necessary file are there in the root directory of ur application in the IIS, the important file is aspnet_client.
cheers
chettu
|
|
|
|
|
hi
i checked and copy the aspnet_client folder to host root
but the problem still exist..
|
|
|
|
|
Hi
I had the same prob and the solution i gave solved the prob..... is that only ur app is not working properly or all the app running on the IIS.
|
|
|
|
|
Hi,
I want to insert a windows media player into my PDA program.
I find that the methods used in windows application can't be used in PDA.
Any default method can be used?
Or any other approach should be used?
Please help
Regards,
RockRock
|
|
|
|
|
hi friends.
i am facing a problem.
i want to display some text in a multilined texebox. actually its a text box, displaying some status. I want to show different color text for some perticular status. i tried using the color property of the textbox, but it changes the color of the entire box.
please help.
|
|
|
|
|
Get a textbox that supports multiple colours.
Either that, or I remember doing this years back in vb4 (with extras) using subclassing to do the job. If i remember rightly i trapped the paint event, got the position for the line i wanted to colour etc and printed the new coloured text directly over the exiting one in the listbox. This worked surprisingly well especially since I only did it to piss off a mate who said making colour listboxes was the only thing he couldn't do
|
|
|
|
|
Have a look at the RichTextBox control coming with the framework.
|
|
|
|
|
how is rich text box different from the normal one?
what properties of the rich text box can i use?
|
|
|
|
|
The RichTextBox can display documents in rtf format. Create a Word document, save it as rtf and load it into the richtextbox and youll see that it is rathe rpowerful.
To understand how the text must be build to make certain formattings or colors I would suggest that you make samples of what you try to achieve in word and then look into the Rtf property.
To just change the color (and also some other properties) of specific words or lines the following way is the easiest:
1. Call the Select method to select some part of the displayed text.
2. Set the SelectionColor property to change the color of the selected text.
|
|
|
|
|
I need a way to blit, as it were, several pictures off screen and then show them as a single image on screen.
Using GDI+ or a picture box displays the images one at a time until all are displayed, but it is very slow over a network.
Is it even possible?
Thanks
|
|
|
|
|
Not sure what you mean...
What do you mean by slow network? Please try to explain your problem more detailed and also what youve tried so far.
|
|
|
|
|
Maybe an example would help here.
...
Graphics g = e.Graphics;
string[] files = Directory.GetFiles("path", "*.gif");
foreach(string file in files)
{
g.DrawImage(Image.FromFile(file), x, y, width, height);
(the x, y, width, and height variables are adjusted for each
image, so they don't draw on top of each other)
}
...
This is placed in the OnPaint method of the form. If the graphics are placed on the harddrive of the machine running it, the art appears rather quickly. But if the art is stored on a server, or on a CD, each image is shown one at a time (quite a bit slower than storing the pics on the local machine), until all images are shown.
I need a way to draw the images onto an object off screen (perhaps a Bitmap object?) and then when all of the images have finished drawing, display the finished object as a single piece of art.
I have seen examples of this using DirectDraw, but I want to do this without DirectX.
Thanks for your help.
|
|
|
|
|
Ok now I got it.
Create a bimtap which is big enough to hold all your images, get a Graphics object from it, then draw all your images into that graphics and finally draw it onto your Graphics object:
<br />
Bitmap b = new Bitmap(totalWidth, totalHeight);<br />
using (Graphics g = Graphics.FromImage(b)) {<br />
string[] files = Directory.GetFiles("path", "*.gif");<br />
foreach(string file in files)<br />
{<br />
g.DrawImage(Image.FromFile(file), x, y, width, height);<br />
}<br />
}<br />
e.Graphics.DrawImageUnscaled(0, 0);<br />
But note that the total amount of time spent for this operation will not be shorter, because neverthless reading from CD or over network will consume some time. But if needed you could cache the whole bitmap to make the next drawing faster.
|
|
|
|