Click here to Skip to main content
15,898,766 members
Home / Discussions / C#
   

C#

 
AnswerRe: How should I handle versioning of my application that contains versioning information about products? Pin
phil.o7-Nov-19 4:02
professionalphil.o7-Nov-19 4:02 
AnswerRe: How should I handle versioning of my application that contains versioning information about products? Pin
OriginalGriff7-Nov-19 6:15
mveOriginalGriff7-Nov-19 6:15 
GeneralRe: How should I handle versioning of my application that contains versioning information about products? Pin
Richard Deeming7-Nov-19 7:41
mveRichard Deeming7-Nov-19 7:41 
QuestionHow can I block Cross-site Scripting (XSS) through interceptor in proxy tool in ASP.Net using c# code Pin
srinihan6-Nov-19 23:05
srinihan6-Nov-19 23:05 
AnswerRe: How can I block Cross-site Scripting (XSS) through interceptor in proxy tool in ASP.Net using c# code Pin
Pete O'Hanlon6-Nov-19 23:26
mvePete O'Hanlon6-Nov-19 23:26 
QuestionMessage Closed Pin
5-Nov-19 21:00
vasanthkumarmk5-Nov-19 21:00 
AnswerRe: How to Store XML File to Registry Pin
Richard MacCutchan5-Nov-19 22:08
mveRichard MacCutchan5-Nov-19 22:08 
QuestionHoe to send sms through mobile connection not any website registration in c# window application Pin
Member 146424693-Nov-19 8:31
Member 146424693-Nov-19 8:31 
AnswerRe: Hoe to send sms through mobile connection not any website registration in c# window application Pin
Richard MacCutchan3-Nov-19 23:38
mveRichard MacCutchan3-Nov-19 23:38 
GeneralRe: Hoe to send sms through mobile connection not any website registration in c# window application Pin
Member 1464246911-Nov-19 23:47
Member 1464246911-Nov-19 23:47 
QuestionMessage Removed Pin
3-Nov-19 2:33
Acuena3-Nov-19 2:33 
AnswerMessage Removed Pin
3-Nov-19 2:59
mveOriginalGriff3-Nov-19 2:59 
GeneralMessage Removed Pin
3-Nov-19 4:41
Acuena3-Nov-19 4:41 
GeneralMessage Removed Pin
3-Nov-19 4:44
mveOriginalGriff3-Nov-19 4:44 
GeneralMessage Removed Pin
3-Nov-19 5:13
Acuena3-Nov-19 5:13 
Question[Solved] Safe way to insert USB-drive. Pin
Acuena1-Nov-19 5:48
Acuena1-Nov-19 5:48 
AnswerRe: Safe way to insert USB-drive. Pin
Richard Deeming1-Nov-19 6:27
mveRichard Deeming1-Nov-19 6:27 
GeneralRe: Safe way to insert USB-drive. Pin
Acuena1-Nov-19 12:38
Acuena1-Nov-19 12:38 
AnswerRe: Safe way to insert USB-drive. Pin
OriginalGriff1-Nov-19 6:43
mveOriginalGriff1-Nov-19 6:43 
GeneralRe: Safe way to insert USB-drive. Pin
Acuena1-Nov-19 12:38
Acuena1-Nov-19 12:38 
GeneralRe: Safe way to insert USB-drive. Pin
OriginalGriff1-Nov-19 12:44
mveOriginalGriff1-Nov-19 12:44 
QuestionUse From that's in a class library, from other programs Pin
Lupu5R3x1-Nov-19 1:46
Lupu5R3x1-Nov-19 1:46 
AnswerRe: Use From that's in a class library, from other programs Pin
Afzaal Ahmad Zeeshan1-Nov-19 2:09
professionalAfzaal Ahmad Zeeshan1-Nov-19 2:09 
Quote:
The form is in a class library, course I want to use it in several programs.
Why not just keep the controls in the library and access the controls in the Windows Forms application? That would solve almost all of your problems.
Quote:
I want to use the library to handle the main programs license.
Library cannot do anything on its own. Yes, you can contain the code for the logic in the library, but it would be your own application that triggers the functions and calls them to process something. Using a library, you will still need to process the output of the functions and then either continue the program, or terminate the process—as per licensing and other requirements.

There are a couple of articles on software licensing on CodeProject (search in top right corner), in case you want to see how to apply these features in a software application.
Quote:
"pop" the form to allow the user to enter User Name and License.
Seems like a flow, why not execute the Windows Forms process itself, and "pop" it so user can input the details. This will be helpful, you can use Process class to start the process, and handle the output manually. If this program of yours is a Windows Forms app, then you can simply create the instance of the Form and show it.

Process Class (System.Diagnostics) | Microsoft Docs

To make things even interesting, you can add the Form elements to your console program, and show it dynamically on the runtime, see this thread for more, How to: Create a Windows Forms application from the command line | Microsoft Docs
Form Class (System.Windows.Forms) | Microsoft Docs
Quote:
When the user clicks the form button
This would be managed inside the Windows Forms app, and your program will not do anything in this aspect—it will keep listening to the updates from licensing library.

Event driven programming in C# will help you in this case, Events - C# Programming Guide | Microsoft Docs

Based on the response of the library using the event, you can handle how to proceed with the last logic you have.

Once again, this is just pseudo-code, since you shared the pseudo-attempt with us. Start with the points I shared and get back to us, we will have more support by then.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~

GeneralRe: Use From that's in a class library, from other programs Pin
Lupu5R3x1-Nov-19 3:52
Lupu5R3x1-Nov-19 3:52 
QuestionDatagrid Cell content to only visible rows Pin
Member 135108471-Nov-19 0:01
Member 135108471-Nov-19 0:01 

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.