|
hi Mbah Dhaim
It works,Thanx.
|
|
|
|
|
The error means what it says. Can you read ? You can use ToString() if you want to convert the type to a string.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
|
|
|
|
|
Hi,
I'm developing a C# application to process binary (b&w) images. I need to save them as PDF files.
I've found a few libraries (see example below) that would let me do so by saving the images as JPEG first and then converting them to PDF. Doing so however produces relatively large PDF files.
Example: http://www.codeproject.com/script/Forums/Edit.aspx?fid=1649&floc=/Forums/1649/Csharp.aspx
Any ideas on how I can directly convert System.Drawing.Image objects to B&W PDF files?
Thanks,
Sarab
|
|
|
|
|
Member 4678351 wrote: Any ideas on how I can directly convert System.Drawing.Image objects to B&W PDF files?
With a library like the one you have. What do you think the image will be saved as, if not a JPEG ?
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
|
|
|
|
|
I'm writing an installer for a program that will be used on Vista. When I install the program for "all users", the data files for the program are stored in the virtual folder for each user, such as, "C:\Users\UserName\AppData\Local\VirtualStore\Program Files\MLW\MLW Program". When I uninstall my program, the data files in the virtual folders for each user are not automatically deleted. I need to add code into my program's Uninstall() method; however, I don't know how to do that for each user that isn't the current user.
Any help is appreciated.
Thank you,
choo_chu
|
|
|
|
|
What is the code for restarting a console application?
[X] 100% HTML
[ ] 100% PHP
[ ] 100% C#
|
|
|
|
|
To restart a console application? What do you mean by "restart" it?
Please be more precise..
|
|
|
|
|
How to store a large number of XML to the MSSQL200 database in a field
hello everyone
|
|
|
|
|
With SQL, I guess.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
|
|
|
|
|
I am developing program of C#,the windows are inherit from another library,such like the propty of the EnableBackgroundImage of buttons,it works well,but now I want to developing the multilanguage of the window,when I change the language of the window,some auto sources will be add to the designer.cs files,suck like "button.EnableBackgroundImage = null; " Is it the bug of the microsoft?is it because the project can not inherit propty of the EnableBackgroundImage well,and consider the EnableBackgroundImage is set nothing?
when I change the language a part of designer.cs change to this ,its right
this.ocButton1.FKeyAllocation = Solno.OceanLibrary.Gui.FKeyAllocation.F1Key;
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.FunctionID = "006MEF010";
this.Name = "PaMef01000";
this.OcFormHelpProvider.SetShowHelp(this, ((bool)(resources.GetObject("$this.ShowHelp"))));
this.SingleDisplay = true;
this.UseSecurity = true;
this.Load += new System.EventHandler(this.PaMef01000_Load);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.PaMef01000_FormClosed);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.PaMef01000_FormClosing);
this.mainZone.ResumeLayout(false);
this.formZone.ResumeLayout(false);
this.baseZone.ResumeLayout(false);
this.buttonZone.ResumeLayout(false);
this.buttonZoneShift.ResumeLayout(false);
this.buttonZoneNormal.ResumeLayout(false);
this.ocPanel1.ResumeLayout(false);
this.ocPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.OcDataGridViewCassette)).EndInit();
this.ResumeLayout(false);
but when I change the text of button ,and save the windows ,designer.cs became this
this.ocButton1.AccessibleDescription = null;
this.ocButton1.AccessibleName = null;
resources.ApplyResources(this.ocButton1, "ocButton1");
this.ocButton1.BackgroundImage = null;
this.ocButton1.DisabledBackgroundImage = null;
this.ocButton1.EnabledBackgroundImage = null;
this.ocButton1.FKeyAllocation = Solno.OceanLibrary.Gui.FKeyAllocation.F1Key;
this.ocButton1.Font = null;
this.OcFormHelpProvider.SetHelpKeyword(this.ocButton1, null);
this.OcFormHelpProvider.SetHelpNavigator(this.ocButton1, ((System.Windows.Forms.HelpNavigator)(resources.GetObject("ocButton1.HelpNavigator"))));
this.OcFormHelpProvider.SetHelpString(this.ocButton1, null);
this.OcFormHelpProvider.SetShowHelp(this.ocButton1, ((bool)(resources.GetObject("ocButton1.ShowHelp"))));
this.OcFormToolTip.SetToolTip(this.ocButton1, resources.GetString("ocButton1.ToolTip"));
this.AccessibleDescription = null;
this.AccessibleName = null;
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackgroundImage = null;
this.Font = null;
this.FunctionID = "006MEF010";
this.OcFormHelpProvider.SetHelpKeyword(this, null);
this.OcFormHelpProvider.SetHelpNavigator(this, ((System.Windows.Forms.HelpNavigator)(resources.GetObject("$this.HelpNavigator"))));
this.OcFormHelpProvider.SetHelpString(this, null);
this.Icon = null;
this.Name = "PaMef01000";
this.OcFormHelpProvider.SetShowHelp(this, ((bool)(resources.GetObject("$this.ShowHelp"))));
this.SingleDisplay = true;
this.OcFormToolTip.SetToolTip(this, resources.GetString("$this.ToolTip"));
this.UseSecurity = true;
this.Load += new System.EventHandler(this.PaMef01000_Load);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.PaMef01000_FormClosed);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.PaMef01000_FormClosing);
this.mainZone.ResumeLayout(false);
this.formZone.ResumeLayout(false);
this.baseZone.ResumeLayout(false);
this.buttonZone.ResumeLayout(false);
this.buttonZoneShift.ResumeLayout(false);
this.buttonZoneNormal.ResumeLayout(false);
this.ocPanel1.ResumeLayout(false);
this.ocPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.OcDataGridViewCassette)).EndInit();
this.ResumeLayout(false);
modified on Monday, June 1, 2009 9:45 PM
|
|
|
|
|
How do you close a socket in C#? TCP.
[X] 100% HTML
[ ] 100% PHP
[ ] 100% C#
|
|
|
|
|
Hi,
AFAIK most network classes have a Close() method: Socket.Close, TcpClient.Close, UdpClient.Close, ...
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
|
I find that writing SQL is the best way to control what happens to a database.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
|
|
|
|
|
Don't delete your message - It is rude.
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
My current code works fine, but I've encountered a problem. When a client connects to the TCP server, and they type a message it works the first time, but if its entered again, it just gives you the else. So lets say I typed shutdown in the client console. It would return Command Recieved, Initiating Shutdown. But if I try it again, it just gives me the else message. Its like its not cycling through the if statement again. What kind of code should I use to solve this issue?
Here is the code:
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
public class Server
{
public static void Main()
{
byte[] data = new byte[1024];
IPEndPoint ipep = new IPEndPoint(IPAddress.Any, 7557);
UdpClient newsock = new UdpClient(ipep);
Console.WriteLine("Waiting for a client...");
IPEndPoint sender = new IPEndPoint(IPAddress.Any, 0);
data = newsock.Receive(ref sender);
Console.WriteLine("Connection received from {0}", sender.ToString());
string welcome = "OpticVPS Remote Administration";
data = Encoding.ASCII.GetBytes(welcome);
newsock.Send(data, data.Length, sender);
while (true)
{
data = newsock.Receive(ref sender);
if (Encoding.ASCII.GetString(data, 0, data.Length) == "help")
{
string okay = "You can use the following commands";
Console.WriteLine("Help List Accessed By: {0}", sender.ToString());
data = Encoding.ASCII.GetBytes(okay);
newsock.Send(data, data.Length, sender);
}
else if (Encoding.ASCII.GetString(data, 0, data.Length) == "shutdown")
{
string shutdown = "Command Received, Shutting Down Now";
Console.WriteLine("Shutdown Issued - {0}", sender.ToString());
data = Encoding.ASCII.GetBytes(shutdown);
newsock.Send(data, data.Length, sender);
}
else
{
string err = "Command Not Found [End Of Line]";
Console.WriteLine("Command Error - {0}", sender.ToString());
data = Encoding.ASCII.GetBytes(err);
newsock.Send(data, data.Length, sender);
}
}
}
}
[X] 100% HTML
[ ] 100% PHP
[ ] 100% C#
|
|
|
|
|
Serpendiem wrote: What kind of code should I use to solve this issue?
Well, if you want to use TCP connections, I'd start by using a TCP[^] client and a TCP[^] server. A UdpClient isn't going to help you very much.
In response to your other question about how to close a TCP connection, you should take a look at the Close()[^] method.
|
|
|
|
|
hi
please help me
how to write a program "visual pda(push down automata) creater" with C#
cxg
|
|
|
|
|
The link in my sig has all the information you need.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
|
|
|
|
|
hi
please help me
how to write a program "visual pda(push down automata) creater" with C#
cxg
|
|
|
|
|
Well, this[^] is a good start for you, or were you expecting code?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
i want write a program to able user to create a push down automata (graphical)and see result with c#
cxg
|
|
|
|
|
Did you read the link in my sig ?
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
|
|
|
|
|
Excellent, and the link I provided is chock full of information. All you need to do now is convert the maths into code.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
hi,could u find it.plz i want this too.plz
|
|
|
|