|
Hi guys!
I'm struggling with a weird problem I'm unable to solve so far.
I want to enable drag&drop of mail attachments from Outlook.
This does work when my drop target is, for example, a Form or a Panel ; I can get all the file names and contents, no problem.
As soon as I try the same with a RichTextBox as drop target, it doesn't work - whatever I set the desired DropEffect to (usually DropEffect.Copy ), the cursor is always DropEffect.Move when dragging files from Explorer over the RTB (minor nuisance) and DropEffect.None if I drag mail attachments from Outlook (showstopper).
It doesn't matter if I set the effect in DragEnter or DragOver , if EnableAutoDragDrop is true or false, I've even tried loading a Rich Edit control 4.1 instead of the default V2.0, but to no avail.
Can anyone help?
Thanks in advance!
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
I think its windows inbuilt text effects...
well, try this
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Thanks, but what exactly do you mean by "windows inbuilt text effects"?
It's not that I don't know how to handle drag&drop from outlook in general (it's working fine on non-RichTextBox controls as drop targets). The question is how to make the RTB appreciate the DragDropEffect I set in the DragEnter /DragOver events and not to tell the user that he can't drop an attachment there when I explicitely set the DragDropEffect to Copy .
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
mav.northwind wrote: but what exactly do you mean by "windows inbuilt text effects"?
that mean windows is handling that drag drop itself as text content...
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
I’m a new developer in a very complex project. I like to create a program that can plot the methods that is executing in the program to get a fast view of what is calling what. Of course I can debug the program but the best way right now is to write some code like this:
StackTrace s = new StackTrace();
CallAMettodThatDoesALotOfOtherCalls();
s.PrintAllCalledMethodsInAnEasyToReadWay();
Any tip on code/tool that manages that?
_____________________________
...and justice for all
|
|
|
|
|
Not that I know of, but I'd sure like a copy of such a tool if you can find it
I are troll
|
|
|
|
|
Hi,
I have a webform that shows summary information at the top of the page.
If there is only one "row" in the database for the associated project, the summary looks like this:
Tool_ID= "returned value"
Tool ="returned value"
Tool_Quantity= "returned value"
However if there are multiple tool_ids associated with the project in session (ex, 2 tools), the summary will display each tool in its own column:
Tool_ID= "returned value" Tool_ID= "returned value"
Tool ="returned value" Tool ="returned value"
Tool_Quantity= "returned value" Tool_Quantity= "returned value"
The maximum number of Tool_ids that can be associated with any project is 3. I have a query that will search the project and get the tool_ids, tool and tool_quantity, but I dont know how to code in to display the output as I have listed above. I also need this to be able to get updated as the user can add more tools to the project before submission. Please help!
Thank you
|
|
|
|
|
I have created an application and I am using a panel to load and display custom user controls.
In all these custom controls, there is need save data or cancel changes. I want to design a menu or a tool bar with the save and cancel commands such that changes are saved or cancel depending on the control currently displayed. The save changes command is a little complex for me because the code for saving data would be different for each control. How can I design my menu/tool bar such that the right code executes depending on the displayed control?
Secondly, in my display panel how can I get a "reference" ton the currently displayed/visible control. There could be other controls in the back ground hidden by the current control but I just to be able to reference only the top-most control. NB When I load a control, set I it to fill up the entire panel space which hides any control that may have been visible before but I suppose that does not necessarilly set the visible flag of the previous control to false so. So I can't use the Visible property to check for the "visible" control.
Thanks for you help.
|
|
|
|
|
Here I am trying to fill the tree view category and subcategory wise..see the below
|Benson and Hedges
|Kings Gold Falke
Beverages
| |-Beers
| |-Bell Lager 500 ML
| |-CLUB PILSENER 500 ML
| |-Juices
| |-Apple Juice
| |-Chikooo Juice
|-Food
| |-MeatProducts
| |-GOAT MEAT
| |-Fruits
| |-APPLE GREEN
| |-LOCAL ORANGES
|-VegeTable |
| |-BEETROOT
| |-TOMATO FRESH
I have tried the following code..but I am able to fill only one product under one sub category. Please help me out how to??initialize and fill the data into tree view
foreach (DataRow row in table.Rows)
{
MainNode = new TreeNode(row.ItemArray[0].ToString());
MainNode.Name = row.ItemArray[0].ToString();
if (MainNode.Text == "")
{
}
else
{
ChildNode = new TreeNode(row.ItemArray[1].ToString());
ChildNode.Name = row.ItemArray[1].ToString();
if (ChildNode.Text == "")
{
ChildNode = new TreeNode(row.ItemArray[3].ToString());
ChildNode.Name = row.ItemArray[3].ToString();
ChildNode.Tag = row.ItemArray[2].ToString();
if (!MainNode.Nodes.ContainsKey(ChildNode.Name))
{
MainNode.Nodes.Add(ChildNode);
} }
else
{
SubNode = new TreeNode(row.ItemArray[3].ToString());
SubNode.Name = row.ItemArray[3].ToString();
SubNode.Tag = row.ItemArray[2].ToString();
if (!ChildNode.Nodes.ContainsKey(SubNode.Name))
{
ChildNode.Nodes.Add(SubNode);
} }
if (!MainNode.Nodes.ContainsKey(ChildNode.Name))
{
MainNode.Nodes.Add(ChildNode);
}
else
{
for (int i = 0; i <= MainNode.Nodes.Count; i++)
{ MainNode.Nodes.Add(ChildNode);
} }
if (!RootNode.Nodes.ContainsKey(MainNode.Name))
{
RootNode.Nodes.Add(MainNode);
} } } }
|
|
|
|
|
Problem is
for (int i = 0; i <= MainNode.Nodes.Count; i++)
{ MainNode.Nodes.Add(ChildNode);
}
why this loop...you should learn about recursive methods
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Recursive methods??
Please help me out with an example or an article..I have never worked on it??
|
|
|
|
|
|
Hello!
I have 2 forms. The first has a DataSet with a table("Table1"), the second form has a BindingSource, BindingNavigator, DataGridView;
<br />
Form1 fmMain=new Form1;<br />
Form2 fmSecond=new Form2();<br />
fm.ShowDialog(fmMain)<br />
private void Form2_Load(object sender, EventArgs e)<br />
{<br />
BindingSource.DataSource = ((Form1)this.Parent).DataSet;<br />
BindingSource.DataMember = "Table";<br />
DataGridView.DataSource=BindingSource;<br />
BindingNavigator.BindingSource=BindingSource;<br />
}<br />
BindingNavigator shows that there are 100 rows and the position=1, but DataGridView doesn't display anything.
But this code works:
<br />
Form1 fmMain=new Form1;<br />
Form2 fmSecond=new Form2();<br />
fm.ShowDialog(fmMain)<br />
private void Form2_Load(object sender, EventArgs e)<br />
{<br />
DataGridView dt = new DataGridView();<br />
BindingSource.DataSource = ((Form1)this.Parent).DataSet;<br />
BindingSource.DataMember = "Table";<br />
dt.DataSource=BindingSource;<br />
dt.Parent = this;<br />
BindingNavigator.BindingSource=BindingSource;<br />
}<br />
Does anybody have some ideeas?
|
|
|
|
|
at least can you see the column headers? Do you use AutoGenerateColumns = true , or defined columns?
Calin
|
|
|
|
|
I cannot see them, the DataGridView is empty.
Calin Tatar
Where have you found the property "AutoGenerateColumns"?, I couldn't find it.
|
|
|
|
|
AutoGenerateColumns is not browseable in propertygrid.
You may use it from code:
dataGridView.AutoGenerateColumns = true;
Calin
|
|
|
|
|
Hi i am using WebClient to upload some file to a server using the WebCLient.Uploadfile method
every time i try to run that method its throwing me a bad request error
The remote server returned an error: (400) Bad Request. is the exact exception message.
i dont know where am i doing wrong. everything seems to be ok
can anybody help me on this
i ll appreciate the Help.
Thanks,
Mamtha
|
|
|
|
|
|
Sorry Eliott
i couldnt really understand the article, seems like it actually trying to advertise their product
thanks,
Mamtha.
|
|
|
|
|
Something is wrong in your code with the way you are communicating with the web server is the summary. Or something is wrong with the web server, I assumed it was your code because, well, you didn't understand the article.
|
|
|
|
|
Yes, first thing that really comes up should be there is something wrong with my code.
the intresting thing is it is working fine when am running the method explicitly on a button click
and when i run it as a windows service, its throwing me the 400 error.
so this is what confusing me if there is something really wrong with my code then it should break on first attempt.
Thanks,
Mamtha
|
|
|
|
|
Yep, let me see here. Hrm I Just finished debugging your imaginary code, it appears the error is on line 46
while (1 == 2)
{
...
I can't guess here man, post something, if it is huge throw it in rafb.net/paste
|
|
|
|
|
yep here is the code part
try
{
WebClient webCl = new WebClient();
webCl.Headers.Add("Content-Type", "text/xml");
byte[] result = webCl.UploadFile("http://" + mgr.GetIniString("Server", "name", "localhost") + "/" + mgr.GetIniString("Server", "path", "localhost") + "/uploadFile.php", "POST", cachePath + "/" + TEMP_NAME);
string sresult = System.Text.Encoding.UTF8.GetString(result, 0, result.Length);
if (sresult == null)
{
log.Error("XML File could not be Read");
}
else
{
retVal = true;
}
}
catch (Exception ex)
{
log.Error(ex.Message.ToString());
}
finally {
File.Delete(cachePath + "/" + TEMP_NAME);
}
its actually throwing the 400 bad request at webcl.iploadfile method
|
|
|
|
|
if the problem is running as a service maybe its a security issue... of course this is just a suggestion as if i had a definative answer i would post that instead
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
yeah even i feel that it could have to do something to do with the security issue.
but am not really sure how to handle it
|
|
|
|