|
What you want is known as a "splash screen"... Google that, and you'll be overwhelmed with the amount of material out there
|
|
|
|
|
most of which unfortunately isn't any good, either the splash lacking functionality, or being shown for a fixed amount of time, or it all being threaded the wrong way. There are dozens of CP articles on the subject, and I still feel an urge to add one.
|
|
|
|
|
|
The functionality seems fine, the threading seems all wrong though. Forms must be created and shown on the main thread, otherwise you'll get all kinds of trouble. See the most recent thread in that article's forum.
|
|
|
|
|
This splash screen functionality is even a killer for my current needs.
By saying that the threading seems wrong, you must be refering to the cross-thread oporation that this program will face, since creating the splashing form not in the main thread, but accessing to it with it any way...
Well that is well known problem (that can be bypassed, if you know what are you doing) but it cerenally lies in the killer aspects of this splash screen from my point of view so it won't bather me (as I am planning to eliminate it to begin with..)
Thanks all for your help and remarks
Shultz
|
|
|
|
|
|
You might want to investigate this tip/trick:
Multiple Subsequent Main Forms in C# Apps[^]
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Hi. I want to develop an application where initially i have just an empty form with no functionality. Then, later, i can develop separate modules and when i install them, they plug themselves into the form with their functionality. Something like add ins. How can i do that?
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
One very common approach in .NET is via reflection/functional interfaces that add-ins should implement. Here's an 8 year old article on the topic:
Using reflection to extend .NET programs[^]
The concepts remain similar even today.
|
|
|
|
|
|
Microsoft has produced the Managed Extensibility Framework[^] that might be appropriate. It doesn't do anything specific to making pluggable parts of forms, but it does the work of dealing with dependencies on plugins that may or may not be there, etc.
|
|
|
|
|
Ummm... with plugins?
and XML.
Wamuti wrote: they plug themselves into the form with their functionality
I hope they don't try to position themselves on the form.
I've used plugins for background (non-UI) stuff, to populate a TabControl, and to populate a menu, but not for actual controls on a form.
|
|
|
|
|
I would like to build a basic ping application. I've seen a few ping applications here that are well developed and a little complicated for me to dissect and figure out how they work at this point in my learning.
Does anyone have a console ping application that is bare bones, that I can build off of while I learn? Something that I can launch and hard code variables into, and break and the put back and see how it functions?
Thank you!
|
|
|
|
|
|
Hi,
I tried that and it fails, I then spent a few hours trying to figure out why and could not, so I came onto here for help looking for something as basic as a few lines, that maybe I would be able to understand.
Visual C# Express says out of range exception was unhandled for this line?
PingReply reply = pingSender.Send(args[0], timeout, buffer, options);
|
|
|
|
|
if you want help with some code, you'd better show some of it, I mean more than a single line.
if you look in MSDN, there is a full example on the Ping class; it is in fact a Console app, probably doing exactly what you want.
if you look at Ping.Send in MSDN, it explains all, and shows possible exceptions; it also gives a possible source for OutOfRangeException.
Now go and read!
|
|
|
|
|
Ok I see what I did wrong initially.
I have now defined a variable called host and then put it in place of the "args[0]" array and it will ping it one time and return some values.
I think I can build off of this, thank you very much!
|
|
|
|
|
Yes but have you worked out why args[0] caused a problem and host didn't?
What is args[0] ? What does it hold? Is it important? Do you limit or cripple your software if you remove it? Or is removal an improvement? You do need to understand this basic stuff before you dive into anything more complex for a first app. Honest.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
Hi,
I believe it is because the array is empty or undefined. I doubt it is an improvement to remove it.
I'm not sure how to get it to work with the array, the only time I've used an array is with a for statement and that isn't really applicable for holding multiple host names.
I believe you can pass multiple values into the method with { } but I'm not sure on the syntax yet
|
|
|
|
|
Hi,
I would suggest you go buy and study an introductory book on C#. Hands-on experience is nice, getting the fundamentals is important however. Nothing beats a book in teaching you all that is required in an orderly structured way. Visit a real bookstore, or Amazon if you must. Look at some books, pick the one you like most. Which book one prefers is subjective.
|
|
|
|
|
Luc Pattyn wrote: Which book one prefers is subjective.
...just avoid anything with "...In 7 Days!" in the title!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
Hi Luc,
I'm watching/doing the video series on www.learnvisualstudio.net
Have you watched these? I learn better seeing while reading ... but maybe the book is worth it also? Let me know what you think, thanks.
|
|
|
|
|
I think nothing beats a book, for a couple of reasons:
1. The quality tends to be much higher than anything on the web.
2. You can process material on your own pace, anything that moves may end up being watched as a TV show.
3. You can make little notes and apply highlights in a book (assuming you own it).
I do a quick video if I need to get some insight in new stuff, not to study it thoroughly.
|
|
|
|
|
Books are very good. Considering everything I know about C# was gained through library books and books bought at used book stores (no formal training) they are a priceless source of information.
As a side note, args[0] sounds like the argument passed to all Console applications in the Main method. So args[0] would be the first command line argument for the application e.g. ping.exe 255.255.255.255 . This being a hypothetical situation from the fact that replacing it with a variable called host (assuming it is the IP Adress to ping) made it work.
Anyway. Books are good.
|
|
|
|
|