hello all
void __fastcall TadminForm::StudentInfoButtonClick(TObject *Sender)
well, can some body explains to me more about the parameter *Sender, and how could I use it?
Thanks
hello all
void __fastcall TadminForm::StudentInfoButtonClick(TObject *Sender)
well, can some body explains to me more about the parameter *Sender, and how could I use it?
Thanks
It's a pointer toa TObject. Now, I don't know this particular function, but I'd imagine a function call would look similar to:
Code:TadminForm myForm; TObject myObj; myForm.StudentInfoButtonClick(&myObj); // Note that you pass the address of an object to a pointer
Sent from my iPadŽ
well I will u the case that surrounds me:
I have mutiple forms:
one is the administrator form and the other is normal user and other forms,
There are some common forms between the administrator and the normal user, so when the user on that form clicks a button, I want to know from where it is coming, so that I can display either the admin form or the user form
Why don't you start by telling us what library this is from so people that reply don't have to guess. Personally, I think it looks like a class you created. It's definitely not standard.
If you want to check whether a user is administrator or just a regular user, you can either have them log in initially and flag their status or you'd have to get some sort of computer ID and compare that to an admin list. The first option would obviously make calls to forms much quicker.
Last edited by SlyMaelstrom; 05-02-2006 at 07:00 AM.
Sent from my iPadŽ
what do u mean by library ?
I working on Borland C++ enterprise 6, and as I have told u there are a lot of normal user forms .,..............
I'm going to flat out guess that you don't know what you're doing and suggest that you go back to the basics of C++.
If you don't know the difference between a library and a compiler/IDE, then you're really going to have a lot of trouble programming this.
Sent from my iPadŽ
I don't know the framework that you use
Looks like StudentInfoButtonClick() is a method of some kind of a window that gets called when a button is clicked. Sender is most propably a pointer to the actual button that was clicked.Code:void __fastcall TadminForm::StudentInfoButtonClick(TObject *Sender)
Suppose you could cast it to the actual type of button object, or use TObject's virtual methods to query its properties.
Kurt
thats right Zuk, that what I was searching for ...