|
I want to learn how to make games with DirectX or OpenGL.
Question 1: Which is more powerful?
Question 2: Which is easier to learn?
Any help would be appreciated.
Also, if there are any other graphic sdk's out there that are better than these, please tell me!
-----
Note: *** Never give me an answer have anything to do with Visual Studio. I don't have this program, and it'll be that way for a long, long time. ***
|
|
|
|
|
|
1 - almost certainly DX. OpenGL doesn't change that much
2 - Probably OpenGL, because there are better books and tutorials about.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Is there another way to make files beside using BinaryWriter/BinaryReader or just making a text file? I've found BinaryWriter and BinaryReader to be very inconvenient and I can't just store information using text.
-----
Note: *** Never give me an answer have anything to do with Visual Studio. I don't have this program, and it'll be that way for a long, long time. ***
|
|
|
|
|
If it is simple text, how about StreamWriter?
|
|
|
|
|
The easiest way is by far using the File class. You don't have to bother with opening/closing the file/stream.
It has a lot of useful static methods for creating writing, appending, deleting, setting attributes, etc.. Check it out. You'll like it.
Be aware however that if you want to write large amounts of data to the text file you should stick to the StreamWriter as it's several orders of magnitude faster than the similar methods of the File class.
|
|
|
|
|
Dear all,
i have a problem in accessing the controls on parent mdi form through child form, there are two scenario,
1. Accessing through child form.
2. Accessing through Dialog Form (Modal Forms) which are not child of parent.
please if someone have code for the three forms separately, i shall be thankful for that.
Bye
|
|
|
|
|
Whenever you are calling a child form from MDI call it like
myChild frm1;
frm1 = new frm1();<br />
frm1.ShowDialog(this);
now when you want to access control of MDI from myChild try this
((myMDI)(this.Owner)).Label1.Text = "Hi";<br />
<br />
-- modified at 1:37 Friday 30th March, 2007
Tirtha
"A man can ride on your back only when it is bent....."
|
|
|
|
|
Does anybody know how to programatically list all the methods and properties of a COM object? I know I can list all the COM objects by looking up the registry programatically but this only gives me the assembly names and the classes, and I would like to drill inside the classes and see what interfaces they expose programatically.
Thanks.
|
|
|
|
|
I need to have a server listening on two ports.
The server's reaction is the same on both ports.
(It's just the way it is)
I got code working on one port with a TCPListener.
My question, do I need another TCPListener for the other port, or
is there a way I can have the TCPListener listen on two ports?
This forum is a life saver.
|
|
|
|
|
dino2094 wrote: My question, do I need another TCPListener for the other port
Yes.
|
|
|
|
|
Can anyone tell me how I can ( or if ) make a strongly-typed DataSet COM accessible? I'm using .NET 2.0 btw.
I've exposed the .NET assembly to COM but non of it's functions are visible in COM. There must be some manual code editing that needs to be done on the classes I want to be visible. Specifically I want the all the functions in the TableAdapter to be visible in a Visual FoxPro application.
|
|
|
|
|
If I have:
class A : ISomeInterface {..}
class B : ISomeInterface {...}
Is there some .NET reflection method such that:
A a;
B b;
if (a.GetType()==b.GetType()) {}
works? Basically, I want an equivalency test of two instances for a common interface: does a and b both implement interface x.
Anything in .NET to do that, or will I have to write that?
Thanks!
Marc
Thyme In The CountryInteracxPeople are just notoriously impossible. --DavidCrow There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith
|
|
|
|
|
Here's one way to do it (Assuming I understand your question correctly.)
Upload u = new Upload();<br />
Disconnect d = new Disconnect();<br />
<br />
if (u is IDisconnect && d is IDisconnect)<br />
{<br />
}
Brent
|
|
|
|
|
It's late here so I may be missing something, but I would look at using something like:
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Type[] ifaceA = typeof(A).GetInterfaces();
Type[] ifaceB = typeof(B).GetInterfaces();
List<Type> types = new List<Type>();
types.AddRange(ifaceA);
foreach (Type t in ifaceB)
{
if (types.Contains(t))
Console.WriteLine("Found {0}", t.Name);
}
}
}
interface IList1
{
void Name();
}
public class B : IList1
{
#region IList1 Members
public void Name()
{
throw new Exception("The method or operation is not implemented.");
}
#endregion
}
public class A : IDisposable, IList1
{
#region IDisposable Members
public void Dispose()
{
throw new Exception("The method or operation is not implemented.");
}
#endregion
#region IList1 Members
public void Name()
{
throw new Exception("The method or operation is not implemented.");
}
#endregion
}
}
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Yup, that's what I was thinking I'd have to do. Just wanted to check in case there was something that already did it for me. Thanks for the code--I'm sure it's close if not exact.
Marc
Thyme In The CountryInteracxPeople are just notoriously impossible. --DavidCrow There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith
|
|
|
|
|
Wouldn't casting both classes to the interface and testing to see if they are null essentially do the same thing?
Something like this:
IList1 t = A as IList1;
IList1 t2 = B as IList1;
if (t != null && t2 != null)
{
...
} The as operator will either return the proper cast if it is supported or null if it isn't.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
You would also have to ensure that A and B were not null to begin with also.
|
|
|
|
|
It would, but I wrote this 5 minutes before going to bed. A little bit tired you might say.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
|
|
Can you access this via code?
only two letters away from being an asset
|
|
|
|
|
TaskManager Extension is source code downloadable. You can inspect its source for API use.
|
|
|
|
|
I have a problem that I have not been able to resolve. I have a C# EXE where I have exposed some interfaces. My problem is that every call to createobject creates a new instance of the application. What I need is one running application from which a client can connect to.
Scenario 1:
Application is launched from command line.
User connects to existing running application using createobject (this does not work...it creates another instance)
Scenario 2:
Application is not running
User run createobject to connect to launch application. App launches (however if another program does a createobject it creates yet another instance).
I have not found anything in my searches that have helped.
Someone please shed some light on this!
Thanks,
Loren
|
|
|
|
|
Hello everyone,
I have a ListView control which is populated with a large number of data (Many rows). As the result of large number of rows I have to use the scrollbar to see the entire rows. I am searching and selecting row of the ListView programmatically. The following code temonstrate this:
ListViewItem foundItem = listView4.FindItemWithText(boxSearch.Text);<br />
int foundItemIndex = listView4.Items.IndexOf(foundItem);<br />
<br />
if (foundItem != null)<br />
{<br />
MessageBox.Show("The Item has already been registered.");<br />
listView4.Focus();<br />
listView4.Items[foundItemIndex].Selected = true;<br />
listView4.Items[foundItemIndex].Focused = true;<br />
}<br />
else<br />
{<br />
MessageBox.Show("The Item has NOT been registered.");<br />
}<br />
Unfortunitly, if the selected row is not in the user's ListView, it can go without notice. Therefore, I would like to move the rows which are visiable in the ListView in order for the user to see the programmatically selected Item. I have been under impression that the following code do the job:
listView4.Items[foundItemIndex].Focused = true;
but unfortunatly, when I add it to the above code it practically does NOTHING.
Can anyone be kind enough to tell me how this can be achieved?
Thank you very much and have a great day.
Khoramdin
|
|
|
|