Click here to Skip to main content
15,896,726 members
Home / Discussions / C#
   

C#

 
AnswerRe: Argument 1: cannot convert from 'object' to 'string' Pin
Richard MacCutchan31-Oct-19 1:37
mveRichard MacCutchan31-Oct-19 1:37 
GeneralRe: Argument 1: cannot convert from 'object' to 'string' Pin
User 1460643731-Oct-19 1:57
User 1460643731-Oct-19 1:57 
GeneralRe: Argument 1: cannot convert from 'object' to 'string' Pin
Dave Kreskowiak31-Oct-19 2:16
mveDave Kreskowiak31-Oct-19 2:16 
GeneralRe: Argument 1: cannot convert from 'object' to 'string' Pin
Richard Deeming31-Oct-19 2:45
mveRichard Deeming31-Oct-19 2: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 21:10
Member 1045263729-Oct-19 21: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 21:44
mveOriginalGriff29-Oct-19 21: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 1045263729-Oct-19 23:07
Member 1045263729-Oct-19 23: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
OriginalGriff29-Oct-19 23:22
mveOriginalGriff29-Oct-19 23: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 5:53
rflprado29-Oct-19 5:53 
AnswerRe: How to solve complex captcha in C# Pin
OriginalGriff29-Oct-19 5:55
mveOriginalGriff29-Oct-19 5:55 
AnswerRe: How to solve complex captcha in C# Pin
OriginalGriff29-Oct-19 5:56
mveOriginalGriff29-Oct-19 5:56 
Questionc sharp Pin
Member 1115563928-Oct-19 9:41
Member 1115563928-Oct-19 9:41 
AnswerRe: c sharp Pin
OriginalGriff28-Oct-19 10:37
mveOriginalGriff28-Oct-19 10:37 
QuestionRe: c sharp Pin
ZurdoDev28-Oct-19 10:45
professionalZurdoDev28-Oct-19 10:45 
Questionarray manipulation Pin
Member 1463677627-Oct-19 23:54
Member 1463677627-Oct-19 23:54 
AnswerRe: array manipulation Pin
OriginalGriff28-Oct-19 0:32
mveOriginalGriff28-Oct-19 0:32 
AnswerRe: array manipulation Pin
ZurdoDev28-Oct-19 10:46
professionalZurdoDev28-Oct-19 10:46 
GeneralRe: array manipulation Pin
Nathan Minier29-Oct-19 1:18
professionalNathan Minier29-Oct-19 1:18 
GeneralRe: array manipulation Pin
ZurdoDev29-Oct-19 1:22
professionalZurdoDev29-Oct-19 1:22 
GeneralRe: array manipulation Pin
Nathan Minier29-Oct-19 1:53
professionalNathan Minier29-Oct-19 1:53 
QuestionSend values from one form to another form Pin
Member 1115563927-Oct-19 10:41
Member 1115563927-Oct-19 10:41 
AnswerRe: Send values from one form to another form Pin
Luc Pattyn27-Oct-19 11:40
sitebuilderLuc Pattyn27-Oct-19 11:40 
GeneralRe: Send values from one form to another form Pin
OriginalGriff27-Oct-19 12:08
mveOriginalGriff27-Oct-19 12:08 
GeneralRe: Send values from one form to another form Pin
Luc Pattyn27-Oct-19 12:12
sitebuilderLuc Pattyn27-Oct-19 12:12 
GeneralRe: Send values from one form to another form Pin
Member 1115563928-Oct-19 9:22
Member 1115563928-Oct-19 9: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.