15,885,546 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Michiel du Toit (Top 13 by date)
Michiel du Toit
15-Feb-13 5:55am
View
Please improve your question. You are already getting all items with the maximum values with your plpo2 assignment, what exactly do you want to do in addition?
Michiel du Toit
12-Feb-13 3:32am
View
If you're using a COM port you just write ATH\r\n to the COM port using a Write command to hang up (the same way you would dial using ATD<number>\r\n.
For voice comms I'd recommend looking into TAPI.
Michiel du Toit
8-Feb-13 3:23am
View
Also, what font are you using on the label, does it support unicode?
Michiel du Toit
8-Feb-13 3:04am
View
You're going to have to provide more details about how you're making the calls to get more help. Are you dialing with a physical modem or using an internet service (and which)? Is the modem on the box running the code or on a different box and what make and model is it? Are you talking to the modem via a COM port or, via a USB interface or via a specialized modem driver?
Michiel du Toit
6-Feb-13 8:06am
View
You're going to have to provide more details on the error you're getting. Windows 7 has default settings in place that stops some standard IIS stuff from working by default - these settings just needed to be changed.
Some changes in your %windir%\Microsoft.NET\Framework\v____\config's files are required to allow application web.configs to enable HttpModules, etc - without knowing which your web app requires we can't point you in the right direction...
Michiel du Toit
6-Feb-13 7:48am
View
You can create a log table in your database and add code on every activity that you want to record.
If you just want to log changes in the data create yourself a proxy class for your database interaction and do the logging there ;)
Michiel du Toit
2-Jan-13 7:54am
View
Hi Dennis,
You can use Environment.UserName to see which user is currently logged on to Windows.
You can use the Form's Load event to execute code when the form opens up.
Loading the settings from the file will depend on the type of file - if it is a text file you can use something like:
var myfile = new StreamReader(new FileStream("file.txt", FileAccess.Read));
myfile.ReadLine();
More details are necessary if you want more help.
Michiel du Toit
1-Jan-13 14:55pm
View
There are no guarantees - they can be spoofed as well. Might be better to create a file on the drive to grant permission and then check its existence in the future.
If you need additional security you can include contents in the file and even encrypt it with a serial number / password.
Michiel du Toit
1-Jan-13 14:46pm
View
Hi Donald, I think you're actually looking for Delegate.BeginInvoke (which uses a threadpool thread). Control.BeginInvoke posts to the control's message and thus does not utilize a seperate thread.
A great article on the topic:
http://www.codeproject.com/Articles/10311/What-s-up-with-BeginInvoke
A thread that does the processing and then invokes the UI to update progress might be a more intuitive solution to your problem?
Regards
Michiel du Toit
23-Nov-12 21:38pm
View
Have you considered using a DataView and filtering the view on sTemp?
Michiel du Toit
19-Nov-12 10:36am
View
Something like this maybe?
var lst = new List<string>();
for (int i = 0; i < 5/*Number of columns*/; i++)
lst.Add(rd1["Param" + (i + 1).ToString()]);
Michiel du Toit
19-Nov-12 10:29am
View
var lst = new List<myclass>() will create a generic list that contains elements of type myclass.
Since lists do not have a fixed size there is no syntax such as new List<myclass>[10] - you can add items using lst.Add(instanceof_myclass) or lst.AddRange(arrayof_myclass).
Michiel du Toit
16-Nov-12 10:17am
View
What you're looking for is the CSharpCodeProvider to compile the code and then you can use AppDomains if you want to run it plug-in style. You have to implement the events using MarshalByRefObject to cross AppDomain boundaries and then use serializable EventArgs descendants as parameters or you won't be able to unload the domains later.
This is rather complicated to implement - unfortunately my existing code is application-specific, but here a few snippets that can help:
To compile the code (has to be a complete .cs file with usings and all) into a dll:
var cc = new CSharpCodeProvider(new Dictionary<string,>() { { "CompilerVersion", "v3.5" } });
var outputpath = BinaryFolder + TargetAssembly + ".dll";
CompilerParameters cp = new CompilerParameters()
{
OutputAssembly = outputpath,
WarningLevel = 3,
GenerateExecutable = false,
GenerateInMemory = false,
CompilerOptions = "/target:library /optimize"
};
cp.ReferencedAssemblies.Add(
"System.dll", "System.Data.dll", "System.Xml.dll", "mscorlib.dll",
"System.Windows.Forms.dll");
To execute the code from the dll that you have compiled:
var _domain = AppDomain.CreateDomain("Isolated:" + Guid.NewGuid());
var _value = (IExecute)_domain.CreateInstanceAndUnwrap(AssemblyName, "Full name of the class in the dll here", false, BindingFlags.CreateInstance | BindingFlags.Default, null, null, null, null, null);
//_value.Properties = assign them here;
_value.Execute();
Further, you have to create a class based on an interface and then use only the interface in the calling code (main app) and implement the class in the .cs file. If you use any virtual (override) methods you will not be able to unload the appdomain (plug-in) later.
Hope this gives you a point to begin...
Show More