|
Hi,
I find that I can drag an jpeg image from IE to MSWord document, but can't drag an image from IE to a c# window form which has already added with both the dragOver and dragDrop events. But I can drag an the image from MSWord document to the C# window form. Why ?
Summary for dragging and dropping jpeg image
1. from IE to C# window form : failed
2. from IE to MSWord : OK
3. from MSWord to C# Window form : OK
Thanks
|
|
|
|
|
What is the code in your DragDrop event?
--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
|
|
|
|
|
Thanks for ur reply.
The code for the drag drop is
void button1_DragDrop(object sender, DragEventArgs e)
{
object a = e.Data.GetData(DataFormats.Bitmap);
this.button1.Image = (Bitmap)a;
}
|
|
|
|
|
I looked into this a little. It seems that when you drag an image from MS Word, it is in fact a linked or embedded OLE Object. The data object contains a CF_EMBEDDEDOBJECT format that needs to be extracted using "standard OLE techniques". I've never done this before, sorry I can't really help you with it. However, this does explain why you are able to drag and drop images from IE to Word and Win Forms, but not Word to Win Forms.
--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
|
|
|
|
|
Has anybody done performance testing on the SqlBulkCopy class?
I'd assume that, like many classes that operate on bulk data, up to a certain point, doing individual SQL Insert statements (by enumerating and calling individual ExecuteNonQuery calls) will be more efficient than using SqlBulkCopy. But at some point, SqlBulkCopy will become more effiecient. In other words, something like this:
NumberOfRecords < M : Enumerated calls to ExecuteNonQuery is more efficient.
NumberOfRecords > M but < N : Doesn't matter which you use, as both are about the same.
NumberOfRecords > N : SqlBulkCopy more efficient.
Anybody know about what M and N would be? I did some Googling, but didn't come up with much in this regard.
Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan
Portland, Oregon, USA
|
|
|
|
|
|
Hi, everybody!
My problem is that:
I have put in a dom node, representing an image, in a web page through c sharp, but how could I manage the click of the image?
I would like to bind the click event on the image to some work that I encapsulated insiede a c sharp method...but how could I bind the click event to some desired work? Am I to encapsulate thus work insiede an other language method? like javascript for example? but how if I'm writing a c sharp program?
I hope to have been rather clear, because I'm italian and I don't know if I explained my trouble good way, I hope so
thank yuou all in advance.
Lulaleila
|
|
|
|
|
Hey, wonder if any1 can help me, its a fairly simple issue to deal with so im told but ive spent ages trying to work this out, but havnt got anywhere. So was wondering if sum1 could lend a hand.
Basically ive an array of strings and i want to randomly select a word out of this array
Once the word is selected i then need to split the word into separate characters, so I can check the users input against each letter until they finally guess the word
I know it seems alot to ask, but id really appreciate it if sum1 could provide some example I could follow in order for me to get mine working...
Thanks in advance
Neptune
|
|
|
|
|
Random rand = new Random();
string[] somestrings = { "Hello", "World", "From", "An", "Array" };
string randString = somestrings[rand.Next(somestrings.Length - 1)];
char[] characters = randString.ToCharArray();
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Before you start writing an ounce of code, make sure you have a game plan (i.e. psuedocode or flowchart) that expresses your logic. Once you're fairly certain your logic is correct, it'll be pretty easy to convert it to C# (or any other language).
You could start by posting your logic and we'd be happy to help you refine/verify it.
/ravi
|
|
|
|
|
I would do something like this.
public bool isMatch()
{
bool Matches = false;
string[] asCompare = new string[4];
asCompare.SetValue("First0", 0);
asCompare.SetValue("Second1", 1);
asCompare.SetValue("Third2", 2);
asCompare.SetValue("Fourth3", 3);
Random ran = new Random();
int iVal = ran.Next(asCompare.Length - 1);
string sValue = asCompare[iVal];
char[] chars = sValue.ToCharArray();
string sCharTracker = "";
for (int i = 0; i < chars.Length; i++)
{
sCharTracker = chars[i].ToString();
//Matches = //you would probably do your compare with a method call here//
}
return Matches;//This will be if it matches or not//
}
|
|
|
|
|
neptune2k wrote: Basically ive an array of strings and i want to randomly select a word out of this array
Once the word is selected i then need to split the word into separate characters, so I can check the users input against each letter until they finally guess the word
That's a one-liner.
char[] chars = (new string[] { "some","words","in","an","array" })[(new Random()).Next(5))].ToCharArray();
---
b { font-weight: normal; }
|
|
|
|
|
thanks guys, thats really helped, i get where i was going wrong now
i know where to come in future if i hit any problems
|
|
|
|
|
I want to know how to copy,cut & paste the selected text in a text editor.
can any one help me in this please.
|
|
|
|
|
By "text editor" do you mean a TextBox ? If so, see this[^] link.
/ravi
|
|
|
|
|
Hi!
I'm trying to create a custom conflict resolver for SQL Server 2000 in C# but
I can't seem to find any source code examples of where I can actually
see what needs to be done.
Any help is welcome
Thanks,
Taka Ataka
Taka
|
|
|
|
|
hello firend,
i'm getting the following exception:
An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll<br />
<br />
Additional Information: The UNC path should be of the form\\server\\share.
if anyone knows anything about it plz let me know at once.
awaiting ur reply
Saira
|
|
|
|
|
You are providing a path that is in the wrong format.
If you supply any information about what you are trying to do, or what your code looks like, it might be possible to say anything more specific than that.
---
b { font-weight: normal; }
|
|
|
|
|
I don't know how to change background color of selected cell in datagrid.
It looks bad (it's gray) and i want it white
The problem can be seen on this image:
http://www.codeproject.com/csharp/Custom_DataGridColumnStyl/Custom_DataGridColumnStyl.jpg
Help
абвгдежзийклмнопрстуфхцчшщъьюя
|
|
|
|
|
The problem is only when
grid.Readonly = true
ju
абвгдежзийклмнопрстуфхцчшщъьюя
|
|
|
|
|
Hi all
How can I retrieve the last inserted record identity in Oracle. In sql server it's SELECT @@IDENTITY but how do we do it in oracle.
Thanks,
Dylan
|
|
|
|
|
One way is to create a SEQUENCE, cl_entry_seq, query this sequence for the next value, cl_entry_seq.nextval, and store this value into a stored procedure variable, v_entry_key by executing:
select cl_entry_seq.nextval into v_entry_key from dual;
Then you use the value of v_entry_key as your identity value in your INSERT statement.
George
|
|
|
|
|
hi,
another way cld be
select max(columnname) from tablename
hope this helps
Nitin...
|
|
|
|
|
Hello,
I am in the middle of a eLearning System project. Now I want to initiate a Video Conferencing system between 2 computers. What is the most efficient way of achieving this. I was looking at few options.
Should I use DirectX OR GDI+? Can I use Flash to do the same?
Thanks
|
|
|
|
|
I am trying to pass an array of strings from C# to the .NET component
I created in Matlab. I am getting a compile time error in Visual
Studio telling me that it can't convert a string array to a MWArray.
I have tried performing explicit conversions, but none of them work.
Any help would be greatly appreciated.
Here is an example of what I am trying to do:
[C#]
using MathWorks.MATLAB.NET.Arrays;
using MyMatlabNet;
...
MyMatlabNetClass myclass = new MyMatlabNetClass();
...
string [] mydata;
myclass.somemethod(mydata);
I have tried (MWArray), (MWCharArray), (MWCellArray) and nothing
works (allows it to compile).
|
|
|
|