|
Please tell me the code to connect to ftp server over explicit ssl connection in c# .net
|
|
|
|
|
What have you tried so far? Demanding us to give you code is very rude.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Not to mention generally ignored, or for those of us in a sporting mood, generally ridiculed.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
|
nice, didn't know you could that ! lmao
|
|
|
|
|
Ive got a question about sending events between functions, i have created a funcion that generates a picture form strings in form and it looks like:
private void generator(object sender, PaintEventArgs e)
{
Font czcionka = new Font("Arial", 12);
SolidBrush pedzel = new SolidBrush(Color.Black);
Bitmap pic = new Bitmap(Convert.ToInt32(docSzerokosc.Text), Convert.ToInt32(docWysokosc.Text));
StringFormat format = new StringFormat();
format.FormatFlags = StringFormatFlags.DirectionRightToLeft;
string[,] formParm = formularzDane(this);
if (formParm.Length != 0)
{
int iloscParm = formParm.GetLength(0);
double pt = 28.3464567;
for (int x = 0; x < iloscParm; x++)
{
string value = formParm[x, 0];
float X = (Convert.ToSingle(Convert.ToDouble(formParm[x, 1]) * pt));
float Y = (Convert.ToSingle(Convert.ToDouble(formParm[x, 2]) * pt));
PointF wspolrzedne = new PointF(X, Y);
e.Graphics.DrawString(value, czcionka, pedzel, wspolrzedne, format);
}
}
}
and next this pictuse is supposed to send to print event
private void drukStrone(object sender, PrintPageEventArgs e)
{
Paint += new PaintEventHandler(this.generator);
}
and finalli it shold be printed using this funcion
public void zatwierdz_dokument_Click(object sender, EventArgs e)
{
PrintDocument printDoc = new PrintDocument();
printDoc.PrintPage += this.drukStrone;
PrintDialog dlgUstawienia = new PrintDialog();
dlgUstawienia.Document = printDoc;
try
{
printDoc.Print();
}
catch (Exception x)
{
MessageBox.Show("Błąd: " + x.Message + " " + x.HelpLink, "Wyjątek");
}
}
But there is aproblem i think drukStrone does not work properly, it works when i copy code from generator to this funcion but it wold be useless having 2 same fucions(generator is generating pic for print preview also), im stuck and need an idea ;o
|
|
|
|
|
Hi,
I remember printing is an adventure the first time around. Yes it is based on the Paint handler, however it also needs a PrintDocument. And you may or may not want to also have a PrintDialog. I suggest you look for some printing articles (here on CodeProject; or on Google in general) based on those keywords. Maybe my best example is in my Sokoban article[^].
|
|
|
|
|
hi all.
i using c#2005.
i running application and show icon in tray taskbar. when i choice "Disable" in menu tray taskbar => closed all form opening, include forms, messagabox, but application not exit.
i have closed forms if form not show message. if form show messagebox, it not closed.
i wish your help.
regards,
aazz
nothing
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:19am.
|
|
|
|
|
for exam: form A -> Form B -> show messagebox.
if message not show, i can closed Form A and B, but message show i not closed form A and B and message.
can we control messagebox ?
nothing
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:19am.
|
|
|
|
|
i think, we need desig Form Messagebox by user control. at the time, we control it.
you agree.
nothing
|
|
|
|
|
Do you have anything in your "disable" menu that minimizes the app if it's in full screen? The way I normally do this, I have to add something on my form_closing event to see if the user is actually minimizing when they hit the x. If they are, I minimize, otherwise I close. You might have something like e.Cancel = true stopping the app from actually shutting down.
|
|
|
|
|
Hi,
I am making an application integrated with Microsoft Project in c#. Now ,I want to read mpp file and convert all task objects to DTOs. I created DTOs same as Task object. The application should read any Microsoft Project version (from MS 2003). I used the normal methods creating the ApplicationClass object, reading the Project object, then iterating the tasks etc. Found it is too slow and OS dependent. I cant quit the Winproject.exe from my application in Win 2003 server. Also the application doesn't works on 64 bit OS.
Please guide me to a solution. Hoping a reply...
Regards,
DJ
|
|
|
|
|
Hi everyone
How i get datatype and dataset and convert it into oledbdatatype.
Thanks for reading
|
|
|
|
|
There are a number of solutions out there try some google foo[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I get this error from this code :
delegate void SetColumnIndex(int i);
private void dgvFactorSell_CellEndEdit(object sender, DataGridViewCellEventArgs e)
{
try
{
if (dgvFactorSell.CurrentCell.ColumnIndex != dgvFactorSell.Columns.Count - 1)
{
int nextindex = Math.Min(dgvFactorSell.Columns.Count - 1, dgvFactorSell.CurrentCell.ColumnIndex + 1);
SetColumnIndex methods = new SetColumnIndex(Mymethod);
dgvFactorSell.BeginInvoke(methods, nextindex);
}
}
catch (Exception ex)
{
clsMessageBox.ShowError(clsErrorHandle.GetError(ex));
}
}
private void Mymethod(int columnIndex)
{
try
{
<code>dgvFactorSell.CurrentCell = dgvFactorSell.CurrentRow.Cells["CAmount"];</code>
dgvFactorSell.BeginEdit(true);
return;
}
catch (Exception ex)
{
clsMessageBox.ShowError(clsErrorHandle.GetError(ex));
}
}
|
|
|
|
|
I think the column that you are try to change is read only.
That is one of the reason why such exception occurs.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
But no .
The column isnt Readonly!
Help Plzzzzzzzzzzzz!
|
|
|
|
|
Hello
I have implemented my own Designer where I am able to add / position my controls.
Now I would like to have the possibility to zoom in and out the Design Surface, like in Word, Visio or PaintingSoftware.
Is there a build-in feature or a tutorial to get this functionality?
I have found solutions for zooming in single pictures but not for a whole DesignSurface with controls on it.
Thanks in advance for your help
|
|
|
|
|
hi,
i don't think you will get any build-in feature or tutorial.
So in your case you will need to write your own designer surface supporting zoom in or out. but that won't be as trivial as it sounds
i think the first step you might go will be writing a ZoomingContainerControl that allows you to hold some controls and that provides zooming.
hope i could help
blesssssss
|
|
|
|
|
Thanks for your answer. I expected something like that yes
I'll try it tat way with writing a zoomingcontainerControl.
I hoped there is an easier and especially faster solution
The designer itself is more or less complete, but according to huge configurations made up of many controls (buttons, textfields, etc), there is
a need to zoom in and out while doing the design of the surface.
|
|
|
|
|
when i am in editmode in datagridview(datagridview.IsCurrentCellInEditMode=true )I want user to be able to press "Esc" button on keyboard and then I want datagridview.IsCurrentCellInEditMode=false and if the user press "Esc" for second time the datagridview leave focus and the txtName get the focus!
My datagridview has <<SelectionMode = FullRowSelected >>
I have this code in ProcessCmdKey :
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
KeyEventArgs key = new KeyEventArgs(keyData);
if (key.KeyCode == Keys.Escape)
{
datagridview.EndEdit();
txtName.Focus();
}
}
So Please Help!
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:19am.
|
|
|
|
|
BUT CELL IS IN edit mode
So, plz Help
|
|
|
|