|
Hi,
if i just buy a VC++.Net but not the whole Visual Studio.Net
package, can I still use it to develop software for Pocket PC 2003/Smartphone by using the compact framework extension ?
and can I develop software on PocketPC/Smartphone by using
C# ?
Thanks
|
|
|
|
|
I haven't done it myself but I don't think there is problem with that.You can get better answer in VC++ forum.
pyhtang1 wrote:
can I develop software on PocketPC/Smartphone by using
C# ?
Sure.
Mazy
"Man is different from animals in that he speculates, a high risk activity." - Edward Hoagland
|
|
|
|
|
Mazdak wrote:
can I develop software on PocketPC/Smartphone by using
C# ?
Sure.
Not if you only buy VC++ though, you'd need Visual c#
|
|
|
|
|
Of course, but I can't see in that statement he mention that.
Mazy
"Man is different from animals in that he speculates, a high risk activity." - Edward Hoagland
|
|
|
|
|
Actually, you don't need either. Download the .NET Framework. You've got the C# compiler. Download the .NET Framework SDK for more tools and documentation. You can do the same with Compact Framework (CF). Download the runtime. That's really all you need. You can find all the documentation in MSDN Library[^].
Now, if you can't develop without designers and drag-n-drop, then you'll need to get Visual C# .NET. If you look at the price, by the time you purchase two packages you've just spent more than you would for Visual Studio .NET.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Isn't there an open source IDE for C# development? I can't recall the name. Does that support CF?
Sammy
"A good friend, is like a good book: the inside is better than the cover..."
|
|
|
|
|
You're thinking of SharpDevelop (#develop)[^], and I don't believe it supports CF designers, but you don't really need them anyway. Drag-n-drop development is not true development. IDE's are handy, but being able to develop without them is what helps make you a decent developer.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Uh oh. You mean using VS.NET will always make me beneath all those who develop by hand?
But I thought that the real essence is not code writing, it's really the thinking behind it, if you know what I mean. This is why IDEs are okay, because they let you concentrate on writing the code that really matters, not the one you know by heart how to write already (like instantiating forms and controls).
Sammy
"A good friend, is like a good book: the inside is better than the cover..."
|
|
|
|
|
I'm not saying IDEs are bad, just that good developers can live without them. I use an IDE mostly at work because IntelliSense helps me avoid stupid spelling (rather, casing) mistakes, but I never rely on it (like a lot of people, unfortunately) to tell me what a class supports in the way of method and property names. I know what a class has (good memory helps, but...) and if I don't then I look it up in the documentation to truly understand what's available and what everything does.
Most code I write for CP (especially code snippets I post here in the forums) are written using VIM[^] on the command line with the C# command-line compiler (csc.exe) because it's fast and easy and I don't have to create a project (btw, VS.NET 2005 will have "scratch projects" for this very purpose!).
So, like I said, IDEs aren't bad. They sure save a lot of time when designing forms and creating data classes (like hooking up data adapters to data sets), but they shouldn't be depended on 100%. Knowing how to code and using an IDE doesn't make a good developer. Just look at VB programmers!
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I'm sorry, did that sound sarcastic? That's not what I meant if it did. It's just that your opinion matters to me, I sort of look up to you!
Sammy
"A good friend, is like a good book: the inside is better than the cover..."
|
|
|
|
|
Hi All,
Does anyone have a good example of using a COM Scriptlet (mine is VBS) from a CSharp application? Should it would like a normal COM control?
Regards,
Davy
My Personal Blog - Homepage. Scottish News - Angus Blog, Perth Blog and Dundee Blog
|
|
|
|
|
You should be able to. Make sure you register them first using regsvr32.exe. You'll have to create your own interop classes, though, since there wouldn't be any typelib on which to use tlbimp.exe. The WSC host (script.dll) takes care of all the details so the CCW shouldn't care how the COM control was instantiated or where it came from (one of the major development goals of COM).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
|
|
Hello. I'd like to write a module for IE in order to add custom http headers to each request. Is it possible? Thank you.
|
|
|
|
|
Hi all,
I have three questions,
1. What are the limitation of C# compared to C++.net ?
2. will MFC in VC++ be obsolete in future ?
3. Do we need to obsfucate the code in C++.net as in C# for
protecting the reverse engineering of software code ?
Thanks
|
|
|
|
|
pyhtang1 wrote:
1. What are the limitation of C# compared to C++.net ?
Nothing notable, really. While MC++ can easily call unmanaged APIs (which will produce mixed mode compilation), in C# you can P/Invoke these calls. It's a lot of busy work, but possible. Both can also perform pointer operations, but once again in C# you have to use an unsafe context where in MC++ you don't. The only real limitation with C# is that it can't produce completely unmanaged code, where C++ can (without using managed extensions).
pyhtang1 wrote:
2. will MFC in VC++ be obsolete in future ?
Who can say? If you're looking for a simple yes or no, you won't find it - only opinions.
pyhtang1 wrote:
3. Do we need to obsfucate the code in C++.net as in C# for
protecting the reverse engineering of software code ?
If you think obfuscating code is any sort of protection at all, you'd best forget about writing .NET and Java applications now. For every obfuscator, there's a deobfuscator. Besides, for some people like me they really don't help. I have yet to find one that doesn't let me use even something as simple as ildasm.exe from the .NET Framework SDK to see what's going on. Context clues and a good memory make it easy to get past obfuscation. Besides, for classes that don't have lots of private members obfuscation is pretty useless.
With that said, obfuscating MC++ assemblies is possible. For native instructions, everything is hidden anyway since it's not IL. For IL, private members can be obfuscated like any other assembly - the source language matters not because every language targeting the CLR compiles to IL which is contained in modules that are embedded into assemblies. Some language compilers support more feature sets and better optimization, but they still produce IL.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
If i have a Xml document like this:
<libraries>
<library name="contxtlib">
<fullname>123</fullname>
<super>true</super>
<loadorder>1</loadorder>
</library>
<library name="xmllib">
<fullname>xmllib.p</fullname>
<super>true</super>
<loadorder>2</loadorder>
</library>
</libraries>
I want this data on a windows form in textboxes and the <super> in a checkbox, so i can navigate through the records
Does anybode have an idea how to do it? Or maybe an example of an application like this?
Thx in advance
|
|
|
|
|
You might consider reading this into a DataSet (see DataSet.ReadXml ) since it's a simple 3-level XML schema. Data-bind controls to your DataSet in a form or other container control. Then you can use the CurrencyManager of your form or other container control to step through the records. See the Control.DataBindings property documentation in the .NET Framework SDK for more information and an example.
You could do this without data-binding, but you'll have to keep your element position and control text/properties in sync yourself. With such a simple XML schema, data-binding will definitely save you a lot of time.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thx a lot for your answer but the Xml schema was just an example, the real Xml schema is a lot more complex
I'll look it up and try your suggestions
thx!
|
|
|
|
|
If you want true data-binding, you'll need something to bind against so values are synchronized both ways. You could always just read-in your XML document and write it out when done as a two-step process, but that's not "true" data-binding (at least, some would argue).
If your schema is much more complex than what would fill a DataSet (try it though, it's actually a pretty intelligent class), you could always use the PropertyManager , another derivative of the BindingManagerBase like the CurrencyManager . You could read-in your XML file and either use XML deserialization to construct the object, or have the object parse and XML file itself and fill in its members (and have children fill in their members, etc.). You could then bind against the properties of that object easily enough. Kick that object up a notch with some PropertyChanged events and you've got a pretty nice OO design.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Using the following code I can run a process and trap when it has exited.
private void RunProc()
{
Process p = new Process();
p.StartInfo.FileName = "calc.exe";
p.EnableRaisingEvents = true;
p.Exited += new EventHandler(p_Exited);
p.Start();
}
private void p_Exited(object sender, EventArgs e)
{
MessageBox.Show( "Exited" );
}
What I would like to ask is, can I in some way determine if the process has crashed, been killed, or exited in some abnormal fashion?
I can use the ExitCode property to find out what the exit code of the process was, but some processes don't return meaningful exit codes, and the exit code seems to be zero if the process crashes or is killed.
Searching the web without Google is like straining sewage with your teeth. Userfriendly, 2003/06/07
|
|
|
|
|
Look up Try...Catch blocks.
E.G.,
private void RunProc()
{
Process p = new Process();
p.StartInfo.FileName = "calc.exe";
p.EnableRaisingEvents = true;
try
{
p.Start();
}
catch (Exception exc)
{
MessageBox.Show
(
OwningForm,
"Inner Exception: " + exc.InnerException.ToString() +
" Message: " + exc.Message.ToString() +
" Source: " + exc.Source.ToString()
);
}
}
|
|
|
|
|
I tried that first, didn't think it'd work, and it doesn't, unfortunately.
Maybe if I attach to the process as a debugger...
Searching the web without Google is like straining sewage with your teeth. Userfriendly, 2003/06/07
|
|
|
|
|
A separate program crashing would not throw an exception in the executing AppDomain .
Microsoft MVP, Visual C#
My Articles
|
|
|
|