Click here to Skip to main content
14,364,399 members
   

C#

 
Question[Solved] Safe way to insert USB-drive. Pin
Acuena1-Nov-19 6:48
memberAcuena1-Nov-19 6:48 
AnswerRe: Safe way to insert USB-drive. Pin
Richard Deeming1-Nov-19 7:27
mveRichard Deeming1-Nov-19 7:27 
GeneralRe: Safe way to insert USB-drive. Pin
Acuena1-Nov-19 13:38
memberAcuena1-Nov-19 13:38 
AnswerRe: Safe way to insert USB-drive. Pin
OriginalGriff1-Nov-19 7:43
protectorOriginalGriff1-Nov-19 7:43 
GeneralRe: Safe way to insert USB-drive. Pin
Acuena1-Nov-19 13:38
memberAcuena1-Nov-19 13:38 
GeneralRe: Safe way to insert USB-drive. Pin
OriginalGriff1-Nov-19 13:44
protectorOriginalGriff1-Nov-19 13:44 
QuestionUse From that's in a class library, from other programs Pin
Lupu5R3x1-Nov-19 2:46
memberLupu5R3x1-Nov-19 2:46 
AnswerRe: Use From that's in a class library, from other programs Pin
Afzaal Ahmad Zeeshan1-Nov-19 3:09
mveAfzaal Ahmad Zeeshan1-Nov-19 3: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 4:52
memberLupu5R3x1-Nov-19 4:52 
QuestionDatagrid Cell content to only visible rows Pin
Member 135108471-Nov-19 1:01
memberMember 135108471-Nov-19 1:01 
AnswerRe: Datagrid Cell content to only visible rows Pin
Richard Deeming1-Nov-19 2:33
mveRichard Deeming1-Nov-19 2:33 
GeneralRe: Datagrid Cell content to only visible rows Pin
Member 135108471-Nov-19 19:47
memberMember 135108471-Nov-19 19:47 
GeneralRe: Datagrid Cell content to only visible rows Pin
Richard Deeming3-Nov-19 23:12
mveRichard Deeming3-Nov-19 23:12 
AnswerRe: Datagrid Cell content to only visible rows Pin
Dave Kreskowiak1-Nov-19 2:50
mveDave Kreskowiak1-Nov-19 2:50 
GeneralRe: Datagrid Cell content to only visible rows Pin
Member 135108471-Nov-19 19:50
memberMember 135108471-Nov-19 19:50 
GeneralRe: Datagrid Cell content to only visible rows Pin
Member 135108472-Nov-19 0:11
memberMember 135108472-Nov-19 0:11 
GeneralRe: Datagrid Cell content to only visible rows Pin
Dave Kreskowiak2-Nov-19 4:38
mveDave Kreskowiak2-Nov-19 4:38 
QuestionC# Sql calling function - SELECT from two diffrent Sql folders Pin
Member 1464122431-Oct-19 22:22
memberMember 1464122431-Oct-19 22:22 
AnswerRe: C# Sql calling function - SELECT from two diffrent Sql folders Pin
OriginalGriff31-Oct-19 23:35
protectorOriginalGriff31-Oct-19 23:35 
GeneralRe: C# Sql calling function - SELECT from two diffrent Sql folders Pin
Member 1464122431-Oct-19 23:51
memberMember 1464122431-Oct-19 23:51 
GeneralRe: C# Sql calling function - SELECT from two diffrent Sql folders Pin
OriginalGriff1-Nov-19 0:09
protectorOriginalGriff1-Nov-19 0:09 
GeneralRe: C# Sql calling function - SELECT from two diffrent Sql folders Pin
Member 146412241-Nov-19 0:14
memberMember 146412241-Nov-19 0:14 
GeneralRe: C# Sql calling function - SELECT from two diffrent Sql folders Pin
OriginalGriff1-Nov-19 0:26
protectorOriginalGriff1-Nov-19 0:26 
GeneralRe: C# Sql calling function - SELECT from two diffrent Sql folders Pin
Member 146412241-Nov-19 1:11
memberMember 146412241-Nov-19 1:11 
QuestionALPHA CHANNEL Pin
Member 1463438031-Oct-19 3:05
memberMember 1463438031-Oct-19 3:05 

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.