Click here to Skip to main content
15,510,771 members
Home / Discussions / C#
   

C#

 
AnswerRe: I am using rdlc report and report viewer control.When i export the rdlc report to pdf the words written in hindi are not correctly displayed in the pdf. Pin
Richard Deeming17-Oct-22 0:24
mveRichard Deeming17-Oct-22 0:24 
QuestionPreventing an exception from happening when converting to bool Pin
Member 1552753010-Oct-22 4:40
Member 1552753010-Oct-22 4:40 
AnswerRe: Preventing an exception from happening when converting to bool Pin
dan!sh 10-Oct-22 4:51
professional dan!sh 10-Oct-22 4:51 
AnswerRe: Preventing an exception from happening when converting to bool Pin
Richard MacCutchan10-Oct-22 5:07
mveRichard MacCutchan10-Oct-22 5:07 
AnswerRe: Preventing an exception from happening when converting to bool Pin
Eddy Vluggen13-Oct-22 3:29
professionalEddy Vluggen13-Oct-22 3:29 
AnswerRe: Preventing an exception from happening when converting to bool Pin
Raphael Adeniji18-Oct-22 2:15
Raphael Adeniji18-Oct-22 2:15 
GeneralRe: Preventing an exception from happening when converting to bool Pin
Richard Andrew x6431-Oct-22 14:38
professionalRichard Andrew x6431-Oct-22 14:38 
QuestionDragging an item from listBox1 and droping the item into listBox2 code does not work(AllowDrop=true) Pin
Programmable Physics7-Oct-22 2:15
Programmable Physics7-Oct-22 2:15 
Although both of the listBoxes **AllowDrop=true** listBox2 does not allow me to drop an item from listbox1 into listBox2.

VS 2022 does not give any error, warning or exception handling problem. The problem is that this code does not do what it supposed to do. It does not let me carry 1 item from listBox1 to listBox2.

C#:
namespace LISTBOX_fareileSURUKLEbirakDRAGDROP_Olaylari
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            
            listBox1.AllowDrop = true;
            listBox2.AllowDrop = true;

            int i;
            for(i = 0; i < 10; i++)
            {
                listBox1.Items.Add(i);
            }
        }

        private void listBox1_MouseDown(object sender, MouseEventArgs e)
        {
            if (listBox1.Items.Count == 0) return;

            string deger = listBox1.Items[listBox1.IndexFromPoint(e.X,e.Y)].ToString();

            if (DoDragDrop(deger, DragDropEffects.All) == DragDropEffects.All)
                listBox1.Items.RemoveAt(listBox1.IndexFromPoint(e.X, e.Y));
        }
        private void listBox2_DragOver(object sender,DragEventArgs e)
        {
            e.Effect= DragDropEffects.All;
        }
        private void listBox2_DragDrop(object sender, DragEventArgs e)
        {
            if (e.Data.GetDataPresent(DataFormats.StringFormat))
                listBox2.Items.Add(e.Data.GetData(DataFormats.StringFormat));
        }
    }
}

What do you think is the problem here?

modified 7-Oct-22 7:40am.

AnswerRe: Dragging an item from listBox1 and droping the item into listBox2 code does not work(AllowDrop=true) Pin
OriginalGriff7-Oct-22 2:49
mveOriginalGriff7-Oct-22 2:49 
QuestionBasic use of Linklabel tool in winforms gives Exception Handling Error Pin
Programmable Physics6-Oct-22 2:53
Programmable Physics6-Oct-22 2:53 
AnswerRe: Basic use of Linklabel tool in winforms gives Exception Handling Error Pin
CHill606-Oct-22 3:03
mveCHill606-Oct-22 3:03 
AnswerRe: Basic use of Linklabel tool in winforms gives Exception Handling Error Pin
Richard Deeming6-Oct-22 3:11
mveRichard Deeming6-Oct-22 3:11 
QuestionFree licensing solution Pin
Moses Man29-Sep-22 12:45
Moses Man29-Sep-22 12:45 
AnswerRe: Free licensing solution Pin
Gerry Schmitz1-Oct-22 10:01
mveGerry Schmitz1-Oct-22 10:01 
AnswerRe: Free licensing solution Pin
Dave Kreskowiak1-Oct-22 12:48
mveDave Kreskowiak1-Oct-22 12:48 
QuestionC# Service Locator Pin
Kevin Marois28-Sep-22 8:01
professionalKevin Marois28-Sep-22 8:01 
AnswerRe: C# Service Locator Pin
Gerry Schmitz29-Sep-22 8:54
mveGerry Schmitz29-Sep-22 8:54 
GeneralRe: C# Service Locator Pin
Kevin Marois29-Sep-22 12:45
professionalKevin Marois29-Sep-22 12:45 
GeneralRe: C# Service Locator Pin
Richard Deeming29-Sep-22 22:39
mveRichard Deeming29-Sep-22 22:39 
AnswerRe: C# Service Locator Pin
lmoelleb29-Sep-22 23:40
lmoelleb29-Sep-22 23:40 
AnswerRe: C# Service Locator Pin
jochance4-Nov-22 6:48
jochance4-Nov-22 6:48 
QuestionSkype Personal integration with C# Pin
Member 1462363928-Sep-22 5:36
Member 1462363928-Sep-22 5:36 
AnswerRe: Skype Personal integration with C# Pin
Gerry Schmitz28-Sep-22 6:26
mveGerry Schmitz28-Sep-22 6:26 
GeneralRe: Skype Personal integration with C# Pin
Member 1462363928-Sep-22 7:10
Member 1462363928-Sep-22 7:10 
GeneralRe: Skype Personal integration with C# Pin
Victor Nijegorodov28-Sep-22 21:14
Victor Nijegorodov28-Sep-22 21:14 

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.