|
muhammad junaid wrote:
Please help me step by step approach because this is my first ever project and If it is possible please provide me code which will guide up to the end. I have just One month left so it is kindly requested to help me as soon as you have this mail.
You're kidding right ?
Let me paraphrase
'I am a student who has to hand in a project. This is the first thing I've ever written, and I'd like to singlehandedly write something in a month that a team of qualified, experienced professionals would take much longer for. I recognise this is a challenge, so if you could provide me with the source code, it would really help.'
I think you have two options here
1. hack into Nortons servers and steal their code
2. use magic
I suggest rethinking your project, with a month to write it, you should choose something where you have some idea how to go about it when you start. Otherwise, it will be two weeks in before you realise you're incapable of doing it, and then you'll have no time to do something else.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I started laughing when reading this, I am a student, this is my final project... this is my first project ever!
|
|
|
|
|
Yeah, it's REALLY sad, but there's a lot of it going around.
Although, these are the people hoping to compete with me for jobs, so that I can live with.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
No, I think that what he was doing was looking for a rent-a-coder site. That is what I thought this was at first.
|
|
|
|
|
Yeah, he seems typical of what you get on rentacoder. I worked there briefly, the people who run it are lying scum, and the whole system is designed to rip off coders.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hehehe, writing antivirus software in one month. He would be the first to finish that. But I do have some ideas which might be doable in one month:
- Write a system that monitors temperature and air moisture and is accessable over the internet.
I did this with 7 other developers in one month. It involves both hardware design and software design. It is doable, but you got to have skilled people for this.
- Write a small game
This must be doable in one month. I did it as my first project in the uni.
With no team to work with.
- Write a simple FTP client
Done this in only one week. So you should be able to make it even better than my client was (Be adviced, I used java and supported ipv6, so there's some study involved here on that subject)
There are a dozen more projects you could make in one month. But antivirus is way above your level to do in one month.
|
|
|
|
|
Ok, now that I was convinced that datatables are the way to go, someone explain how they work. What are the three different parts, and why use them. If the explainations don't help, then I will post my code, and see what is wrong. Thanks for all help.
|
|
|
|
|
A DataSet is a collection of DataTables. A DataGrid has a datasource property, which can accept an array, or a DataTable ( amongst other things ). Once you set the datasource property, you call the DataBind() method on the grid, which will cause the control to attempt to render itself using the data source. Your aspx should define the grid such that it contains the columns you want it to, otherwise, I believe you automatically get a column per column in the data source.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
So am I only required to use the Data Table? Right now I am only using a Data Table, and it won't acctually place it on the page, how do I get it to do so?
|
|
|
|
|
ExpertComing wrote:
and it won't acctually place it on the page
How do you mean 'it' ? You need to create a datagrid, set it's datasource to be the datatable, and call DataBind() on the grid. Then you can format the grid and add your controls, etc, in the aspx.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Where is my problem Christian?
public void CreateTable (Object sender, EventArgs e)<br />
{<br />
string[] skills = new string[3];<br />
skills[0] = "attack";<br />
skills[1] = "strength";<br />
skills[2] = "defence";<br />
<br />
<br />
DataTable dtshowskills = new DataTable("USkills");<br />
<br />
DataColumn userSkill = new DataColumn("Skill");<br />
showskills.Columns.Add("userSkill");<br />
DataColumn userLevel = new DataColumn("Level");<br />
showskills.Columns.Add("userLevel");<br />
<br />
foreach (string skill in skills)<br />
{<br />
DataRow drskill = dtshowskills.NewRow();<br />
drskill["userSkill"] = skill;<br />
drskill["userLevel"] = 0;<br />
showskills.Rows.Add(drskill);<br />
}<br />
<br />
DataSet dsshowskills = new DataSet();<br />
dsshowskills.Tables.Add(showskills);<br />
dgSkills.DataBind(dsshowskills, "USkills");<br />
}<br />
<br />
|
|
|
|
|
First of all,
ExpertComing wrote:
DataSet dsshowskills = new DataSet();
dsshowskills.Tables.Add(showskills);
You don't need this. Why do you want to create a dataset ?
dgSkills.DataSource = showskills;
dgSkills.DataBind();
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Now I get this error:
System.NullReferenceException: Object reference not set to an instance of an object.
Does that mean I am creating a cell, and not using it?
I found a couple silly mistakes when I was reviewing my code. Fixed those, still no luck. I hate it when I don't understand something, I haven't done any ready on DataTables, so I feel helpless.
Thanks for all of your help man.
|
|
|
|
|
ExpertComing wrote:
System.NullReferenceException: Object reference not set to an instance of an object
You have to create the datagrid in the aspx, then in the codebehind, you create the variable, make it protected and make sure the name is the same. If you just put a datagrid in your codebehind, it will indeed be null.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
HI All,
I am trying to call a function from a dll. One of its parameters is a structure that I will need later to call another function from another dll but the problem is that I don't know its detailed structure to be able to marshall it in C#.
I am not interested in accessing the struc ture's attributes,it's a temporary step for me before calling the other function. However,it must be accuartely done in order to pass a correct argument to the other function.
Can I just marshal the unknow datatypes within the structure as it they were "void"?
Any ideas or suggestions? It's really has been puzzling me for a time now and I can't reach a solution
Thanks and Best Regards,
E.A.
|
|
|
|
|
IF the dll is a Microsoft one, then pinvoke.net[^] might help. Either way, it would give you examples showing how this is done.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks Christian
Unfortunately,it's not a MS one.It's an Intel one. I have already checked the pinvoke documentation and marsalling in msdn but it didn't provide me with examples in my case.
do you have any idea what can i do?
Thanks and Best Regards,
E.A.
|
|
|
|
|
If you know the total size of the structure and if the contents of the structure dont matter, then you can try allocating memory equal to the size of the structure and pass the pointer to the memory as a void parameter instead of marshalling it as a structure.
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For ActiveX & .Net - Windows Explorer Like Shell UI Controls
|
|
|
|
|
What if I have the following case :
struct x (whose structure is unknown)
x* a = function(string m);
int b= function2(a,....);
If I used your idea, will it work in that case?
Thanks for your help,I really appreciate it...
Best Regards,
E.A.
|
|
|
|
|
hi, I posted this somewhere before, but it is rather important that I get an answer. hope this doesn't violate any rules or anything on posting to repost it.
anyways:
yeah, I have a datagrid control on a form. How do I do a simple binarysearch on the table so I can select the row that results were found in. thanks. also, is there a way I can make rows invisible so they still exist, but aren't visible? thanks so much.
Stephen
also, in this datagrid, I'm displaying id3 information about mp3's using a library I found online. it works well, but when I display the information it outputs in the datagrid, I get many of these strange symbols that look like a square. I exporte dthe datagrid as an xml file and found the square to be represented by & # x 0 ; minus the spaces. I can also paste this sequence here without spaces and it will show the odd symbol:
-- modified at 22:24 Thursday 8th September, 2005
|
|
|
|
|
Pyro Joe wrote:
yeah, I have a datagrid control on a form. How do I do a simple binarysearch on the table so I can select the row that results were found in
You will need a custom search procedure that will loop through the items in the bindingmanager of the datagrid. Each index in the item list of the bindingmanager equals one row in the datagrid. You can select rows in the datagrid using the Select(rowIndex) method
Pyro Joe wrote:
also, is there a way I can make rows invisible so they still exist, but aren't visible? thanks so much.
Use the dataview component. It's perfectly suitable in the situation. It can hide rows using a rowfilter.
Pyro Joe wrote:
and found the square to be represented by & # x 0 ; minus the spaces. I can also paste this sequence here without spaces and it will show the odd symbol: �
There is something wrong with library you are using or there's something wrong with the interface communicating with the library. Have you asked the creator of the library if this is some kind of bug? Because I think the library is pumping out id3 data that isn't really part of the id3 data.
WM.
What about weapons of mass-construction?
|
|
|
|
|
hi i am tryin to sent the word hi using serial port to the other computer when i clicked on the hi button.
public void Write(byte[] WriteBytes) <br />
{<br />
<br />
if( hComm != INVALID_HANDLE_VALUE ) <br />
{<br />
OVERLAPPED ovlCommPort = new OVERLAPPED();
<br />
int BytesWritten = 0;
<br />
WriteFile(hComm,WriteBytes,WriteBytes.Length,ref BytesWritten,ref ovlCommPort);
<br />
}<br />
<br />
}
this is my write()
so at the hi button what parameter should i pass over.
Hope to get an example from u guys thanks alot
|
|
|
|
|
hi, I can't be much help, but just checking and sort of asking. isn't it dangerous and won't it short out a port to directly connect a serial port from computer to computer, pretty sure the signal has to be inverted or rerouted to the incoming ports, otherwise data will clash inside the wires right?
|
|
|
|
|
hmm dont really know much abt hardware..
i just connect a serial from com 1 to com 2 of the same computer. and use hyper terminal on com 2 to check the input
|
|
|
|
|
Yes, he needs a null modem cable, which is wired to deal with the problem you're describing.
Christian Graus - Microsoft MVP - C++
|
|
|
|