|
|
You could start the default browser (not neccessarily IE) by calling
System.Diagnostics.Process.Start("http://www.xxxxxxx.com"); mav
|
|
|
|
|
Thanks
|
|
|
|
|
Hi all,
I'm trying to make a class (DSWrapper) which extends DataSet, so I can put in a customized Sort() method:
class DSWrapper : DataSet
{
public DataSet Sort()
{
//sorting code
}
}
To call it I have another class (EditRecords) with a method (ListAll) that returns a DataSet, thus:
DSWrapper dsw = (DSWrapper) EditRecords.ListAll();
dsw.Sort();
//...then bind to datagrid
However I get a runtime exception because the cast is not valid. (Dataset -> DSWrapper) This makes sense I suppose, but is there a way round it? Is my idea just damn silly?
If anyone could help that would be really great.
Best Wishes
Steven
|
|
|
|
|
Hi Steven!
You could add a constructor to your DSWrapper taking a DataSet as parameter:
public DSWrapper(DataSet theDataSet)
{
} and then perform
DSWrapper dsw = new DSWrapper(EditRecords.ListAll());
dsw.Sort();
mav
|
|
|
|
|
Hi mav, thanks for replying.
Yes that works, but it means the inheritance part of it is "by the by" doesn't it?
That's a "has a" rather than "is a" class.
Is there a way to do it with inheritance?
Steven
|
|
|
|
|
You could also alter your EditRecords class to return a DSWrapper object instead of a DataSet, but honestly I wouldn't.
You could, however, leave the interface of EdtRecords.ListAll untouched and just return a DSWrapper object. DSWrapper inherits DataSet, so this should work.
Then you _could_ downcast to DSWrapper and call Sort, but that's not very obvious from a design point of view. I think it's much cleaner to instantiate a subclass.
Your DSWrapper class adds new functionality to DataSet, so this functionality only can be used if the object itself _is_ an instance of DSWrapper. No way to alter DataSet itself to add a Sort method.
Regards,
mav
|
|
|
|
|
Thanks again mav
I agree - it wasn't a good idea.
I'll stick with the standalone class using a
DataSet instance, rather than inheriting.
Cheers
Steven
|
|
|
|
|
i will be really grateful if someone can give good ideas for final year project
|
|
|
|
|
One idea I explored for my final year project was exploring the swf file format with the end goal of producing an open source swf editor. Its very interesting and can get really complex when you get in to shape boolean operations etc. Most of the modern languages provide some sort of 2d api - java being the most comprehensive and usefull. .Net has some nice 2d classes but they all revolve around cubic bezier curves which makes things quite difficult (as the swf file format only supports quadratic curves) and also the shape boolean operations are limited to the Region class which means you can't get the path points back after the opperation. The project could have two angles, the first being the development of the library itself and the second being developing a ,project in the open source goldfish bowl (extra points from your tutor!!!).
Anyway - just an idea - if you do go ahead with the project, your first point of call should be the Macromedia Swf File Format specification - after that www.openswf.org has some usefull code examples - the rest is up to you!
Good Luck!
Chris
Complexity is a simple concept!
|
|
|
|
|
Why does everyone have to do something un original. Go wild, do something unique (hell even patent the idea!) , if it doesnt work, you wont fail, the project was just not viable (been reading too much scott adams lately!), given you have valid reasons. I'm sure the examiner will find the read much more interesting!
top secret xacc-ide 0.0.1
|
|
|
|
|
As far as I'm aware - the project is original - there are no real functional open source swf editors (excluding Swf Draw) which is very limited! Also I think he's after specifics - as opposed to "do something orginal". What do you have in mind?
Complexity is a simple concept.
|
|
|
|
|
Try building an application that is modular.
Build in such a way that you can add or remove modules to your application (.dll files) and increase or decrease the possibilities of your application that way. I have done that for my last years project and I got some extra points for having a great app that completely modular and easy to extend.
I build in some administrational stuff like:
- Addressbook
- Invoices
- Orders
- Bookkeeping
But you can put in other modules if you want
"Every rule in a world of bits and bytes can be bend or eventually be broken"
|
|
|
|
|
HI,
I HAVE DECIDED TO DEVELOP "NETWORK INVENTORY MANAGEMENT SOFTWARE" AS PROJECT BUT I AM NOT ABLE TO DECIDE ABT IT'S TOOLS.IS C# AN APPROPRIATE LANGUAGE TOOL FOR DEVELOPING IT AND PLZ CAN U GIVE SOME LINKS OR TIPS AS GUIDANCE IN THIS PROJECT ,I'LL BE VERY THANKFUL TO U.
|
|
|
|
|
|
Nice demostration of the different formatting CP currently supports.
|
|
|
|
|
- Can you work with C#? If not, can you learn it easily?
- Do you have a language that you know well? If yes, choose that one over a language that you don't know.
That's all I can say about it
"Every rule in a world of bits and bytes can be bend or eventually be broken"
|
|
|
|
|
Hello all,
I'm writing a custom control in which I would like to modify the properties shown on the property grid (within Visual Studio at design time) depending upon the value of a property within the property grid. For example, consider a class called animals. Within that class there is a property that has an enumeration allowing the user to chose between the options human or dog. If they choose human then I would like a property called arms to appear in the same property grid. However, if they chose dog, then that property would need to disappear.
I've added an event handler for the OnComponentChanged event within the ComponentDesigner class and I can determine what the value of the property animal is, but I can't figure out how to add/remove the desired properties from the grid. Can it be dome using the PreFilterProperties function? If so how do I get the IDictionary interface to pass to the function?
Thanks for your help.
Jeff
|
|
|
|
|
|
hi all.. i am new programmer almost,and i wana thank u all here guys for this great site and quick support,
the problem: i want make a program that press the keyboard
keys by its self after a period of time,
how can i do that using c#? and thanks for all.
|
|
|
|
|
your problem(question) is open to multiple understandings . However, I will assume that you are trying to intercept keyboard event(s) for your application.
If you are trying to intercept the keyboard event for a specific control/form,
you can use the OnKeyDown event
private void textBox1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
Thread.Sleep(1000);
}
Otherwise, you might want to take a look at Windows Hooks.
Refer http://www.codeproject.com/csharp/GlobalSystemHook.asp
|
|
|
|
|
Read documentation for SendKeys and Timer Classes.
|
|
|
|
|
Use the SendKeys class to send keystrokes or keystroke combinations to the active application.
www.troschuetz.de
|
|
|
|
|
Hi, I am making a C# application that uses DirectX.
I did not have the DX SDK so i downloaded the "DirectX 9.0 SDK Update - (Summer 2004)"
However, intellisense (in Visual Studio Whitbey) still doesnt show the Microsoft.DirectX API.
What am I doing incorrectly?
thx
|
|
|
|
|
Have you added a reference to the project?
|
|
|
|