|
I use axShockwaveFlash COM in the my frmSplash windows form for play flash file. I want to ShowDialog frmSplash in my main form. Its properly work. But I use thread I get error, Cannot create axShockwaveFlash component instance.
In my main form contain following code;
private void button1_Click(object sender, EventArgs e)
{
Control.CheckForIllegalCrossThreadCalls = false;
Thread thread = new Thread(DoSplash);
thread.IsBackground = true;
thread.Start();
}
private void DoSplash()
{
frmSplash sp = new frmSplash();
sp.Show();
}
My frmSplash form just contain axShockwaveFlash component. I dont write any code in this form.
How can I solve my problem, thanks...
|
|
|
|
|
Hi,
I have no experience with flash controls, however Control.CheckForIllegalCrossThreadCalls = false; is a mistake. You may want to read this[^] and reorganize your code.
I trust Google could point you to some articles that do it successfully, maybe even at CodeProject!
|
|
|
|
|
On top of what Luc said, you cannot create forms on background threads and expect them to work. They must be created on the UI thread (startup thread) and well as any controls on those forms. Creating UI components on background threads is unreliable and cannot be trusted to work 100% the time.
|
|
|
|
|
Does anyone know of a CAD library for C# / .NET?
Failing that, is there a basic interface library that handles multiple pages in a similar way to Word?
TIA!
I hope you realise that hamsters are very creative when it comes to revenge. - Elaine
|
|
|
|
|
|
Which software I use for running C# program...
I m starter...
My question is when I was learning C I use turbo C
now for C# ....
Microsoft C# 2008 expressions
|
|
|
|
|
for C#, VB.NET, managed C++(Old Name C++/CLI), ASP.NET uses .NET Franework.
code_breaker wrote: My question is when I was learning C I use turbo C
So let me get it: You are asking witch IDE (Integrated Development Enviroment) do you need to start programming?
SharpDevelop is open Source
|
|
|
|
|
Please ask a question, also the hiaku form, whilst poetic, isn't easy to read.
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
code_breaker wrote: Microsoft C# 2008 expressions
?? MS Visual Studio C# Express Edition 2008
|
|
|
|
|
Microsoft C# Express Edition is free, and you can sell software you create with it.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
for beginning how to develop applications using c#,u should first of all install visual studio as your development environment.then i suggest u to watch c# tutorial videos and read articles(including this site) which can help u start building applications.visual studio express edition is free,although u can find the full version and download it through torrent files.good luck my friend.
don't forget to choose best answer!
|
|
|
|
|
Hello,
If any one can guide me plz.
Is it possible to obtain multimedia projector resolution using a c# code? if yes, then kindly tell me how to do it.
Thanks.
|
|
|
|
|
Hello,
I m a student of CS and i m doing a project on hand gesture recognition. I don't have much know how about Digital Image Processing.
I shall be very greatfull if someone can help me out. I want to first segment the hand and then follw its path and gestures but first thing is how can i identify the hand and then use it for future comparisons.
thanking you in anticipation 
|
|
|
|
|
Erm....
That sort of thing is difficult, very difficult, and highly specialised (ie it's the sort of thing that university research departments specialise in). Recognising a hand in a video/picture with any egree of reliability alone is fairly difficult.
I suggest you research this topic before posting here, as this forum tends to be more along the line of "I'm trying to acheive x, here is my code, why am I getting error y". Hopefully someone here will be able to point you to some research materials, however.
Good luck!
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
I have some strange problem here, so i was wondering if i could solve it in this way (i know it's not the best way to solve a problem, but i want a quick and dirty solution at the moment)
Let's say i have a button, with the focus on it. When i press the button a messagebox is shown. I only want the messagebox to be shown when i press the button with my mouse.
When i press enter i don't want the messagebox to be shown.
So i tried handling the keypress method and set the eventargs e.handled=true. But no effect, it doesn't even get inside the keypress method when pressing enter...
I know it's a strange question, but anyone have any ideas?
Thanks in advance.
|
|
|
|
|
wow this must be the dumbest question i've ever asked here...
I could just use the mouseclick event, problem solved 
|
|
|
|
|
Hello!
I am quite new to programming. I have no ideea how to cancel these 'automatic' key events that rise from hiting 'enter' or 'space' on a button but here is how i would do it:
Set button's 'TabStop' to false. Create an 'enter' event and put this inside the event:
SelectNextControl(yourbuttoncontrolhere, true, true, true, true);
This won't allow the user to focus the control in any way but it will allow him to click the button.
Hope this helps,
Good luck!
|
|
|
|
|
I dont understand why you fired button1_Click event....just fired button1_MouseClick event that's it..
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
my application is Port Listener(window service)
a lot of client will send data to this port in order to handle it i have used mutithreading.
After receiving data from port i have to save it in database now i m using
classical way to save in database
like open connection save data and then close connection and dispose connection.
as we know every time opening and closing connection take time .
Because within a second 30 or more than 30 client is sending data to this port to this port every time opening closing connection is not idea.
so please suggest how to use one connection for all request first time only it open connection and from next time my app use the open connection.
modified on Tuesday, December 22, 2009 8:05 AM
|
|
|
|
|
I don't understand your question if there is any question.
Shivendra Pandey wrote: It means only first time the database will open from next time it use the same open connection for every request.
As long Connection is opened it will be used for request. However you need to handle connection timeout (Disconnected by unkown reasons).
Shivendra Pandey wrote: one dedicated open connection for all request in this service
If you use app or service as "front end" (app that sits on server and it is betwen client and database) and connect to database service than that can be acheaved. That app needs to handle a multiple connection if you want to use multiple clients at the same time
|
|
|
|
|
So where is the problem? Its easy enough to do.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Probably you don't want that.
For example, if the connection is lost, what happens?
If two clients try to use the connection at the same time? One client starting a transaction will in fact be starting a transaction over the connection used by everyone (for example, in Sql Server if there is a transaction, you must use it).
And, finally, there is the connection pooling. By default, when you open and close a connection, the real connection keeps opened, but it is returned to the pool. Opening it again will only use the already opened connection. So, the best practice is to open the connection for each web-method and close it at the end. You can, of course, configure the maximum pool size to 1, so only one real connection will be kept open.
|
|
|
|
|
i think u should create and open the connection when your windows service starts,so during the process everywhere in your code u can use that open connection.
|
|
|
|
|
hi to all,
I am working in windows DatagridView,i assigning value through the Datasource, but in the grid also having the combo box where values are populated from the dataset. At the runtime, if i am click the grid, it throws the error like ='Datagridviewcomboboxcell value is not valid' .
Anyone can help me!!!
Regards
srikanth
|
|
|
|
|