Click here to Skip to main content
16,003,611 members
Home / Discussions / C#
   

C#

 
GeneralRe: System.* not defined or imported Pin
Richard MacCutchan15-Aug-24 22:13
mveRichard MacCutchan15-Aug-24 22:13 
AnswerRe: System.* not defined or imported Pin
OriginalGriff15-Aug-24 19:17
mveOriginalGriff15-Aug-24 19:17 
QuestionCombobox item selection Pin
Member 95057569-Aug-24 22:46
Member 95057569-Aug-24 22:46 
AnswerRe: Combobox item selection Pin
OriginalGriff10-Aug-24 2:30
mveOriginalGriff10-Aug-24 2:30 
QuestionPrintQueueWatch Pin
Jorge Carlos Iglesias Alvarez2-Aug-24 6:44
Jorge Carlos Iglesias Alvarez2-Aug-24 6:44 
AnswerRe: PrintQueueWatch Pin
Richard Andrew x642-Aug-24 7:28
professionalRichard Andrew x642-Aug-24 7:28 
AnswerRe: PrintQueueWatch Pin
OriginalGriff2-Aug-24 19:49
mveOriginalGriff2-Aug-24 19:49 
Questionnetwork change event/Compare Pin
geomeo1232-Aug-24 4:47
geomeo1232-Aug-24 4:47 
I'm trying to detect when an ethernet cable is unplugged from a computer or plugged back in. I have some devices that when plugged in they come up as Unidentified Network(which is normal for the specific device). I'm not looking for internet connection or have anything to do with that. And I think this code works as a trigger:
C#
 NetworkChange.NetworkAddressChanged += new NetworkAddressChangedEventHandler(NetworkChange_NetworkAddressChanged);
private static void NetworkChange_NetworkAddressChanged(object sender, EventArgs e)
{
    
    NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces();
    foreach (NetworkInterface n in adapters)
    {
       

        
       MessageBox.Show(n.Name.ToString() + n.OperationalStatus.ToString());
    }
}


What I need to do now is to figure out which network adapter was unplugged. I intend to get the operational status of each network adapter. Store it, ask user to power cycle the device and then compare with the stored value(s) to figure out which one has changed from up to down. I'm not sure what the best method to do this would be. Should I do this as an array, list or is there an easier way?
AnswerRe: network change event/Compare Pin
RedDk2-Aug-24 8:58
RedDk2-Aug-24 8:58 
QuestionDataGrid - Change column Headers height and row vertical alignment text. Pin
Member 1340835626-Jul-24 7:50
Member 1340835626-Jul-24 7:50 
AnswerRe: DataGrid - Change column Headers height and row vertical alignment text. Pin
Dave Kreskowiak26-Jul-24 13:20
mveDave Kreskowiak26-Jul-24 13:20 
QuestionSqlDataReader with multiple result sets Pin
Richard Andrew x6426-Jul-24 5:07
professionalRichard Andrew x6426-Jul-24 5:07 
AnswerRe: SqlDataReader with multiple result sets Pin
Pete O'Hanlon26-Jul-24 5:32
mvePete O'Hanlon26-Jul-24 5:32 
GeneralRe: SqlDataReader with multiple result sets Pin
Richard Andrew x6426-Jul-24 5:40
professionalRichard Andrew x6426-Jul-24 5:40 
AnswerRe: SqlDataReader with multiple result sets Pin
OriginalGriff26-Jul-24 6:08
mveOriginalGriff26-Jul-24 6:08 
GeneralRe: SqlDataReader with multiple result sets Pin
Richard Andrew x6426-Jul-24 6:39
professionalRichard Andrew x6426-Jul-24 6:39 
QuestionI want to get permission to interact with a file. Pin
Yohan Bischofberger25-Jul-24 9:15
Yohan Bischofberger25-Jul-24 9:15 
QuestionRe: I want to get permission to interact with a file. Pin
Richard MacCutchan25-Jul-24 10:24
mveRichard MacCutchan25-Jul-24 10:24 
QuestionC# Trying to Create Custom Spell Checking Feature but keep running into roadblocks. Argument 1: cannot convert from 'System.IO.MemoryStream' to 'string' Argument 2: cannot convert from 'System.Drawing.Imaging.ImageFormat' to 'Tesseract.ImageFormat?' Pin
Texas-Tundra24-Jul-24 6:46
Texas-Tundra24-Jul-24 6:46 
AnswerRe: C# Trying to Create Custom Spell Checking Feature but keep running into roadblocks. Argument 1: cannot convert from 'System.IO.MemoryStream' to 'string' Argument 2: cannot convert from 'System.Drawing.Imaging.ImageFormat' to 'Tesseract.ImageForma Pin
OriginalGriff24-Jul-24 18:58
mveOriginalGriff24-Jul-24 18:58 
GeneralRe: C# Trying to Create Custom Spell Checking Feature but keep running into roadblocks. Argument 1: cannot convert from 'System.IO.MemoryStream' to 'string' Argument 2: cannot convert from 'System.Drawing.Imaging.ImageFormat' to 'Tesseract.ImageForma Pin
Texas-Tundra25-Jul-24 2:08
Texas-Tundra25-Jul-24 2:08 
GeneralRe: C# Trying to Create Custom Spell Checking Feature but keep running into roadblocks. Argument 1: cannot convert from 'System.IO.MemoryStream' to 'string' Argument 2: cannot convert from 'System.Drawing.Imaging.ImageFormat' to 'Tesseract.ImageForma Pin
OriginalGriff25-Jul-24 2:39
mveOriginalGriff25-Jul-24 2:39 
GeneralRe: C# Trying to Create Custom Spell Checking Feature but keep running into roadblocks. Argument 1: cannot convert from 'System.IO.MemoryStream' to 'string' Argument 2: cannot convert from 'System.Drawing.Imaging.ImageFormat' to 'Tesseract.ImageForma Pin
Texas-Tundra25-Jul-24 2:45
Texas-Tundra25-Jul-24 2:45 
GeneralRe: C# Trying to Create Custom Spell Checking Feature but keep ... Pin
OriginalGriff25-Jul-24 2:50
mveOriginalGriff25-Jul-24 2:50 
QuestionDPI issue when calling C# from C++ Pin
JudyL_MD23-Jul-24 11:05
JudyL_MD23-Jul-24 11: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.