|
Adding to what CG said, You have to create an event in the main form which will be shown to the user after splash screen. This event should fire when the form finished loading all it's content. Splash screen should hook this event and close itself when event fires.
|
|
|
|
|
|
Dear All,
I am going to make an OMR application using c#, and i would like to have my own convolution kernel,
please let me have reference of how to make your own convolution kernel like we have kernel for diferent filter.
Thanks
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
You mean, like those discussed in my image processing articles ? Did you search google or this site ?
http://www.google.com.au/search?sourceid=navclient&ie=UTF-8&rlz=1T4ADBS_enAU225AU226&q=C%23+image+convolution[^]
My article is the first hit. I recommend also reading the article I link to in my sig.
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 Alot I am going to watch it out...
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
I have done My Convolution Method, but i have a problem of how to make the kernel, as we have plus sign as a kernel image and how can i get the kernel for this plus sign. this is the exact problem i have
you are really appreciated...
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
Hi All
Actualy in my conf file given path like
C:\Program Files\Apex Data Loader 12.0\bin\process.bat"
i want this path as a relative path bz some system they install in d drive or e drive like that so i want to put relative path where that s/w installed.
thanx in advance..............
Mohan t working for Estuate
|
|
|
|
|
You can use Application.StartupPath or Path.GetDirectory(Application.ExecutablePath) to find out your starting path. Then you can use Path.Combine to append a filename
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 )
|
|
|
|
|
Thanx for ur reply..........What namespace i want add for that command( Path.GetDirectory(Application.ExecutablePath))
Mohan t working for N.I.C
|
|
|
|
|
System.IO.
VS2005 helps you, if you type in Path, then put the mouse near the h, there's an arrow, which offers to add te using statement or to scope the specific statement.
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 )
|
|
|
|
|
Hi All,
I am using SmartClient Factory Shell form with runtime Menu Editor...If i click once File menu editor's sub menu is New Contract Screen.and if i click a New contract screen..then open New Contract Screen in the Tab control... But only once..
But i want only once open in the Tab control..If click agin New contract Screen Sub menu..But sholud not come again...So please How to do..
Regards
Somasundaram G
I want to join in the website
|
|
|
|
|
hi everyone,
I get 'Microsoft.Jet.OLEDB.4.0' provider is not registered error when i try to connect to MsAccess database from C# app. How can i solve this error.
thanks in advance
|
|
|
|
|
Install Access, MDAC, or something else that gives you that provider.
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 i forgot to mention that i am using Vista x64 and i have Ms Office 2007 installed on my PC
|
|
|
|
|
Install It[^]
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
Hi Friends,
I have worked in Asp.net with Vb.net for 2 yrs. I have actainted with c,c++,java.Now i have shifted to another company.They are using C# completely.I have to learn C# as soon as possible.I have to learn C# in 7 days.My project is going to be started with in week. Even language is not barrier for any programmer.But it is need to learn the language for good work.Can u please proved some good links for learn c# as soon as possible.
and more thing is i have to learn design patterns.So can u please provide some links which are good one to learn quickly.
Thank you very much
Your help is appreciable
Regards
Kishore
|
|
|
|
|
kishorekumar.malla@live.com wrote: I have to learn C# in 7 days
Well, if you know VB, there's not much to learn. C# is strongly typed, apart from that, you should find it's often the same. I answer VB.NET questions all the time based on my C# knowledge, I never use VB.
kishorekumar.malla@live.com wrote: and more thing is i have to learn design patterns.
Well, this could be scary. You should buy the GoF book ( Design Patterns is it's name ), but I would be scared of a workplace that told you to 'learn design patterns in a week'. That's not really possible, and they can be over used and over rated.
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 )
|
|
|
|
|
kishorekumar.malla@live.com wrote: Can u please proved some good links for learn c# as soon as possible.
www.codeproject.com
|
|
|
|
|
kishorekumar.malla@live.com wrote: Can u please proved some good links for learn c# as soon as possible.
If you decide to go with a book, I would recommend "Accelerated C# 2008." If I only had a week to learn such a broad subject, I'd rather have a printed reference I can flip through and carry around with me 24/7 rather than trying to piece together enough half-way decent references online.
As for "Accelerated C#," the description from Amazon is spot on:
Who is this book for?
If you’re an experienced C# programmer, you need to understand how C# has changed with C# 2008. If youre an experienced object–oriented programmer moving to C#, you want to ramp up quickly in the language while learning the latest features and techniques.
ssclaire
|
|
|
|
|
Two things make this a huge headache to solve. One problem is that when I get the error, it doesn't tell me when it occurs all the time. The other, I can't debug without Visual Studio very well.
Now, the error I get is an Access_Violation. I only know what line of code this occurs at if I try to run in fullscreen.
Here is the relavent code:
private void CreateDevice(Control Target)<br />
{<br />
int iAdapter = Manager.Adapters.Default.Adapter;<br />
<br />
presentparameters = new PresentParameters();<br />
#if DEBUG<br />
presentparameters.Windowed = true;<br />
#else<br />
presentparameters.Windowed = false;<br />
presentparameters.BackBufferCount = 1;<br />
presentparameters.BackBufferWidth = 800;<br />
presentparameters.BackBufferHeight = 600;<br />
presentparameters.BackBufferFormat = Manager.Adapters.Default.CurrentDisplayMode.Format;<br />
Target.Cursor.Dispose();<br />
#endif<br />
presentparameters.SwapEffect = SwapEffect.Discard;<br />
presentparameters.PresentationInterval = PresentInterval.Immediate;<br />
<br />
CreateFlags flags;<br />
Caps caps = Manager.GetDeviceCaps(iAdapter, DeviceType.Hardware);<br />
if (caps.DeviceCaps.SupportsHardwareTransformAndLight)<br />
{<br />
flags = CreateFlags.HardwareVertexProcessing;<br />
}<br />
else<br />
{<br />
flags = CreateFlags.SoftwareVertexProcessing;<br />
}<br />
<br />
if (caps.DeviceCaps.SupportsPureDevice)<br />
{<br />
flags = flags | CreateFlags.PureDevice;<br />
}<br />
<br />
device = new Device(iAdapter, DeviceType.Hardware, Target, flags, presentparameters);<br />
<br />
device.DeviceResizing += new System.ComponentModel.CancelEventHandler(OnDeviceResizing);<br />
}
Thanks for any help, feel free to ask for more code if you need it.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Does it work it windowed mode?
Try changing the Target object type to a Form instead of a Control (not sure if this will make any difference).
Otherwise have a look at this article:
http://www.codeproject.com/KB/directx/InitialisingDirect3D.aspx
And see if that works. If it does then you can narrow down the problem.
|
|
|
|
|
Hello,
First of all, I do realise that the following description is incomplete and it is probably impossible to deduce the exact causes of the problem from it -- the code I'm working on is simply too long to post here in full. I would, however, be very grateful for any hints on how to debug it, or pointers to useful resources on the subject.
Here's what I'm struggling with:
I'm working on an RSS aggregator in C#. As the network functions are blocking, I use a separate thread for updating the feed subscriptions. The update function generates events which are then caught by each notification 'subsystem' (popup notifiers, tray icon and context menu for now). Realising that UI controls have to be updated from the thread they were created in, I added appropriate InvokeRequired clauses everywhere an event cause the UI to update -- as described in MSDN help. The manual suggests that this should solve the problem but despite that the program crashes frequently. I get the following exception:
<br />
Cross-thread operation not valid: Control '' accessed from a thread other than the thread it was created on.<br />
The error occurs when I click on the tray icon just after the feeds have been updated, presumably when the events are still propagating (new items are individually added to the context menu, in the tests I'm using there can be up to about 150 of them).
I also looked through a more extensive guide on the subject of threads in general 'Multi-threading in .NET: Introduction and suggestions' (http://www.yoda.arachsys.com/csharp/threads/) but nothing useful came up.
Here's an example of event handler (taken from the tray icon context menu class):
<br />
private delegate void subscriptions_FeedsUpdatedCallback(object sender, FeedsUpdatedArgs e);<br />
<br />
void subscriptions_FeedsUpdated(object sender, FeedsUpdatedArgs e)<br />
{<br />
if (this.InvokeRequired)<br />
{<br />
var d = new subscriptions_FeedsUpdatedCallback(subscriptions_FeedsUpdated);<br />
this.BeginInvoke(d, new object[] { sender, e });<br />
}<br />
else<br />
{<br />
HideInfoItem();
<br />
foreach (var menu in FeedMenus)
menu.Visible = true;<br />
<br />
foreach (Subscription feed in subscriptions.Channels)<br />
{<br />
ToolStripMenuItem menuItem = (ToolStripMenuItem)(this.Items.Find(feed.Name, false))[0];<br />
foreach (Rss.RssItem newitem in feed.NewItems)<br />
menuItem.DropDownItems.Add(newitem.Title);<br />
}<br />
}<br />
}<br />
I think that's the most relevant code snippet I can provide, I would be more than happy to provide others as needed.
I'm at my wits end as to how this issue should be fixed. One workaround that came to me was to introduce event buffering for each subsystem, with explicit yields to the GUI thread but as I don't fully understand why the errors occur, I can't be sure if that would help at all.
How should I proceed?
TIA,
Gre
|
|
|
|
|
Jergosh wrote: Cross-thread operation not valid: Control '' accessed from a thread other than the thread it was created on.
You can actually turn this error off if you want to, but it makes more sense to work around it. The way I do it is to do threading with the BackgroundWorker class, and to use the reportProgress method to fire a message back to the main thread, which then is where I update UI.
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 )
|
|
|
|
|
I've seen the exception thrown when you are calling BeginInvoke on a control that has been instantiated but has not yet become visible. .NET 2.0 apparently creates the backing Win32 handle lazily, when the control is about to become visible for the first time, and if you happen to call Invoke/BeginInvoke before it, it fails with that error.
Can you try accessing the
Handle in the constructor of that control? This forces creation of the underlying handle. <br />
<br />
<div class="ForumSig">Regards<br />
Senthil [MVP - Visual C#]<br />
_____________________________<br />
<font face="Verdana" size="1"><a href="http://msmvps.com/blogs/Senthil">My Blog</a> | <a href="http://www.codeproject.com/script/articles/list_articles.asp?userid=492196">My Articles</a> | <a href="http://www.flickr.com/photos/senthilkumar/">My Flickr</a> | <a href="http://geocities.com/win_macro">WinMacro</a></font></div>
|
|
|
|
|
S. Senthil Kumar wrote: I've seen the exception thrown when you are calling BeginInvoke on a control that has been instantiated but has not yet become visible. .NET 2.0 apparently creates the backing Win32 handle lazily, when the control is about to become visible for the first time, and if you happen to call Invoke/BeginInvoke before it, it fails with that error.
This sounds very promising as the controls are indeed hidden -- do you know if this bug applies to .NET 3.5?
Cheers,
Greg
|
|
|
|