|
can any body tell me how to add a form to a panel using C#.NET.
Thanks in advance.
Regards:
Biswajit
biswajit nayak
|
|
|
|
|
why would you want to do that?
panels go on forms, i dont think that forms can go in panels. if you want forms within forms you can google MDI windows
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Hi,
have a look at Form.TopLevel
|
|
|
|
|
|
you can add parameters in the forms constructor or/and add a 2nd constructor with the parameters
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Your Form should always have default constructor (with no params), else the VS designer will break.
|
|
|
|
|
Hi,
I've build an application but it isn't suppose to startup more than once.
How do I prevent my application to startup more than once??
Kevin
|
|
|
|
|
Possibly the easiest way is to use a mutex. I posted a WPF version here[^], but it's easy enough to apply this to a Forms app.
|
|
|
|
|
There are countless articles on CodeProject providing solutions to your problem.
|
|
|
|
|
Hi,
actually none of those "solutions" do what the OP asks. At best they make the second
instance die rapidly, but they don't prevent it from starting up.
|
|
|
|
|
From what I have seen, most are the same, and I use the same thing in my applications too:
1. Create Mutex.
2. Check Mutex, then use IPC (with Remoting) to talk and do what you need with either instance.
|
|
|
|
|
In my code I am going to hide my active form and show another form. In that case are there any way to check me that other(2nd) form is loaded or not, Something like to check null or not.
Because currently I am facing for a problem that is sometime my form going crashed and nothing display, at the same time my other form is already hide. Then my application is something like losen(hang). I j’t want a solution for that.
|
|
|
|
|
ASysSolvers wrote: sometime my form going crashed and nothing display,
your best fix is to fix the code in this form.
Also, a good solution is to have both forms as controls and show them on the one form.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
In the code in the first form that displays the second form, after declaring the second form's instance but before calling show() subscribe to the second form's Shown event. Then, in the handler, hide the first form.
Form2 f2 = new Form2();
f2.Shown += new EventHandler(f2_Shown);
f2.Show();
void f2_Shown(object sender, EventArgs e)
{
Hide();
}
Dave
|
|
|
|
|
does someone know this code??
Record 9 of 10
this ^ is output on a label..
counting all the record on the database then displaying it like that..
|
|
|
|
|
hello.... is not a valid subject, it doesn't help us to work out if we can help, which is the purpose of a subject.
How are you displaying these records, in a grid, or otherwise ? If you have a dataset, then you can get a total from the Count of the rows in it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
sorry about the subject name. the records are displayed on the textboxes..
i also have another table which is in datagridview.
|
|
|
|
|
If you're showing one at a time, then keep track of which one you;re showing, and get the number of total records from the datasource.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
thanks leppie my problem is like this i can get the total number of record from the database, but i want to keep track of the number of records the textbox / datagridview is displaying. so in the label RECORD 9 of 10 which 10 is the total record then 9 is the record on the textbox / datagridview if i move it forward the label must display RECORD 10 of 10.
sorry my english is bad so i cant explain it well..
im just new in c# and i have this project working on without me training in c#.
thanks..
|
|
|
|
|
Hi guys
I hoep someone can help me out here.
I have a C# app that runs on my development machine (WinXP with VS2005) and plays a flash (.swf) file.
On the target machine which is a vanilla Win2K machine, I have installed Flash v9.0.124.0 and registered the flash.ocx file. I can play the swf in IE, but my application does not play.
Have I missed something?
Any help will be appreciated
Thanks
Paresh
Paresh Solanki
"To the world, you may be just one person, but to one person, you may be the world"
|
|
|
|
|
Did you get an error message? Did you try debug it on the Win2k PC? Does the eventlog give you any hints?
|
|
|
|
|
nothing, just a blank page where the swf should be playing.
My test app has a web browser and the flash object on the form, both pointing to the same file.
it plays in the web browser part, but not in the flash object part.
Paresh Solanki
"To the world, you may be just one person, but to one person, you may be the world"
|
|
|
|
|
Sorry, cant help. Perhaps MSDN forums will provide an answer.
|
|
|
|
|
Found the problem
The flash installer creates puts some files in
system32\Macromed\Flash and one of these files is
NPSWF32_FlashUtil.exe , which should be run. This file then downloads some additional files into the
system32\Macromed\Flash directory and registers the correct version of
Flash.ocx
Why can't they put this all into the main installer?
This cockeyed install means I cannot install flash in unattended mode on my target machines, and they must be connected to the internet for flash to install!
Paresh Solanki
"To the world, you may be just one person, but to one person, you may be the world"
|
|
|
|