Click here to Skip to main content
14,384,739 members
   

C#

 
AnswerRe: Argument 1: cannot convert from 'object' to 'string' Pin
Richard MacCutchan31-Oct-19 2:37
protectorRichard MacCutchan31-Oct-19 2:37 
GeneralRe: Argument 1: cannot convert from 'object' to 'string' Pin
Member 1463942031-Oct-19 2:57
memberMember 1463942031-Oct-19 2:57 
GeneralRe: Argument 1: cannot convert from 'object' to 'string' Pin
Dave Kreskowiak31-Oct-19 3:16
mveDave Kreskowiak31-Oct-19 3:16 
GeneralRe: Argument 1: cannot convert from 'object' to 'string' Pin
Richard Deeming31-Oct-19 3:45
mveRichard Deeming31-Oct-19 3:45 
QuestionCreate New Label when click button in window form, move it when click and move mouse, and save it again when close file exe Pin
Member 1045263729-Oct-19 22:10
memberMember 1045263729-Oct-19 22:10 
AnswerRe: Create New Label when click button in window form, move it when click and move mouse, and save it again when close file exe Pin
OriginalGriff29-Oct-19 22:44
protectorOriginalGriff29-Oct-19 22:44 
GeneralRe: Create New Label when click button in window form, move it when click and move mouse, and save it again when close file exe Pin
Member 1045263730-Oct-19 0:07
memberMember 1045263730-Oct-19 0:07 
GeneralRe: Create New Label when click button in window form, move it when click and move mouse, and save it again when close file exe Pin
OriginalGriff30-Oct-19 0:22
protectorOriginalGriff30-Oct-19 0:22 
Yes, but that code won't even compile, much less run.
And if it did run, it wouldn't do what you wanted.
What is e?
Why are you testing an Event? They aren't bools!

Stop guessing, and look at your course notes: you should have covered dynamic label creation, and if they haven'y then you need to learn what to do properly.

As a suggestion, create a new project with a form. In the designer, add a label, and add handlers for the MouseDown, MouseUp, and Move Events. Then fill in those event handlers so that you can move the label around on your form.

When that works, look at your form.desigtner.cs file (go to your form constructor code and right click the call to InitializeComponent , then select "Go To Definition" and it's take you to the right place in the right file).
Look at what it does to create the label - that's the code you need to start thinking about.

Give it a try - it's not really complicated, it just takes a little thinking about instead of guessing and hoping! Laugh | :laugh:
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!

QuestionHow to solve complex captcha in C# Pin
rflprado29-Oct-19 6:53
memberrflprado29-Oct-19 6:53 
AnswerRe: How to solve complex captcha in C# Pin
OriginalGriff29-Oct-19 6:55
protectorOriginalGriff29-Oct-19 6:55 
AnswerRe: How to solve complex captcha in C# Pin
OriginalGriff29-Oct-19 6:56
protectorOriginalGriff29-Oct-19 6:56 
Questionc sharp Pin
Member 1115563928-Oct-19 10:41
memberMember 1115563928-Oct-19 10:41 
AnswerRe: c sharp Pin
OriginalGriff28-Oct-19 11:37
protectorOriginalGriff28-Oct-19 11:37 
QuestionRe: c sharp Pin
ZurdoDev28-Oct-19 11:45
professionalZurdoDev28-Oct-19 11:45 
Questionarray manipulation Pin
Member 1463677628-Oct-19 0:54
memberMember 1463677628-Oct-19 0:54 
AnswerRe: array manipulation Pin
OriginalGriff28-Oct-19 1:32
protectorOriginalGriff28-Oct-19 1:32 
AnswerRe: array manipulation Pin
ZurdoDev28-Oct-19 11:46
professionalZurdoDev28-Oct-19 11:46 
GeneralRe: array manipulation Pin
Nathan Minier29-Oct-19 2:18
professionalNathan Minier29-Oct-19 2:18 
GeneralRe: array manipulation Pin
ZurdoDev29-Oct-19 2:22
professionalZurdoDev29-Oct-19 2:22 
GeneralRe: array manipulation Pin
Nathan Minier29-Oct-19 2:53
professionalNathan Minier29-Oct-19 2:53 
QuestionSend values from one form to another form Pin
Member 1115563927-Oct-19 11:41
memberMember 1115563927-Oct-19 11:41 
AnswerRe: Send values from one form to another form Pin
Luc Pattyn27-Oct-19 12:40
professionalLuc Pattyn27-Oct-19 12:40 
GeneralRe: Send values from one form to another form Pin
OriginalGriff27-Oct-19 13:08
protectorOriginalGriff27-Oct-19 13:08 
GeneralRe: Send values from one form to another form Pin
Luc Pattyn27-Oct-19 13:12
professionalLuc Pattyn27-Oct-19 13:12 
GeneralRe: Send values from one form to another form Pin
Member 1115563928-Oct-19 10:22
memberMember 1115563928-Oct-19 10:22 

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.