Forgot your password?
Sign in with
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Python questions
View Java questions
All Message Boards...
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Design and Architecture
Internet of Things
C / C++ / MFC
ATL / WTL / STL
Objective-C and Swift
Hardware & Devices
Hosting and Servers
.NET (Core and Framework)
Site Bugs / Suggestions
Spam and Abuse Watch
The Insider Newsletter
The Daily Build Newsletter
Most Valuable Professionals
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
What is 'CodeProject'?
Ask a Question
Bugs and Suggestions
Article Help Forum
Comments by Mendor81 (Top 34 by date)
its not win7 that causes the problem, its works perfectly in 4 machines with win7 but not on the win 2008 server. it must be something within the code that i´m missing, because the first error.txt (the one in the commented line) is written perfectly it just freezes after that.
Have you tried to code something? If not, we're not here to do your homework. First try it yourself, and if you're having troubles come back with a piece of code and we help you
I don't get what your trying to do, i suppose that in the datatable you try to fill in a field with the current time.
What is this line? "DAL.Registration_Master.View(time)" ??
The error is pretty clear you can't cast datetime into a datatable object via string.
Have a look into multithreading and background workers combined with some progressbars should do the trick
Probably because the 80 is a default port try use another port.
So basically just have to call :
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
label1.Text = "Current date: " + System.DateTime.Now.ToLongDateString();
label2.Text ="Selected date: " + Calendar1.SelectedDate.ToLongDateString();
for each lable increment the next date?! shouldn't be that hard or?
I still don't get it exactly what you need. or your not explaining yourself very well in the context or i'm definitely getting old and stupid....i hope it's the first option, anyway
have tried to look at the properties of Calendar date object?
I would have suggested that one next, should type faster next time ;P
where does the image come from? if it's from a file then just reload it on the other form.
you could also save it to a temporary image file and reload it this way
?????? have you coded anything yet?
So you want to add watermark to a file, on a server? on a local path? in a picturebox in winforms?
What exactly is the problem?
What is mtbduedate? a textbox or what kind of object?
Please don't double post the same question
So basicly the AA23 cell is empty?
and it worked with the AA22?
And what and where is oMissing declared/instantiated ?
Finally, after the 3rd rebuild of the project the warnings disappeared... weird but thanks!
I needed the Interop dll for some functions related to an external exe i need to execute at one moment of time, and editing and scraping some html files. I just added the references of my system files, but the references are set to copy local = true,
if i switch that to false i get errors like:
Error 2 Assembly 'obj\Debug\Interop.Shell32.dll' must be strong signed in order to be marked as a prerequisite.
I've checked 3 times and every compile property is correctly set to Any CPU, and i'm not working on 64bit either. any other suggestions?
What kind of question is this?
Have you tried giving another format than jpg on the save?
If the images displays well in the picturebox, then the save is failing, that could have several reasons.
- Make sure the path is correct.
- Make sure the file your trying to save doesn't exist yet or save with overwrite privilege
- Make sure the application has writing access to the path you've selected.
Have you tried to close the Memorystream after saving, if you scheduling a save every 5 min for example and the MS is not closed and reopend again it won't save.. if that's not the case then sorry i'm out of ideas
Could be a dump question, but have you checked the path when scheduling the save?
Have you tried a step by step debug? at which line does it throw the exception?
Thanks i think i'll try the xml option, mapping the names in the excel saving them in xml and in the winform the user can map these columns later via combobox. since there is a number of minimum mandatory variables i'll just let the user choose which he wants to import later.
That is also a loop as far as i know :P
and why wouldn't you use a anykind of loop?
Hmm i use that code at daily bases with Outlook 2003
Normaly when you execute the code outlook by itsself pops up a windows asking to authorize a programm to access the inbox.
The only thing that changes is the name of my Inbox which is the actual name of the exchange login/account.
Outlook.Recipient oRecip = ns.CreateRecipient("Your Exchange account");
if that doesn't work im out of ideas.
My fault, that is a user created class
here is the code:
public class DnsMx
[DllImport("dnsapi", EntryPoint = "DnsQuery_W", CharSet = CharSet.Unicode, SetLastError = true, ExactSpelling = true)]
private static extern int DnsQuery([MarshalAs(UnmanagedType.VBByRefStr)]ref string pszName, QueryTypes wType, QueryOptions options, int aipServers, ref IntPtr ppQueryResults, int pReserved);
[DllImport("dnsapi", CharSet = CharSet.Auto, SetLastError = true)]
private static extern void DnsRecordListFree(IntPtr pRecordList, int FreeType);
public static string GetMXRecords(string domain)
IntPtr ptr1 = IntPtr.Zero;
IntPtr ptr2 = IntPtr.Zero;
if (Environment.OSVersion.Platform != PlatformID.Win32NT)
throw new NotSupportedException();
ArrayList list1 = new ArrayList();
int num1 = DnsMx.DnsQuery(ref domain, QueryTypes.DNS_TYPE_MX, QueryOptions.DNS_QUERY_BYPASS_CACHE, 0, ref ptr1, 0);
if (num1 != 0)
if (num1 == 9003)
list1.Add("Entrada DNS no Existe");
throw new Win32Exception(num1);
for (ptr2 = ptr1; !ptr2.Equals(IntPtr.Zero); ptr2 = recMx.pNext)
recMx = (MXRecord)Marshal.PtrToStructure(ptr2, typeof(MXRecord));
if (recMx.wType == 15)
string text1 = Marshal.PtrToStringAuto(recMx.pNameExchange);
private enum QueryOptions
DNS_QUERY_ACCEPT_TRUNCATED_RESPONSE = 1,
DNS_QUERY_BYPASS_CACHE = 8,
DNS_QUERY_DONT_RESET_TTL_VALUES = 0x100000,
DNS_QUERY_NO_HOSTS_FILE = 0x40,
DNS_QUERY_NO_LOCAL_NAME = 0x20,
DNS_QUERY_NO_NETBT = 0x80,
DNS_QUERY_NO_RECURSION = 4,
DNS_QUERY_NO_WIRE_QUERY = 0x10,
DNS_QUERY_RESERVED = -16777216,
DNS_QUERY_RETURN_MESSAGE = 0x200,
DNS_QUERY_STANDARD = 0,
DNS_QUERY_TREAT_AS_FQDN = 0x1000,
DNS_QUERY_USE_TCP_ONLY = 2,
DNS_QUERY_WIRE_ONLY = 0x100
private enum QueryTypes
DNS_TYPE_MX = 15
private struct MXRecord
public IntPtr pNext;
public string pName;
public short wType;
public short wDataLength;
public int flags;
public int dwTtl;
public int dwReserved;
public IntPtr pNameExchange;
public short wPreference;
public short Pad;
First question, Do you have outlook installed?
Second, i think that depending the Outlook version you might need to authorise access from external programms to the inbox.
Try using the programm with outlook running
Your are right, I checked both moments when i pass the HTML written in the RTB to the webbrowser (then its passed with the linebreaks and correct format, but after the webbrowser navigated and i return the documenttext to the RTB it comes back blobbed. so it seems the webbrowser is messing up the format...how is that possible? and more important how can i fix that if there is a way.
Last Updated 1 Jan 1900
All Rights Reserved.