|
I'm guessing here, but if you put an image on a white back ground, and set it's transparency level, then you should get the washed out effect.
Cata
|
|
|
|
|
|
that is very helpful - thanks Nick!
|
|
|
|
|
How exactly would i be able to send data to the parallel port with in XP using C#.
Thanks Zane
|
|
|
|
|
You can't do it directly because of the NT Kernel Hardware Abstraction Layer. You need a helper .DLL, running in Ring 0, to get at the port for you and expose an interface you can use. Check out the stuff at Logix4U[^].
RageInTheMachine9532
|
|
|
|
|
Dear zaarzzz
I think that you have to use windows API to do that so you have refeare to CreateFile, API then you can deal with parallel port as a file where you can write and read data
Regards
Mhmoud Rawas
------------
Software Eng.
|
|
|
|
|
Hi,
I have been searching for weeks for a way to put a progress-bar or other custom control on the Office CommandBar of my Outlook addin. Does anyone know how to do this?
Please refer me to any resources available...
Thanks,
Shmarya
|
|
|
|
|
Hiya, how do I write double quotes to a file?? So in the file, it writes "today is fine". I tried this:
sw.Write( ""today is fine"" );
But it like it.
|
|
|
|
|
sw.Write( @"""today is fine""" );
Mazy
"I think that only daring speculation can lead us further and not accumulation of facts." - Albert Einstein
|
|
|
|
|
|
Also, as with most other languages, use \" . Only use "" within a literal string (i.e., prefixed with the literal string character, @ ).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi,
I have noticed that when I put code in, lets say a Button click event that when I click it once it will execute the code acouple of times in that click event. Any ideas what might cause that to happen?
Thanks,
JJ
|
|
|
|
|
MrJJKoolJ wrote:
Any ideas what might cause that to happen?
You've register the event handler two times.
Mazy
"I think that only daring speculation can lead us further and not accumulation of facts." - Albert Einstein
|
|
|
|
|
Probably because the handler function has been added to the Click event a couple of times.
Go into the 'Windows Form Designer generated code' section and look for something like the bolded line added more than once. It might not be the very next line or lines. It could be farther down the code. But, in the end, you would normally only want one EventHandler created for the Click event of the button.
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
this.button1.Location = new System.Drawing.Point(16, 16);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(144, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Output Debug Break";
this.button1.Click += new System.EventHandler(this.button1_Click);
this.button1.Click += new System.EventHandler(this.button1_Click);
this.button1.Click += new System.EventHandler(this.button1_Click);
.
. more code...
.
this.button1.Click += new System.EventHandler(this.button1_Click);
RageInTheMachine9532
|
|
|
|
|
Did you register for the event multiple times?
|
|
|
|
|
I use two radiobuttons and a "continue" button. after pressing the "continue" button i need that there won't be a way to change anymore the radios.
please help!
|
|
|
|
|
radioButton1.Enabled = false;
RageInTheMachine9532
|
|
|
|
|
Hi,
I'm building a simulation of a site in c# code, and using HttpRequest, when I'm calling the GetRequestStream() method, an Exception is thrown :
"The remote server returned an error: (501) Not Implemented."
Tried to sniff it in the Explorer and what I'm supposed to get is a redirection with type "magnus-internal/fcc" with size of 0. (no string is returned)
This redirection also returns a cookie, that I need, so I can't skip it.
Is anyone ever encountered something similar?
Thanks
Shay Erov
|
|
|
|
|
how can i copy a file to a website, ie. file.ext ---> http://site.site.com/folder
it's not ftp, it's http that i need to use. any help would be great.
thanks,
Rob Tomson
--
There are 10 kinds of people. Those who understand binary and those who don't.
|
|
|
|
|
If no FTP is available, you're going to have to find out if the site supports file posts via http and what http form or mechanism is supposed to be used. There's no generic way of doing it that works for all sites. Other than FTP that is...
RageInTheMachine9532
|
|
|
|
|
the way i've been putting my files in is creating a webfolder in windows and then copying my file(s) onto the site. just out of curiosity how do i upload a file via ftp also?
thanks,
Rob Tomson
--
There are 10 kinds of people. Those who understand binary and those who don't.
|
|
|
|
|
(this isn't really a C# topic but whatever ) Go to google and find a FTP client. There are some ones that present users with a drag and drop interface for you.
|
|
|
|
|
What you're using then is WebDAV, which uses different HTTP headers to post files. Try a search in google for more information.
To upload files using FTP, you can P/Invoke the relevent WinInet APIs or create your own WebRequest /WebResponse derivative classes (there's plenty of documentation about this in the .NET Framework SDK) that implements that simple FTP protocol, which you can also find plenty of information about by searching with google.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
just an update; i succesfully wrote a text string to a file on an http site. if you have any suggestions please let me know.
<br />
private void publish()<br />
{<br />
this.Cursor = System.Windows.Forms.Cursors.WaitCursor;<br />
this.btnPublish.Enabled = false;<br />
this.btnPublish.Text = "Wait...";<br />
<br />
System.Net.WebClient client = new System.Net.WebClient();;<br />
string fullPath;<br />
string fileText;<br />
byte[] byteArray;<br />
System.IO.Stream stream;<br />
System.IO.StreamWriter sWriter;<br />
<br />
fullPath = this.xml.Find("BaseURL") + '/' + this.xml.Find("PublishName") + ".ics";<br />
fileText = this.convertiCal();<br />
byteArray = System.Text.Encoding.ASCII.GetBytes(fileText);<br />
client.Credentials = new System.Net.NetworkCredential(this.xml.Find("Login"), this.xml.Find("Password"));<br />
stream = client.OpenWrite(fullPath, "PUT");<br />
sWriter = new System.IO.StreamWriter(stream);<br />
sWriter.Write(fileText);<br />
<br />
try<br />
{<br />
sWriter.Flush();<br />
sWriter.Close();<br />
}<br />
catch (System.Net.WebException err)<br />
{<br />
System.Windows.Forms.MessageBox.Show(err.Message, "Error", System.Windows.Forms.MessageBoxButtons.OK);<br />
}<br />
client.Dispose();<br />
<br />
this.btnPublish.Text = "&Publish";<br />
this.btnPublish.Enabled = true;<br />
this.Cursor = System.Windows.Forms.Cursors.Default;<br />
}<br />
thanks for the help,
Rob Tomson
--
There are 10 kinds of people. Those who understand binary and those who don't.
|
|
|
|
|
Hello,
I have the following code in a win app:
// create bitmap from file
Bitmap myBitmap = new Bitmap(textBox1.Text);
Graphics g = Graphics.FromImage(myBitmap);
g.RotateTransform(30); //rotate 30 degrees
// create a new bitmap from the Graphics object
Bitmap next = new Bitmap(myBitmap.Width, myBitmap.Height, g);
// save the new bitmap to disk
next.Save("c:/documents and settings/vortex/Desktop/file.jpg");
When this code is executed, an empty image file with the right dimensions is stored - just a blank (white) image... I tried without rotating, but nothing happened either.
I would appreciate if you could give me any hints about the problem.
Thank you in advance.
"Needless redundancy is the hobgoblin of software engineering." - Peter Darnell
|
|
|
|