|
YES!! you are a life saver...thanks
|
|
|
|
|
This is not necessarily the best idea. You're saying that you fully trust ANY code running from the Intranet zone. If you're so sure, you could do this, but a better way is to right-click on either All_Code under the machine policy, or the Intranet_Zone and add a new Url membership using the server name and directory like so: file://SERVERNAME/Directory/* (you can use more directories if you like). If you did this with the Internet_Zone code group, you're opening your machine up for any kind of .NET attack possible. The Intranet_Zone could contain code just as harmful, either intentionally or unintentionally.
You'd be better off managing separate code groups for your applications and leaving the default permissions.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Quick Question: How can I rotate an image using GDI?
Extended Question: I am playing around with an application that is a very quick and dirty fax viewer, the user loads an image into a picture box and from there can apply various transforms on it to make the fax more legible.
When the user selects a transform, I retrieve the image object attached to the picture box and get the graphics object from that image, from there is all gets a bit fluffy, I have tried using
g.RotateTransform(90)
g.Transform.Rotate(90)
And also creating a matrix and transforming using that (as described in the MSDN), but none of these methods seem to work. After some trawling through CP I havent found anything that using rotational transformations (although the articles by Christian Graus in the C# GDI section are brilliant, the only thing he doesnt do is rotation)
post.mode = signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
|
|
|
|
|
|
Thanks for the reply, obviously missed that one
Just incase anybody is searching the forums for the same answer as I was. The project above does exactly what it says on the tin, but it over complicates something that turns out to be quite simple.
I found that an bitmap object has a RotateFlip method, that allows you to specify certain flip and rotation methods.
e.g.
myBmp.RotateFlip(RotateFlipType.RotateNoneFlipY);
myBmp.RotateFlip(RotateFlipType.RotateNoneFlipX);
....(and many more)
These work as they should, but you need to bear in mind that the rotation is carried out in memory so you need to write back the amended data into the bitmap object.
e.g.
System.IO.Stream imgStream = new System.IO.MemoryStream();
myBmp.Save(imgStream, destFormat);
post.mode = signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
|
|
|
|
|
Does anyone know how to add a linefeed to a XML comment. I can add them manually inside the comment, but NDOC wants to bunch the text together.
Example
becomes
This is a test
in the documentation file.
How do I get it to do this
This
is
a
test
Gary Kirkham
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
|
|
|
|
|
Use <br /> . And to be fair (since I'm on the NDoc team), any XML parser canonicalizes text based on the canonicalization method used by the parser. All parsers of which I'm aware treat line breaks as spaces between matching tags and ignore them (depending on the whitespace settings) between adjacent tags. It's not NDoc that's ignoring them, it's the XML parser we use (which is, of course, the parser in the System.Xml.dll assembly).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Thanks that did the trick
Heath Stewart wrote:
And to be fair (since I'm on the NDoc team), ...
I wasn't complaining, I was just pointing out that it behaved differently than I expected.
Gary Kirkham
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
|
|
|
|
|
Actually I want in my application that when a user presses right click on the button than a popup menu will open with different options. How can i develop this popup menu.
If there are any articles regarding this also write them in the answer
Thanx in advance
Regards
MInamKhan
Inam
|
|
|
|
|
From toolbox add a ContextMenu to your form and add options to it. Then set the ContextMenu property of button to the name of this ContextMenu .
Mazy
No sig. available now.
|
|
|
|
|
Hi,
I want to automate a frequently download on a web site that provides data. This one uses cookies to recognize its members an autorize them to download.
The problem is that using the WebRequest class to access this file, the Server I want to connect to doesn't search cookies on my computer, and so doesn't recognize me as a member.
How can I do ?
Thank you very very much ...
|
|
|
|
|
See the HttpWebRequest.CookieContainer property documentation in the .NET Framework SDK. Provide a CookieContainer to store cookies.
Also, a server does not search your cookie collection. That would be extremely dangerous (although there are security holes in implementations some times that allow servers to request a different cookie)! The browser sends cookies for the server and path relative to the request.
You'll have to devise a way to get the cookie and put it in the CookieContainer , though. The HttpWebRequest.Credentials property may help as well since you require authentication, those forms authentication makes implementations like this difficult.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Ok, I think I understand. I'll try to manage to build a right CookieContainer.
Thanks.;)
|
|
|
|
|
Hi everyone,
I'm trying to set the initial directory of the OpenFileDialog to the "My Documents" directory - is there a simple way to achieve this? Is there a system variable like %SYSTEMROOT% which allows you to set the initial directory to the windows install directory?
<br />
OpenFileDialog ofd = new OpenFileDialog();<br />
ofd.InitialDirectory = "%SYSTEMROOT%";<br />
I tried to google this and perhaps I'm using wrong keywords, but I didn't find anything
Thanks in advance,
Rado
Radoslav Bielik
http://www.neomyz.com/poll [^] - Get your own web poll
|
|
|
|
|
Environment.SystemDirectory
Mazy
No sig. available now.
|
|
|
|
|
I was looking for the path to the "My Documents" folder but thanks for pointing the Environment class out! I didn't even know that it exists, and Environment.GetFolderPath(Environment.SpecialFolder.Personal); does the job.
Thanks again!
rado
Radoslav Bielik
http://www.neomyz.com/poll [^] - Get your own web poll
|
|
|
|
|
i was meaking combinations of a,b,c.
how can i make all possible combinations.
this should show result like this.
aaa
aab
aba
bba
baa
acc
aca
cac
caa
cca
ccc
bbc
bcb
cbc
ccb
cbc
abc
i was thinking that i will be using
nested for loop with array
that will pick one by one charactors
and place it on the loop and make
all possible combinations.
Mazhar Hussain
|
|
|
|
|
Maybe I don't understand what you're saying. You want a program that prints out all of the possible combinations of "a", "b", and "c", right? It seems as though you already know the answer. It appears that you already know the answer but just to make sure, you're talking about doing something like the following, right?
<br />
string[] letters { "a", "b", "c" };<br />
<br />
foreach (string s1 in letters) {<br />
foreach (string s2 in letters) {<br />
foreach (string s3 in letters) {<br />
Console.Writeln(s1 + s2 + s3);<br />
}<br />
}<br />
}<br />
Stated without guarantee - express or implied - by an employee of Harbinger Software
|
|
|
|
|
|
:-DHello,
currently I am working on a mailapplication that checks my mail on different mailservers. Sometimes i want to view the contents of the message.
I am now currently using a Windows Form with a richtextbox. That richttextbox.Text is filled with a string which contains my message. Most messages are in HTML-format. So i get the HTML tags in the text. How do i prevent that? How can I convert that string to HTML and which component should I use to show the mail in stead of the richtextbox.
Regards,
Herman Talstra
homo sapiens non urinat in ventum
|
|
|
|
|
You should embed the WebBrowser control. That's what many of the HTML Email readers do, like Outlook, Outlook Express, and various other third-party email readers. Customize your Toolbox in VS.NET and find the Microsoft Web Browser Control (shdocvw.dll). Add that to your toolbox and drag it on your form. You can then use various methods to display the HTML content, such as saving it to a file and using WebBrowser.Navigate2 , or referencing the Microsoft.mshtml.dll assembly and either setting the HTML to the body.innerHtml , or use the UCOMIPersistFile class in the .NET base class library to cast the WebBrowser.Document to the interface and then use the Load method to load the HTML file that represents the body of your email message.
You can find many articles about using the WebBrowser control and even utilizing and implementing its designer interfaces to allow your program to type HTML email by using the following search: http://www.codeproject.com/info/search.asp?cats=3&cats=5&searchkw=webbrowser[^].
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hi,
I'm creating an application that uses the windows media encoder SDK.
I would like to show the properties/configuration pages of the input devices like wmenc.exe does.
This dialog is custom for every device installed but I'm sure that there is an standard way to show it.
Any idea/suggestion will be apreciated.
Thanks
|
|
|
|
|
There is no build-in support for this in the .NET base class library (BCL). This actually requires a lot of COM and native functions. Your best bet is to consult the Windows Driver Development Kit (DDK). Essentially, each device class has an associated CLSID for the property pages it supports. The client application creates a property sheet, adds-in default property pages for all devices, and queries the device class for additional property pages to include, similar to how shell property page extensions work, except in that case default property pages are added and the file's associated property sheet handlers are queried.
The Platform SDK does contain some information about this, but the DDK will provide much more specific information about device property sheets.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I am trying to bring up a directory in the Windows Explorer.
System.Diagnostics.Process.Start("Explorer.exe") brings up Windows Explorer just fine
System.Diagnostics.Process.Start("Explorer.exe", dirPath) brings up the directory in a regular window (with no folder tree on the left)
How do I get the directory to come up in Windows Explorer?
Thanks,
Elena
|
|
|
|
|
Process.Start("explorer.exe", string.Concat("/e,", dirPath); If you want the directory to be the root of the explorer window, use "/e,/root," instead of just "/e,". See http://support.microsoft.com/default.aspx?scid=kb;en-us;152457[^] for more information and options.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|