|
Domenic,
I've used Chris' Sells tool and I liked it. There are also a few good tools at gotdotnet.com in the user examples. Give them a look and see what you think.
"Veni, Vidi, Booyah!" - Ceasar
|
|
|
|
|
I know how to convert an image object into a graphics object by
Graphics g=Image.creatgraphics();
but how to convert a graphics object into an image object?
Or, how do you save the "graph" that you drew into a bmp file?
|
|
|
|
|
You can create Graphics from existing Bitmap (Image ) and draw on this Graphics .
Bitmap bmp=new Bitmap(50,50);
Graphics gr=Graphics.FromImage(bmp);
gr.FillRectangle(Brushes.Green,10,10,30,30);
than you can use Save method of Bitmap
i'm only pointer to myself
|
|
|
|
|
Hello.
I'm looking for some code samples or a component that will open an parse a .msg files (outlook mail format) for me.
Can someone point me to this or lead me in the right direction?
Andrew.
|
|
|
|
|
in vb.net convert it into telerik.convertor.com
don't forget to include import files & variables
Imports System.Web
Imports Microsoft.Office.Interop
Imports Microsoft.Office.Interop.Outlook.OlItemType
Imports Microsoft.Office.Interop.Outlook
Imports System.Data.SqlClient
Imports System.IO.Directory
variables are
Public sqlclient As String
Dim strApplicationPath As String = System.AppDomain.CurrentDomain.BaseDirectory()
Dim appOutLook As New Outlook.Application
Dim ObjShared As New clsShared
Dim dt As New DataTable
Dim sql As String
For Each b As Object In items
Dim k As Outlook.MailItem
k = TryCast(b, Outlook.MailItem)
Dim s1 As String
s1 = TypeName(b)
If ((k.Subject.ToLower.Contains(failureNotice.ToLower)) Or (k.Subject.ToLower.Contains("failure notice"))) Then
If k.Attachments.Count > 0 Then
Dim Atmt As Outlook.Attachment
For Each Atmt In k.Attachments
'code that save .msg file into Existing Folder
If Atmt.FileName.Contains(".msg") Then
Atmt.SaveAsFile(strApplicationPath + "\" + Atmt.FileName)
Dim Msg As Outlook.MailItem
Msg = appOutLook.CreateItemFromTemplate(strApplicationPath + "\" + Atmt.FileName)
'code that save data into server
Dim strTo1 As String
Dim strSubject1 As String
Dim strDate1 As String
strTo1 = Msg.To.ToString
strSubject1 = Msg.Subject.ToString
strDate1 = Msg.SentOn.ToString("dd-MMM-yyyy")
Msg.Close(Outlook.OlInspectorClose.olDiscard)
End If
Next
End If
End If
Next
Regards,
Mohammad Shakil
Mohammad Shakil
Software Engg.
Kurla,Mumbai,India
|
|
|
|
|
Does anyone have any idea on how to connect to a file share on the network using a username and password provided by the user. This truly has me stumped. Any help would be appriciated.
Thanks
Aisha
|
|
|
|
|
Hi,
I'm using a VC++ 6.0 ATL COM object in a .NET code. The library is registered before usign it.
Everything work correctly if the library is being accessed continuously; the problem appears when it's not accessed for a while (maybe 5 minutes, it has not been completely assumed) so when it's accessed again it returns an exception of a QueryInterface error for the library interface, although the library has not been modified, neither changed or deleted...nothing! the system only has been forgotten for a while...
Any suggestion or good idea?, any knowledge about it?
Thank you in advance,
Edgar
__________________________________________
Edgar Berengena Moreno
Software Engineer
Appeyron Research
|
|
|
|
|
Is it possible that all of the .NET references to your COM object are being released in that 5 minutes? If not, have you debugged both your .NET code and the COM object to see which side actually returns the error?
John :D
|
|
|
|
|
Thanks, John,
It's said it's a hidden bug almost solved from Microsoft. There's a hotfix still not published (Q325699) which you can ask for to Microsoft Support, but it's only available for NET english version.
This bug consists of an incorrect behaviour of the garbage collector, which removes the instance of the COM objects unsued after a few time.
I'll try to solve it manually until Microsoft publish the fix for my spanish version, accessing the object between short periods of times.
Thank you again,
Edgar
__________________________________________
Edgar Berengena Moreno
Software Engineer
Appeyron Research
|
|
|
|
|
EdgarBM wrote:
I'll try to solve it manually until Microsoft publish the fix for my spanish version, accessing the object between short periods of times.
Another bug, another 10 things to worry about. Generally I must say that core (as in the SS CLI) .NET framework is pretty much bugfree.
MyDUMeter: a .NET DUMeter clone
|
|
|
|
|
|
Thanks for your interest, Leppie,
It's said is a Microsoft bug (Q325699), althought it's not published, so it must be requested directly to Miscrosoft Support.
Thank you again,
Edgar
__________________________________________
Edgar Berengena Moreno
Software Engineer
Appeyron Research
|
|
|
|
|
I use a small table (1..5 records) with big number of fields (about 400 doubles with default 0). All work ok but some writes (about 30) into the columns generates Null Object Reference. (Windows 2000 5.00.2195 srvpack 3, Framework 1.0 srvpack 2)
My code:
... loading data ...<br />
MyTable.AcceptChanges();<br />
foreach(DataRow dr in MyTable.Rows)<br />
{<br />
foreach(string fieldname in MySomeColumnsStringArray)<br />
{<br />
... some computing ...<br />
double x=Result(...);<br />
x+=Convert.ToDouble(dr[fieldname]);
try<br />
{<br />
dr[fieldname]=x;
}<br />
catch(...<br />
}<br />
}
What's wrong?
Help, please.
Sincerely
AW
|
|
|
|
|
What is the value of x when your code fails?
|
|
|
|
|
Unfortunately, any:
0<br />
10<br />
105.91<br />
NaN (I won't to write it in real application)
Sincerely
AW
|
|
|
|
|
DataRow[idx] fails as well
DataRow.ItemArray[idx] works
Sincerely
AW
|
|
|
|
|
Could it be that the data in "fieldname" could be null? If so, you could try this:
protected object getField(string FieldName)
{
if (m_row != null)
{
object retval = m_row[FieldName];
if (retval != null && retval != System.DBNull.Value)
{
return retval;
}
else
{
return ;
}
}
else
{
return null;
}
}
Jim Stewart
|
|
|
|
|
My data couldn't be null. Thanks
Hi,
AW
|
|
|
|
|
the following code is a shortend but same version that is in my program. the problem is i want to open wordpad with the command args of a directory so it opens that file on start up. The directory comes from the string FileName in the following code. the problem is FileName contains spaces "in this case My New Text.txt" and the wordpad program will only reconize My beacause it stops at the space's. how can i send word pad the Literal version of the directory string FileName
Jesse M
Code Snippet:
<br />
private void ShortendVoid(string FileName){<br />
System.Diagnostics.Process process = new System.Diagnostics.Process();<br />
System.Diagnostics.ProcessStartInfo pStart = new System.Diagnostics.ProcessStartInfo(); <br />
pStart.FileName = @"C:\Program Files\Windows NT\Accessories\wordpad.exe";<br />
<br />
pStart.Arguments = Path.GetFullPath(FileName); <br />
process.StartInfo = pStart;<br />
process.Start(); <br />
Application.Exit();<br />
}<br />
The Code Project Is Your Friend...
|
|
|
|
|
Hi Jesse,
Amend this line
jtmtv18 wrote:
pStart.Arguments = Path.GetFullPath(FileName);
as
pStart.Arguments = "\"" +Path.GetFullPath(FileName) +"\"";
N.B.: Quite interestingly, notepad is able to recognize paths and filenames with embedded spaces, but WordPad is not able to. I am using Windows XP Professional.
|
|
|
|
|
thanks alot =)...i had no clue...thats all there was to it then huh ?
The Code Project Is Your Friend...
|
|
|
|
|
Is there anyone help me?
I'm looking for How can I find MS-SQL Server List in same area network.
When I user MS SQL Query Analyzer, it gives me the available Server List.
I want to develop just like that with C#.
Thanks a lot.
|
|
|
|
|
|
|
http://www.codeproject.com/csharp/ServerComboBox.asp[^]
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|