Click here to Skip to main content
15,867,568 members
Home / Discussions / C#
   

C#

 
QuestionUsing .NET C# UI control from Visual Studio 6 C++ Pin
StephenJB3-Apr-07 8:17
StephenJB3-Apr-07 8:17 
QuestionSaving project to file Pin
sinosoidal3-Apr-07 7:02
sinosoidal3-Apr-07 7:02 
AnswerRe: Saving project to file Pin
Douglas Troy3-Apr-07 7:21
Douglas Troy3-Apr-07 7:21 
GeneralRe: Saving project to file Pin
sinosoidal3-Apr-07 7:25
sinosoidal3-Apr-07 7:25 
GeneralRe: Saving project to file Pin
Douglas Troy3-Apr-07 7:29
Douglas Troy3-Apr-07 7:29 
GeneralRe: Saving project to file Pin
sinosoidal3-Apr-07 23:31
sinosoidal3-Apr-07 23:31 
GeneralRe: Saving project to file Pin
sinosoidal3-Apr-07 23:37
sinosoidal3-Apr-07 23:37 
QuestionImplementing drag and drop funcionality Pin
sinosoidal3-Apr-07 6:56
sinosoidal3-Apr-07 6:56 
Hi,

I'm trying to implemenent some drag and drop functionality.

Basicly i have two controls:

- A listbox, the source of drag
- A tabcontrol, the destiny of drag

Well, i have wrote the following events:

<br />
void layoutPanelOnMouseDown(object sender, MouseEventArgs me)<br />
{<br />
    Layout temp = null;<br />
    ListBox lb = (ListBox)sender;<br />
    int index = lb.IndexFromPoint(me.X, me.Y);<br />
    if (index >= 0)<br />
    {<br />
        lb.DoDragDrop((string) lb.Items[index], DragDropEffects.Copy);<br />
    }<br />
}<br />


<br />
void displayEditorOnDragEnter(object sender, DragEventArgs de)<br />
        {<br />
            if (de.Data.GetDataPresent(DataFormats.Text))<br />
            {<br />
                de.Effect = DragDropEffects.Copy;<br />
            }<br />
            else<br />
            {<br />
                de.Effect = DragDropEffects.None;<br />
            }<br />
<br />
        }<br />


<br />
void displayEditorOnDragDrop(object sender, DragEventArgs de)<br />
        {<br />
            string layoutName = (string)de.Data.GetData(DataFormats.Text);<br />
        }<br />


I have 3 tabs in the tabcontrol and i want to apply this to the first tab.

When i try to do something with this, i can drag, but i cant drop.

This is in a MDI application where the listbox is in the main form and the tabcontrol is in the child form.

Any tips?

Thx,

Nuno
AnswerRe: Implementing drag and drop funcionality Pin
Douglas Troy3-Apr-07 7:22
Douglas Troy3-Apr-07 7:22 
GeneralRe: Implementing drag and drop funcionality Pin
sinosoidal3-Apr-07 23:41
sinosoidal3-Apr-07 23:41 
Questionhow to convert unicode to int in C#? Pin
OmarLodhi3-Apr-07 6:55
OmarLodhi3-Apr-07 6:55 
AnswerRe: how to convert unicode to int in C#? Pin
Vikram A Punathambekar3-Apr-07 7:07
Vikram A Punathambekar3-Apr-07 7:07 
AnswerRe: how to convert unicode to int in C#? Pin
Wayne Phipps3-Apr-07 9:32
Wayne Phipps3-Apr-07 9:32 
GeneralRe: how to convert unicode to int in C#? Pin
OmarLodhi3-Apr-07 15:34
OmarLodhi3-Apr-07 15:34 
GeneralRe: how to convert unicode to int in C#? Pin
Vikram A Punathambekar3-Apr-07 18:23
Vikram A Punathambekar3-Apr-07 18:23 
GeneralRe: how to convert unicode to int in C#? Pin
OmarLodhi3-Apr-07 21:26
OmarLodhi3-Apr-07 21:26 
Questionhow to use webbrowserControl Pin
pashitech3-Apr-07 6:22
pashitech3-Apr-07 6:22 
AnswerRe: how to use webbrowserControl Pin
Douglas Troy3-Apr-07 6:30
Douglas Troy3-Apr-07 6:30 
QuestionJust problems... Pin
lost in transition 3-Apr-07 5:39
lost in transition 3-Apr-07 5:39 
AnswerRe: Just problems... Pin
Vikram A Punathambekar3-Apr-07 7:09
Vikram A Punathambekar3-Apr-07 7:09 
GeneralRe: Just problems... Pin
lost in transition 3-Apr-07 8:01
lost in transition 3-Apr-07 8:01 
QuestionXml Confusion Pin
Mark F.3-Apr-07 5:24
Mark F.3-Apr-07 5:24 
AnswerRe: Xml Confusion Pin
kubben3-Apr-07 6:03
kubben3-Apr-07 6:03 
QuestionHelp with automated html to image capture Pin
justlee73-Apr-07 5:10
justlee73-Apr-07 5:10 
AnswerRe: Help with automated html to image capture Pin
Douglas Troy3-Apr-07 5:45
Douglas Troy3-Apr-07 5:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.