|
delegate void dAddListItem(string cItem);
private void StartThreadHere()
{
string cListItem="Item2";
if (this.listView1.InvokeRequired)
{
dAddListItem delAddItem = new dAddListItem(AddListItem);
this.listView1.Invoke(delAddItem, cListItem);
}
else
{
this.listView1.Items.Add(cListItem);
}
}
private void AddListItem(string cItemToAdd)
{
this.listView1.Items.Add(cItemToAdd);
}
private void Form1_Load(object sender, EventArgs e)
{
this.listView1.Items.Add("Item1");
Thread t = new Thread(new ThreadStart(StartThreadHere));
t.Start();
}
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
Hi all,
I am not too sure where to post my question, so I'll just put it here and hope that somebody will help me. Honestly, I've reached a deadend after searching ALOT. I'll greatly appreciate any help or indication.
The problem:
In Internet Explorer you can right-click on a page and hit "Export to Microsoft Excel". This command is set in the registry (HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Export to Microsoft Excel) to call Excel with "EXCEL.EXE/3000".
The purpose:
I would like to develop a executable with simular functionality: the ability to be called from the internet explorer.
The question:
What is the technology that excel is using? Is it a COM object implementing an interface? How do I do that in .NET? And what on earth is that "/3000" parameter?!?
I've been looking for an answer for quite some time now. Please help.
Rgds,
G.
|
|
|
|
|
Due to the limitation placed on scripting languages due to security I do not believe that would be possible unless you wrapped the IE Browser in your own code, created an ActiveX control, or processed on the server.
Just my thoughts
|
|
|
|
|
Hi Christopher,
Thank you for sharing your thoughts. The main thing that really puzzles me is how it's possible to have a standard executable like Excel.exe being called from IE and work just like a script.
I'll follow your lead and take a closer look into ActiveX control, since I am not very familiar with those and perhaps there is something there.
Rgds,
D.
|
|
|
|
|
Hi again,
I managed to solve this on my own . If anyone is interested in the solution drop me a note on my mailbox..
G.
|
|
|
|
|
connstr = "data source =tm8425\gaurav ;initial catalog=gmcrm;user id=sa;password=maggy;";
sqlConnection conn = new SqlConnection(connstr);
error: unrecognised escape sequence. in tm8425\gaurav
Plz help
Thanks and Regards,
Ahmad
ahmad.osama1984@gmail.com
|
|
|
|
|
try using tm8425\\gaurav
"Change is the only constant thing in life
Either or survive or get extinct"
|
|
|
|
|
Can do like
connstr = @"data source =tm8425\gaurav ;initial catalog=gmcrm;user id=sa;password=maggy;";
Jayant D. Kulkarni
Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET
|
|
|
|
|
yep!
"Change is the only constant thing in life
Either or survive or get extinct"
|
|
|
|
|
Hi all
how to display a dialog box on button click and accept the values given in the text box in the dialog box
sas
|
|
|
|
|
create a new form as a dialog and grab its text
"Change is the only constant thing in life
Either or survive or get extinct"
|
|
|
|
|
This is not enough i know how to do that but how to assign the textfron text box
|
|
|
|
|
send it back to main form through a public function or something like that
|
|
|
|
|
It goes something like this..
public class EditBox : System.Windows.Forms.Form
{
private Button isOK;
public TextBox aField;
... code here for the EditBox
}
public class MainApp
{
string TextfromUser;
private DoSomething()
{
EditBox eb = new EditBox();
if (eb.ShowDialog() == DialogResult.OK)
{
TextfromUser = eb.aField.Text;
}
... do something with text from the user
}
}
|
|
|
|
|
Hi All,
the problem is that I want to change the border colour of the form. The strip on which the maximize, minimize and close button resides.
Plz Help Me
SAS
|
|
|
|
|
I have a solution with a managed C++ project, and a C# project which references the C++ project.
My C++ project contains the following:
struct AAA { ... };
typedef public enum BBB { ... };
public delegate void CallbackDelegate(AAA * a, BBB b);
class SomeClass
{
...
static void RegisterCallback(CallbackDelegate^ callback);
...
} My C# project is supposed to use RegisterCallback() .
I can't use the CallbackDelegate in my C# project though, because it contains a pointer.
So I've declared the following in C# hoping that .NET would do the conversions for me :
[StructLayout(LayoutKind.Sequential)]
public struct AAA { ... }
public enum BBB: int { ... }
public delegate void CallbackDelegate(AAA a, BBB b); However, now I can't send my CallbackDelegate as a parameter to RegisterCallback() because it's not the same signature.
I'm new to all of this C++.NET s**t, so I don't really know how to use it in C#.
Could anyone point me in the right direction?
Thanks in advance,
Shy.
|
|
|
|
|
shyagam wrote: I can't use the CallbackDelegate in my C# project though, because it contains a pointer.
Couldn't you just create an unsafe delegate in C#?
See: unsafe (C# Reference) [^]
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
Hi I just wanted to know the proper way of updating a DataRow.
If I have a DataTable say locDTable which already has rows populated through
Iterate<br />
{<br />
DataRow locDRow = locDTable.NewRow();<br />
locDTable.Rows.Add(locDRow);<br />
}
How do I access (and modify a particular column entry for a particular row?
The way I would do it something like:
locDTable.Rows[rowIndex][colIndex] = newValue;
Is this the proper way?
Thank you in advance!
j11Software
|
|
|
|
|
Hi
Maybe, instead of access to the column by an index you can use strings constants to access to columns. It seems more elegant and if you change the structure of the table the acces to the previous column doesn't change.
To access to a particular row the only way is by an index.
|
|
|
|
|
I agree 100% with the constants approach for column names, we do that all the time here and has paid of on numerous occasions. We also do it for the table names.
It decouples you from Database especially for column name changes (just change constant literal) as well as makes the code much more readable.
|
|
|
|
|
hi, every one i get this exception that i couldnot come up with a solution. reading severla forum i made sure that all dll file are copied but still i get the error. any help plz point out.
System.Web.HttpException: Exception of type System.Web.HttpException was
thrown. ---> System.IO.FileNotFoundException: ...get_aspx_ver.aspx
|
|
|
|
|
You might have copied the DLL's but it looks like you missed out that aspx file
|
|
|
|
|
Hi Members,
Plz tell me how to encrypt/decrypt a string in c sharp.net using cryptography namespace.
thanks n Regards ,
Ahmad
ahmad.osama1984@gmail.com
|
|
|
|
|
You should use CryptoStream class. Click here[^].
Regards
|
|
|
|
|