Click here to Skip to main content
15,355,050 members

Comments by Mendor81 (Top 34 by date)

Mendor81 2-Jul-13 2:23am View
   
Hello Griff,

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.
Mendor81 12-Dec-12 5:48am View
   
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
Mendor81 12-Dec-12 4:58am View
   
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.
Mendor81 5-Dec-12 6:14am View
   
Have a look into multithreading and background workers combined with some progressbars should do the trick
Mendor81 4-Dec-12 11:14am View
   
Probably because the 80 is a default port try use another port.
Mendor81 4-Dec-12 6:04am View
   
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?
Mendor81 4-Dec-12 5:18am View
   
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?
Mendor81 4-Dec-12 4:47am View
   
?
Mendor81 3-Dec-12 10:49am View
   
I would have suggested that one next, should type faster next time ;P
Mendor81 3-Dec-12 10:46am View
   
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
Mendor81 3-Dec-12 9:17am View
   
?????? have you coded anything yet?
Mendor81 3-Dec-12 8:46am View
   
Thanks
Mendor81 3-Dec-12 6:50am View
   
So you want to add watermark to a file, on a server? on a local path? in a picturebox in winforms?
Mendor81 3-Dec-12 6:12am View
   
What exactly is the problem?
Mendor81 3-Dec-12 4:21am View
   
What is mtbduedate? a textbox or what kind of object?
Mendor81 30-Nov-12 7:04am View
   
http://www.codeproject.com/Questions/501502/Gridviewplusupdatingpluserror

Please don't double post the same question
Mendor81 30-Nov-12 6:44am View
   
So basicly the AA23 cell is empty?
and it worked with the AA22?

And what and where is oMissing declared/instantiated ?
Mendor81 28-Nov-12 10:03am View
   
Finally, after the 3rd rebuild of the project the warnings disappeared... weird but thanks!
Mendor81 28-Nov-12 9:48am View
   
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.
Mendor81 28-Nov-12 9:18am View
   
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?
Mendor81 28-Nov-12 4:16am View
   
What kind of question is this?
Mendor81 27-Nov-12 7:00am View
   
sign!
Mendor81 27-Nov-12 6:24am View
   
Have you tried giving another format than jpg on the save?
Mendor81 27-Nov-12 5:52am View
   
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.
Mendor81 26-Nov-12 11:22am View
   
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
Mendor81 26-Nov-12 11:17am View
   
Could be a dump question, but have you checked the path when scheduling the save?
Mendor81 26-Nov-12 11:08am View
   
Have you tried a step by step debug? at which line does it throw the exception?
Mendor81 26-Oct-12 5:04am View
   
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.

thx
Mendor81 20-Jun-12 9:59am View
   
That is also a loop as far as i know :P
Mendor81 20-Jun-12 9:43am View
   
and why wouldn't you use a anykind of loop?
Mendor81 23-Dec-11 2:46am View
   
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.

Mendor81 22-Dec-11 6:40am View
   
My fault, that is a user created class

here is the code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.ComponentModel;
using System.Runtime.InteropServices;

public class DnsMx
{
public 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;
MXRecord recMx;
if (Environment.OSVersion.Platform != PlatformID.Win32NT)
{
throw new NotSupportedException();
}
ArrayList list1 = new ArrayList();
try
{

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");
}
else
{
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);
list1.Add(text1);
}
}
}
finally
{
DnsMx.DnsRecordListFree(ptr1, 0);
}
return (string[])list1.ToArray(typeof(string));
}

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
}

[StructLayout(LayoutKind.Sequential)]
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;
}
}
Mendor81 22-Dec-11 6:33am View
   
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
Mendor81 6-Oct-11 2:38am View
   
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.