|
|
1st screen: Login form
initially, i.e for the 1st time it sud take username n password as admin admin n log in.
2nd screen: configuration.
here i have a data grid which will display all the values entered from form 3( add new user screen). i have 4 buttons in this screen. 1.add new user, 2.delete user,3.modify user,4.ok. Data grid will have 2 columns(user name, access level)
*new user button click- form 3(add new user screen ) ll be displayed. here there ll be three text boxes. one for user name, one for password, one for access level.. the user ll unser these details n press ok button in form3. on ok button click, only the user name n access level sub be displayed in the data grid.. but user name, access level n password sud be parallely saved in an array or arraylist.. here the no of users sud be restricted..
*for deleting the user, any row in the datagrid sud be selected n delete button ll be clicked. this deleting the user sud delete the data from the arraylist also.
*to modify the user details, first some row in datagrid sud be selected n on modify user button click, new form, form 4(i.e modify user form ll be displayed). here there will be 5 textboxes. old user name, new user name, old password, new password, confirm password. the old user name sud take the value from the grid when the form4 is displayed. on enetering the other details, the user name in the datagrid, will be modified n displayed with the new user name enetered by the user. along with this, the arraylist also sud be updated..
Note: each time the the user name is enetered from for3 n form4, first it sud be checked in the arraylist for the duplicate.. then the data that is displayed in the datagrid sud be retained..i.e when the application is restarted, the values previously entered sud be displayed in the arraylist.
*on ok button click in form2(configuration form), the array list sud be saved in am xml file.. for 2nd time login, the xml sud be checked for the existance of the user name. if the user name is present in the xml, then the user sud be allowed to log in..
database,datasource sud not be used. pls anyone help me to solve this prob
|
|
|
|
|
Please don't cross post you have already posted this question there[^].
|
|
|
|
|
Hi All,
I have requirement by which,:
when i press Ctrl+C on an outlook item, it gets copied to clipboard. I have to use this clipboard content and get MSG file(which is now text-data to clipboard), to C# outlook item and use it (say eg: save on some location as file).
if (Clipboard.ContainsText(System.Windows.Forms.TextDataFormat.Text))
{
IDataObject myData = Clipboard.GetDataObject();
Outlook.MailItem olMsg = (Outlook.MailItem)myData.GetData(DataFormats.Text, true);
}
Above code does not work because outlook is showing copied message as Text and not FileDropList!
Thus above code fails. What is other way to do so or modifications in same.
Your help highly appreciated.
|
|
|
|
|
I am currently working on a project, which will dynamically load in a C++ library and instantiate one of the contained classes through the use of a common interface.
However, one of the methods that I am trying to expose in the C++ library takes the following set of arguments...
C++Library.MethodName(String^ stringVariable, unsigned char sProblemVariable[])
This is where the problem arises.
Now I know the C# equivalent of the unsigned char [] argument is a byte, so I am attempting to use this method in the following manner.
byte[] byteArr = new byte[127];
unsafe
{
fixed (byte *bytePointer = byteArr)
{
int returnValue = Interface.MethodName(aStringVariable, bytePointer);
}
}
So I am attempting to expose the C++Library.MethodName through the Interface, using the following method signature...
unsafe int MethodName(string stringVariable, byte *problemVariable);
When compiling the C++ Library, implementing the interface, it builds successfully so I assume that the C++ method signature satisfies the C# interface signature.
However, when I attempt to load the C++ Library, I get a Reflection Exception telling me there is no implementation for the MethodName method, in the Library.
Any help would be greatly appreciated!!
Thanks..
A girl in Engineering AND IT?!...what is this nonsense?
|
|
|
|
|
Is there a reason you can't refactor the C++ code to .Net/C#?
What is the exact exception message?
Can you show us the interface you're creating (just the method prototypes will be sufficient).
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
I was trying to use PInvoke, as it provides another level of abstraction in a system that really doesn't need any more.
A generated C# code block dynamically loads the C++ dll through an interface loaded dynamically...and so on..
Anyway, I have resolved the issue by wrapping the C++ methods which take the unsigned char argument in methods which can be easily exposed through the interface.
Thanks for your input.
A girl in Engineering AND IT?!...what is this nonsense?
|
|
|
|
|
Did you consider wrapping the code in managed C++? I've done that occasionally in the past and had a lot of success with it.
|
|
|
|
|
Is there a reason you can't pinvoke this method? If you intend to write to the unsigned char [], you can pass a StringBuilder in to the method and use the output from that.
|
|
|
|
|
|
I don't think that was needed. Given her activity on the site to date, I was pretty confident that she wouldn't notice that, and now you've put a spotlight on it.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Maybe the spotlight should not have been put on her to begin with.
A little more class and little less lecherism, please.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Hey, I agree.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
My original indent was to inform her.
If you have a look at timings, i informed her just after few posts and later non-sense chat started.
Had she seen my message here, when it was posted, non-sense would have been limited very much.
I had to delete message myself from being further down voted by people, who down vote a already down voted message without thinking about it.
|
|
|
|
|
I'd prefer to wrap it in another method that would then be exposed. That's how I do P/Invoke.
public byte[] Whatever ( ... )
{
/* Maybe convert the parameters as necessary */
return ( C++Library.MethodName ( ... ) ) ;
}
|
|
|
|
|
Errr, I think this is managed C++, isn't it? In this case you don't need pointers at all. Both libraries are running under the CLR, so you can pass the byte array. Have you considered AssemblyResolve[^] event?
|
|
|
|
|
Hi,
Any one guide me about the datagridview
Advance Thanks,
GJ.Balaji
|
|
|
|
|
See here[^].
You can search on the internet and you will find tons of more information.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
|
|
|
|
|
Be warned, you should not edit data in a list control. Pop a dialog with the record information and edit it there, then reload the table/record in the grid after the user has completed editing.
Inline editing generates more problems that it solves.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Agreed - plus it is a lot easier for the user to work out what goes where. 5!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
I got more than 168000 results when I used this keywords "update and delete data in DataGridview in C#" to search on Google. whatever I will suggest you to move there[^] and read the whole thread. and you can also navigate this link[^] to learn how to delete,Insert and Update data with datagridview.
|
|
|
|
|
That's not how this forum works. Somebody posts a vague question that requires some research. It's up to you to go off, read up on the subject, write a lengthy reply detailing exactly how to accomplish the task and the ins and outs of the topic. Expecting somebody to Google a topic first is just crazy talk.
|
|
|
|
|
thanks for your valuable advice.
|
|
|
|
|
I'm not altogether convinced that your irony got through there.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
I wouldn't let CG touch my Abacus!
|
|
|
|
|
Neither am I. I hope that he's being subtle and not taking it to heart.
|
|
|
|