|
Hi, thanks for the response. Basically I have a base class Person and a child Class Athlete. In the main function I have created an instance like the Person[] athlete = new Athlete[3]; and populated it. Then I call the printData function. In console application there was no problem to see the output as follows:
for(int i = 0; i < athlete.Length ; i++)
{
athlete[i].printData();
}
How can I do the same but now to see the output in a label?
Thanks alot.
|
|
|
|
|
How can I keep a form deactivated and still accept text input? By setting the WS_EX_NOACTIVATE flag, I can put a form in background and receive mouse hit. But textbox can't accept any key.
Best Rgds.
Martin
|
|
|
|
|
No it can't. Deactivating the form prevents the input focus from being moved to it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Dave,
Thanks for the reply.
Probably I've used the wrong term. What I want to achieve is a form that is always below other normal window, even when it has the keyboard focus. I know this can be done because I've seen that in other apps. One popular example is setting Konfabulator widget window to "below".
Rgds.
marin
|
|
|
|
|
I've never used it, but I think I know what you're talking about. Hmmmm... This is going to be quite difficult because you talking about a normal app anymore. It could be that I'm just really tired, but I have no idea how you're going to get this to work, or what API's you're going to have to call to do this. I THINK this would be a Shell Extension, but I can't positively confirm it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm building something not entirely unlike the auto-resize C# Listbox [http://www.codeproject.com/cs/combobox/listbox.asp], and am trying to decide where to start. That project based their control on the Panel in order to get things like scrolling for free. The undesirable side-effect is that the derived control is a container, and is treated like such in the designer. For example, you can drop controls into their listbox and the designer will assume that the listbox (being derived from a panel) should act as a container.
So what's the workaround? Is it easier to (a) implement a scrollable view from scratch, or (b) modify a container control to no longer be treated as a container in the designer.
Any pointers on doing either would be appreciated. I have read, by the way, a bit about implementing a derived designer class, but the existing literature doesn't go into enough detail to explain anything about a control being a container or not.
|
|
|
|
|
Hi,
I am having Listview control which contains 15 rows. My problem is i want to make row 8 as read only. Is it possible in listview control.
thanks in advance
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
You can use BeforeLabelEdit event
private void ListView1_BeforeLabelEdit(object sender,
System.Windows.Forms.LabelEditEventArgs e)
{
if (e.Item == 7)
{
e.CancelEdit = true;
}
}
|
|
|
|
|
Hello all!
I am using a C# program and would like to create database (SQL Server 2000) from the source code. Can anyone provide some help.
Thanks All,
Tran Dung
|
|
|
|
|
The thing to type into google is ADO.NET, you'll find a ton of examples. If you mean you want to create a database from scratch, just write a script to create a database, and execute it in C#, using ADO.NET.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
tadung wrote: I am using a C# program and would like to create database (SQL Server 2000) from the source code.
You can execute any SQL Script through SqlCommand not just the regular SELECT, INSERT, UPDATE & DELETE.
Here is an example of Running SQL scripts with a .NET application[^]
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Hi all,
My program is just a small .EXE file since i'm not using any special dll's.
1. does the user must install FRAMEWORK on his computer even though i use
just a few dll's?
2. if i use FRAMEWORK 1.xx is it ok for him to install version 2.xx ?
3. is it posible to make an installation package that will contain the
FRAMEWORK package because i dont want to send the users to microsoft
website , its not nice.
Thanks alot,
Ran.
R.Z
|
|
|
|
|
1. Yes, they need the framework.
2. It depends. You should test on 2.0 and make sure that your app is written to not be strongly associated with an older version. You can make an app require a version, or it can find the closest version. Also, if you're distributing a framework anyhow, why not make it the one you're using ?
3. Yes, I think you can download merge modules for installers. I personally write an installer app in C++ that runs the framework install and runs my MSI as well. It's possible to install the framework silently, though.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
is it posible to install few versions on the same computer?
i mean , if i will give the user the old version and he allready have a newer version will it install and use the old version along the already-installed newer version?
Ran.
R.Z
|
|
|
|
|
Yes, no problem.
Different framework versions can co-exist on the same computer peacefully.
Regards,
mav
|
|
|
|
|
sorry again,
Is there a built-in tool as part of the VISUAL STUDIO that will allow me to include the Framework as part of my installation.
i dont think i can build up something of my own..
Thanks again,
Ran.
R.Z
|
|
|
|
|
How do i set the start position of the childform that i open from my main form?
I dont' want it to be in the center of the parent form or FormStartPosition.CenterParent.
i want it to be set at 218,28 of the parent form
|
|
|
|
|
You need to set it manually, which means you need to set it AFTER you show the form. Otherwise, the framework moves it on you. So, you need to get the position of the parent form top and left, and add 218,28 to it
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Right,got that, but how do i refrence that to the parent form?
would it help if i better explain?
i've got my parent form set to load at the same point based on where you closed it. the problem i'm having is trying to refrence the location of 218,28 of the parent form, since the form isn't allways going to be located at 0,0, it maybe located on screen two or three of a multi-screen system, and the user has to move across to system.drawing.point(218,28) just to reach the new form... not sure, maybe i'm just missing your point...no punn intended
pretty much i've tried everthing i can think of(yes, very limited) and the most i've found to even come close was this.PointToClient. this was nice, it moved the new form in relation to the parent form, but the problem is it often disappears based on the parent form...basically it didn't work correctly ever.
|
|
|
|
|
The parent form has a Left property and a Top property. At least, I think it does I'd take those, and add the values to that. And, if you set the owner of the child form to be the parent, the code can go in the child form, it can move itself when it is first shown, and check it's owners position as a starting point.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Actually, that was one of the things that i didn't think of at the time of writing that last post, i actually had just testing that before you replied... having some difficulty as i having to make sure everything is in its proper place...oh syntax.....
i'll post my results in a few...hopefully!
|
|
|
|
|
hey, yah, as simple as it was, that was the solution.... why is it easier to think of the hard(or complicated) solutions before thinking of the simple ones?
must just be me....
|
|
|
|
|
Hi all.
I would like to have few files in my code, like WAV file and ICO file and i
also want to use them in the program but i dont want to have them as an extra
files inside my directory (because then things can go wrong..)
how can "attach" them in DLL or in the EXE itself ?
thanks,
Ran.
R.Z
|
|
|
|
|
You'll have to embed these as resources.
You can find out more here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Wow
so quick.
i will check it out.
R.Z
|
|
|
|