|
Take a look at this article[^] by Microsoft.
It's time for a new signature.
|
|
|
|
|
balajict wrote: why we need tat?
I don't think that both have been thought up simultaneously with a distinct idea "let's use A in circumstance one and B in circumstance two". You got a sledgehammer and a warhammer, both have similar uses but different advantages and disadvantages in different situations.
I are Troll
|
|
|
|
|
subtle and instructive, I like it.
|
|
|
|
|
|
hi Jinal Desai,
thanks man.now i got clear idea about it thanks again.
|
|
|
|
|
I have created a VSTO Excel addin. It's deployment is really a headache.
I want to set VSTO 2.0 RunTime in prerequisite but I am using VS 2008 and it shows VSTO 3.0 Runtime in prerequisite list. I can not select that because that will use .NET 3.0 or above. My applicaiton is .NET framework 2.0 compatible and it requires VSTO 2.0 not 3.0 as a minimum requirement.
How to set VSTO runtime 2.0 as a minimum requirement ?
I want that If any dependency is not found on client PC then either it should be download from internet(in case of .NET framework) or it should be packaged with installation (in case of VSTO 2.0)
|
|
|
|
|
Are all your projects set to use and compiled to the 2.0 framework?
To verify, go to the menuitem "Project", and select "Properties". There's an "Application" tab, and it should state that it's using the 2.0 framework in the textbox labeled "Target Framework".
I are Troll
|
|
|
|
|
Yes my both projects(SetSecurity & Excel Addin) in soltion are targeting to Framework 2.0
My setup project is also showing dependence "Microsoft .NET Framework" with version 2.0.50727
|
|
|
|
|
VSTO 3 isn't supported on the 2.0 framework, I hoped that the installer would drop everything that would require a newer version of the framework.
Can you uninstall VSTO3 (to make sure there's no references at all), building[^] the setup using VS2005 & VSTO2?
I are Troll
|
|
|
|
|
unfortunately it is not getting uninstall. On uninstall it crashes and shows "Send \ Don't Send". Any VSTO run-time cleanup tool available ?
|
|
|
|
|
Hi
I want types of layout in .net
please help me
|
|
|
|
|
You will have to be more specific as different technologies provide different layouts.
If you are looking for WPF layouts, see here.
Silverlight, too, provides different panels for layouts.
|
|
|
|
|
LayoutKind[^]
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
Hi there! I need some help with datagrid.
How to put a image\ico in the datagrid header column?
Thanks
|
|
|
|
|
One way you can do this is to use the CellsPainting event to draw the
bitmap for a particular header cell. Here is code that does this
assuming the bitmap is in an imagelist.
//this.images is an ImageList with your bitmaps
void dataGridView1_CellPainting(object sender,
DataGridViewCellPaintingEventArgs e)
{
if (e.ColumnIndex == 1 && e.RowIndex == -1)
{
e.PaintBackground(e.ClipBounds, false);
Point pt = e.CellBounds.Location;// where you want the bitmap
in the cell
int offset = (e.CellBounds.Width -
this.images.ImageSize.Width) / 2;
pt.X += offset;
pt.Y += 1;
this.images.Draw(e.Graphics, pt, 0);
e.Handled = true;
}
}
Jinal Desai
|
|
|
|
|
Thank you Jinal for the replay,
but that work for the DataGridView. I need to do that in a DataGrid, i have to use framework 1.1
Best regards,
|
|
|
|
|
I am confused; I am using VB2010, IBM.iSeries.DB2 on an as400 V5R4. I am trying to establish an OLEDB connection, and return the values from the selected table to a DataGridView. I had one of the admin’s make me file named GARBAGE, in the Rprtaccess catalog. In the past, I have been able to connect via access and an ODBC connection. My project is too big for access, and the SQL middleware we have is clunky and not user friendly. This is a program that will generate the SQL statements, specifically the WHERE: clause and populate the datagrid with the selected criteria. In essence I am making a user friendly striped down program, that has variables that are manipulated by the end user, and the rest, referenced tables and libraries are coded.
Imports System.Data.OleDb<br />
Imports System.Exception<br />
<br />
<br />
<br />
Public Class Form11<br />
<br />
Public Sub Form11_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
<br />
If Not String.IsNullOrEmpty("10.0.0.75\rprtaccess\garbage") Then<br />
<br />
Dim OleDbConn As New OleDbHandler<br />
Dim dgvOleDb1 As New Object<br />
Dim ds As DataSet = OleDbConn.GetDataFromOleDb("10.0.0.75\rprtaccess\")<br />
<br />
Dim OleCm As New OleDbCommand<br />
<br />
<br />
If ds IsNot Nothing Then<br />
<br />
Dim table As New DataTable<br />
table.Locale = System.Globalization.CultureInfo.InvariantCulture<br />
<br />
OleCm.CommandType = System.Data.CommandType.StoredProcedure<br />
OleCm.CommandText = "Select Garbage"<br />
Dim CM As Object = OleCm.CommandText<br />
<br />
<br />
Dim OleDA As New OleDbDataAdapter()<br />
ds = CM.SelectCommand.ExecuteReader<br />
<br />
<br />
<br />
dgvOleDb1 = table.Select<br />
<br />
dgvOleDb1.DataSource = DataGridViewEditMode.EditProgrammatically<br />
dgvOleDb1.DataSource = ds.Tables(0)<br />
End If<br />
End If<br />
End Sub<br />
<br />
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvOleDb1.CellContentClick<br />
<br />
End Sub<br />
Public Sub ShowOleDbException()<br />
Dim mySelectQuery As String = "SELECT column1 FROM table1"<br />
Dim myConnection As New OleDbConnection _<br />
("Provider=Microsoft.Jet.OLEDB.4.0;DataSource=")<br />
Dim myCommand As New OleDbCommand(mySelectQuery, myConnection)<br />
<br />
Try<br />
myCommand.Connection.Open()<br />
Catch e As OleDbException<br />
Dim errorMessages As String<br />
Dim i As Integer<br />
<br />
For i = 0 To e.Errors.Count - 1<br />
errorMessages += "Index #" & i.ToString() & ControlChars.Cr _<br />
& "Message: " & e.Errors(i).Message & ControlChars.Cr _<br />
& "NativeError: " & e.Errors(i).NativeError & ControlChars.Cr _<br />
& "Source: " & e.Errors(i).Source & ControlChars.Cr _<br />
& "SQLState: " & e.Errors(i).SQLState & ControlChars.Cr<br />
Next i<br />
<br />
Dim log As System.Diagnostics.EventLog = New System.Diagnostics.EventLog()<br />
log.Source = "My Application"<br />
log.WriteEntry(errorMessages)<br />
Console.WriteLine("An exception occurred. Please contact your system administrator.")<br />
End Try<br />
End Sub<br />
<br />
End Class
#Region " Import Section"<br />
Imports System<br />
Imports System.Collections.Generic<br />
Imports System.Text<br />
Imports System.Data<br />
Imports System.Data.OleDb<br />
Imports System.Reflection<br />
Imports System.Runtime.InteropServices<br />
Imports Microsoft.Office.Interop<br />
<br />
#End Region<br />
<br />
<br />
<br />
Public Class OleDbHandler<br />
<br />
' Return data in dataset from OleDb. ' <br />
Public Function GetDataFromOleDb(ByVal a_sFilepath As String) As DataSet<br />
Dim ds As New DataSet()<br />
Dim oOleDbConnection As OleDbConnection<br />
Dim sConnString As String = _<br />
"Provider=IBMDA400.DataSource.1;" & _<br />
"Data source=10.0.0.75;" ' & _<br />
'"User Id=myUsername;" & _<br />
' "Password=myPassword"<br />
oOleDbConnection = New OleDb.OleDbConnection(sConnString)<br />
oOleDbConnection.Open()<br />
<br />
<br />
<br />
Try<br />
oOleDbConnection.Open()<br />
Catch ex As OleDbException<br />
Console.WriteLine(ex.Message)<br />
Catch ex As Exception<br />
Console.WriteLine(ex.Message)<br />
End Try<br />
<br />
' It Represents data table '<br />
Dim dt As New System.Data.DataTable()<br />
dt = oOleDbConnection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, Nothing)<br />
If dt IsNot Nothing OrElse dt.Rows.Count > 0 Then<br />
For sheet_count As Integer = 0 To dt.Rows.Count - 1<br />
Try<br />
' Create Query to get Data from sheet. '<br />
Dim sheetname As String = dt.Rows(sheet_count)("table_name").ToString()<br />
Dim da As New OleDbDataAdapter("SELECT * FROM [" & sheetname & "]", sConnString)<br />
da.Fill(ds, sheetname)<br />
Catch ex As DataException<br />
Console.WriteLine(ex.Message)<br />
Catch ex As Exception<br />
Console.WriteLine(ex.Message)<br />
End Try<br />
Next<br />
End If<br />
oOleDbConnection.Close()<br />
Return ds<br />
End Function<br />
<br />
<br />
Private Function GetDataOleDb(ByVal a_dtData As System.Data.DataTable) As Object(,)<br />
Dim obj As Object(,) = New Object((a_dtData.Rows.Count + 1) - 1, a_dtData.Columns.Count - 1) {}<br />
<br />
Try<br />
For j As Integer = 0 To a_dtData.Columns.Count - 1<br />
obj(0, j) = a_dtData.Columns(j).Caption<br />
Next<br />
<br />
Dim dt As New DateTime()<br />
Dim sTmpStr As String = String.Empty<br />
<br />
For i As Integer = 1 To a_dtData.Rows.Count<br />
For j As Integer = 0 To a_dtData.Columns.Count - 1<br />
If a_dtData.Columns(j).DataType Is dt.[GetType]() Then<br />
If a_dtData.Rows(i - 1)(j) IsNot DBNull.Value Then<br />
DateTime.TryParse(a_dtData.Rows(i - 1)(j).ToString(), dt)<br />
obj(i, j) = dt.ToString("MM/dd/yy hh:mm tt")<br />
Else<br />
obj(i, j) = a_dtData.Rows(i - 1)(j)<br />
End If<br />
ElseIf a_dtData.Columns(j).DataType Is sTmpStr.[GetType]() Then<br />
If a_dtData.Rows(i - 1)(j) IsNot DBNull.Value Then<br />
sTmpStr = a_dtData.Rows(i - 1)(j).ToString().Replace(vbCr, "")<br />
obj(i, j) = sTmpStr<br />
Else<br />
obj(i, j) = a_dtData.Rows(i - 1)(j)<br />
End If<br />
Else<br />
obj(i, j) = a_dtData.Rows(i - 1)(j)<br />
End If<br />
<br />
Next<br />
Next<br />
Catch ex As Exception<br />
Console.WriteLine(ex.Message)<br />
End Try<br />
Return obj<br />
End Function<br />
<br />
End Class
|
|
|
|
|
Great, but what error(s) are you getting? Without knowing this all you will get are guesses....
Bob
Ashfield Consultants Ltd
|
|
|
|
|
hi everyone,i'm trying to develop an application to send an e-mail from my c# windows application
here i'm tis namespace
using System.Net.Mail;
and its my code:::::
private void button1_Click(object sender, EventArgs e)
{
try
{
SmtpClient client = new SmtpClient("192.168.1.15", 808);
MailAddress from = new MailAddress("a@live.com");
MailAddress to = new MailAddress("d@live.com");
MailMessage mail = new MailMessage(from,to);
mail.Body = textBox1.Text;
mail.Subject = " hi da ";
client.Send(mail);
}
catch (SystemException se)
{
MessageBox.Show(se.ToString());
}
finally
{
}
--------------------------------------------------
this is ma code but its work but i'm getting run time error like " failure sending mail, unable to connect to remote server"
in smtpclient class i have given ip address as my host and port id.....
pls help me to resolve tis error
modified on Friday, April 16, 2010 4:23 AM
|
|
|
|
|
Do you have an smtp server running at 192.168.1.15:808 ?
probably not.
You should use the smtp relay host that your isp has given you. (use the fqdn, not the ip-address) If you don't have mail at an isp, this won't work. (live.com does not provide smtp relay services). Also, your isp may limit the from: address, and may require authentication when sending mail.
|
|
|
|
|
hi their,u have told me to use fqdn instead of smtp
class n also u have mentioned tat "live.com does not provide smtp relay services" then which mail portal does support to send mails without any limitation or minimum limitation...
how do i find fqdn....?
could u give the exact coding to accomplish my task?
|
|
|
|
|
fqdn means fully qualified domain name. Try Google if you don't understand a word.
What you're looking for is an 'open smtp relay' (look it up before replying). Technically not illegal, but if you find one, your mail will probably be blocked by the recipient's ISP. Are you trying to get into the spam business?
You will have to set up your own smtp server if you want to send mail without limitations, but if you start spamming,
expect
1) Your Internet account to be closed down by your ISP
2) If you're really good at it, a visit from the Feds. (CAN-SPAM act of 2003).
If your intentions are pure, have a look at this list: http://www.iopus.com/guides/bestpopsmtp.htm[^]
|
|
|
|
|
i saw about fqdn in google ...
but my aim is not to get into spam business...its just for my learning only actually i wanna to develop a application just like outlook n i'm student so i'm wanna to learn it. i wan code for my gmail account....once if i go through tat sample code then i ll become much clear...could u post any sample code?if yes pls post it soon because i'm eager to learn it
|
|
|
|
|
|
hey thanks friend...
its works now..now i realized my problem..
actually i was sending from firewall enabled machine ..after i gone through tat code n its commands i turn off my proxy n i sent mail then i worked ...once again tanks michal
|
|
|
|