|
console... okay... thanks for your time and effort...
|
|
|
|
|
thankyou Hessam Jalali...
|
|
|
|
|
you should ask your teacher if you have trouble with the homework
|
|
|
|
|
im studying online... sorry..
|
|
|
|
|
Hi,
I suggest you buy an introductory book on C# and work your way through it.
In my experience nothing can replace the first book on any language you want to learn.
Especially if it is the first programming language you are getting in touch with.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
I'm trying to venture into making a class, but I'm still a bit dopey in the regard and still don't have everything perfectly understood. Here's what I have.
public void write(IntPtr address, byte[] value, UIntPtr bytes)<br />
{<br />
IntPtr bytesWrote;<br />
Process[] processList = Process.GetProcessesByName(hProcess);<br />
WriteProcessMemory(processList[0].Handle, address, value, bytes, out bytesWrote);<br />
}
But, when I actually make use of it, I still have to cast my stuff and basically write it like this. Whys this?
write((IntPtr)0x10036FA, new byte[] { 0xC6, 0x00, 0x8A }, (UIntPtr)3);
but I was hoping for something to the effect of
write(0x10036FA, (is there a cleaner way to do this?)new byte[] { 0xC6, 0x00, 0x8A }, 3);
|
|
|
|
|
choadvach wrote: 0x10036FA
and
choadvach wrote: 3
are ints. Ints != IntPtr's.
As the error message you'll get states, "Cannot implicitly convert type 'int' to 'System.IntPtr'. An explicit conversion exists (are you missing a cast?)".
Generally something is not given an implicit coversion if it's deemed unsafe. Forcing the use of an explicit cast ensures you know that the cast is happening.
if you don't want to have to cast then pass in an IntPtr ... one of the constructors on IntPtr takes an Int
IntPtr ip = new IntPtr(3);
|
|
|
|
|
Thanks, this helped a bunch and worked perfectly!
|
|
|
|
|
Good Morning,
I developed a web base project with different languages in c#. I used "Resources" to save different language variable. I am just wondering that can I use same technique in a desktop base application. I need it because I am going to develop a desktop base software in Visual Studio 2005. This software is a multi language software. User should have facility to choose desire language then whole software should change to that selected language. Any Suggesstion or comments?
Regards,
Abubakar
|
|
|
|
|
As I know You can do that ,
in VS2005 you can even declare a variable with name in other languages like Farsi or Arabic not just the value! and it works fine.
<br />
<br />
<br />
internal static string متغیرسلام {<br />
get {<br />
return ResourceManager.GetString("متغیرسلام", resourceCulture);<br />
}<br />
<br />
<br />
<br />
private void button4_Click(object sender, EventArgs e)<br />
{<br />
MessageBox.Show(Properties.Resources.متغیرسلام );<br />
}<br />
<br />
just as a tip the persian phrase means "Greetings Good People at CodeProject"
good luck
|
|
|
|
|
WinForm supports resources (and the support is better integrated in VS than what you find for ASP.NET - basically it's good enough for hobby translated programs). If you translate professionelly do NOT use VS to manage the translations, let the professionel translation tools do what they do best.
As a basic rule, the user has already selected the language (the language of the Windows userinterface), so while it might appear a great idea to allow the user to select language, there really is no need. As it's not that easily done either, I would not bother if I was you.
|
|
|
|
|
Hi everybody,
I was trying to load a dataset from the web service into the windows application.
It is giving the error like "The requested format is XML but it is in HTML format".
While debugging in from the dataset there are table and rows and then the Remote Format Property is also set to XML but i couldn't trace out the error.
Can you please give a solution to resolve the issue.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Hi,
I am new to .NET and not sure if this will be of use. Have you read the XMLSchema prior to reading the file?
// read the XML schema first to make sure we know how to generate the resulting DataTable
myDataTable.ReadXmlSchema(myFile + "\\myXMLSchema.xml");
// fill the DataTable with the actual values that exist in the XML file.
myDataTable.ReadXml(myFile + "\\myXML.xml");
// bind the resulting DataTable to the DataGridView
xmlResultsDataGridView.DataSource = myDataTable;
Download the Microsoft Samples (CS101SamplesAll) to reference reading and writing XML data.
Regards
dotman1
|
|
|
|
|
Hi,
What ur trying with the dataset. If u want to get the table, use datasetname.tables[tableindex].if u want to get a particular row use datasetname.tables[tableindex].rows[rowindex].
if u want to get a particulat fiels vales use datasetname.tables[tableindex].itemarray[colunmindex].
Kabeer V H
kabeervh@yahoo.com
im kabeer vh
|
|
|
|
|
hello every body,
I am developing a application where payslip has to be generated at the end of the month and it should be farwarded to every employee mail Id,
Where the mail should send only ASP form cantaining the data in it?
|
|
|
|
|
Hi
U can use the CDO object for sending mail..
Regards
Kabeer V H
kabeervh@yahoo.com.
im kabeer vh
|
|
|
|
|
Hi all,
I want to declare a global connection variable which can be accessed in any project of a project which has multiple projects.
|
|
|
|
|
you can define a member ,Property and Method as public static in one project and then reference it to all other however it going to work only when you have just one executable application (Except your Global Lib it can be exe too) and several other class libraries which all reference to one exe.
but the right way is to use IPC I think, if you have several executable applications in your project which working together. and there are good articles about IPC in codeproject.
hope this would help.
|
|
|
|
|
Shared configuration file?
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
I want to know the name of the method which resulted in invoking onLoad of the masterpage.
In every event of the page which is derived from the Master page, onload method of the masterpage will be invoked. I want to get the MethodName in the master page. Can any one help me in this regard..
VijayKrishna
|
|
|
|
|
#region GetCallingStackFrame
[MethodImpl(MethodImplOptions.NoInlining)]
public static StackFrame GetCallingStackFrame()
{
return new StackFrame(2, true);
}
#endregion
this method will return the calling method of the calling method hehe
To put that a bit more clearly:
MethodA calls MethodB.
MethodB calls GetCallingStackFrame.
GetCallingStackFrame returns the stack frame for MethodA calling MethodB.
this code will return the MethodBase for the stack frame and so get the info about the method.
StackFrame callingStackFrame = GetCallingStackFrame();
MethodBase callingMethodBase = callingStackFrame.GetMethod();
|
|
|
|
|
Hello All,
I'm looking for the opensouce library for coloring the HTML and Javascript. It would be great if this library is written in C#. I would like to use it for one of my opensource C#.
Thanks in advance.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Start writing it yourself and maybe include it here as an article. I am sure others would find it interesting
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Okay. Yeah. I should try... Thanks for your suggestion...
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi all,
I am a novice to the Exchange Server 2003. I am trying to create a meeting request using CDO, MAPI and ADODB using C#. My exchange server is 192.168.78.57. I have created two Active Directory Users viz. abc@testingserver.com and xyz@testingserver.com.
If I try to log into the Exchange Server using abc@testing server.com, I get an error stating that "You do not have permission to log on. [Microsoft Exchange Server Information Store - [MAPI_E_FAILONEPROVIDER(8004011D)]]" when the statement "mapiSession.Logon(....)" is executed.
To overcome this error, I used administrator@testingserver.com. After using this id for login purpose, I was able to get rid of the above error, but at the time of sending the appointment using "appointmentItem.Send(false, false, 0);" I am getting an another error "[Collaboration Data Objects - [MAPI_E_NO_SUPPORT(80040102)]]"
Please find herewith my code below
Is that I am missing something in this code??
Please Help me somebody as this is a bit urgent.
Kind Regards
Pratik
public void CreateNewMeetingRequest()
{
try
{
string exchangeServer = "192.168.78.57";
string currentUserMailBoxName = "abc@testingserver.com";
object profileInfo = (object)exchangeServer + "\n" + currentUserMailBoxName;
_Session mapiSession = new SessionClass();
object emptyObject = Missing.Value;
mapiSession.Logon(emptyObject, emptyObject, false, false, emptyObject, emptyObject, profileInfo);
MAPI.Folder folder = (MAPI.Folder) mapiSession.GetDefaultFolder(CdoDefaultFolderTypes.CdoDefaultFolderCalendar);
MAPI.Messages folderMessages = (Messages)folder.Messages;
MAPI.AppointmentItem appointmentItem = (MAPI.AppointmentItem) folderMessages.Add(emptyObject, emptyObject, emptyObject, emptyObject);
Recipients appointmentRecipient = (Recipients)appointmentItem.Recipients;
appointmentRecipient.AddMultiple("xyz@testingserver.com", CdoRecipientType.CdoTo);
appointmentRecipient.Resolve(false);
appointmentItem.ConversationIndex = mapiSession.CreateConversationIndex(Missing.Value);
appointmentItem.ConversationTopic = String.Empty;
appointmentItem.EndTime = DateTime.Today.AddHours(5.0);
appointmentItem.Location = "XYZ";
appointmentItem.Subject = "Subject - Test Appointment";
appointmentItem.Text = "Text - Test Appointment";
appointmentItem.StartTime = DateTime.Today;
appointmentItem.Sender = (MAPI.AddressEntry)mapiSession.CurrentUser;
appointmentItem.Send(false, false, 0);
mapiSession.Logoff();
folder = null;
folderMessages = null;
appointmentItem = null;
appointmentRecipient = null;
mapiSession = null;
}
catch (Exception exception)
{
Console.Write(exception.Message);
}
}
Thanking you in Advance
Regards
Pratik Shah
|
|
|
|