Tuesday, July 14, 2009

Programming lesson or course material?

hi, I would like to teach courses on Visual C#.net, Visual Basic.net, Python and Phrogram. I have written some material myself, but I was wondering if there any resources or lesson plans availible so I could look at how I am teaching, what they teach, what order they teach stuff in, and some general guidance, do you know of any?

Programming lesson or course material?
I think you need to do a basic teacher training course. I suggest you look at your local college and find out if they do a C %26amp; G level 1 as you can do it in about a term .. This will at least give you a basic insight.


Is there a way to say what C/C++ compiler and linker were used to compile and link an application?

The matter is that I would like to know if there is a way to find out which compiler and linker were used to compile a C or C++ application.





I have the Borland compiler/linker and two versions of Microsoft Visual C++ (v6.0 and .NET). Is there a way to say if an application (final .exe) was built using one of these (or other compilers/linkers)?





Thanks for any help.

Is there a way to say what C/C++ compiler and linker were used to compile and link an application?
The build tools don't usually put what was used to build the particular executable in them. The only way you can really do this is to have the source code, generate a new executeable and then compare that to the one you wish to find out about.


Visual Basic .NET 2005 Programming Help?

How would you write an EOF character(s) to a file? And how can I write past this/read past it? I know you can do it in C++ and other languages...so I imagine it can be done in VB .NET.

Visual Basic .NET 2005 Programming Help?
Check out the link - that answers all your questions.


Vb.Net code conversion is very similar. Only thing you need to know is which class and which method you need to use





http://www.codeproject.com/cs/files/fast...

rose

How to learn C# ?

I know C++ already. I ve heard of this language called C# developed by Microsoft. And i need to learn it.





please tell me for what purposes C# is used?


Whats the relationship between C# and Visual Studio.NET ?

How to learn C# ?
The best way to learn is to try the language out. It uses the C language syntax. Though, it is a .Net based language. You can download a free light weight version of C# called Visual C# Express from Microsoft directly (see below link). C# is simple but the Dot net framework is pretty huge. If you've been using Visual Dev Studio for C++ then the transition is pretty straight forward. Once you download C# you should be able to write Hello World in about five minutes.


It easy to create GUI's and gives you access to develop under the .Net environment. It runs in a virtual machine so it runs slower if you're doing intense calculations or image processing.


I've been programming in C# for about one and a half years. I programmed in C++/C for the last fifteen years.
Reply:I was quite the C++ veteran when I took on C#, and all I did to learn it was use visual studio and C#, and checkout MSDN for help (I did have knowledge of the .Net framework too, from using VB.Net). If you know C++, C# will be a breeze as the syntax is very similar, plus it has advantages like lower compilation times, and it removes the requirement to forward-declare class. The only learning curve is the .Net framework. If you are familiar with Java, then you will notice that the .Net framework class libraries contain many similar types of namespaces and objects that Java does.





C# is primarily used to design windows applications, but it can be used for Asp.net as well. It's a Rapid Application Development language designed to allow you to quickly make quality windows applications. C# is hosted by Visual Studio, meaning it is one of the languages that Visual Studio can work with. Other languages include C++ and VB.Net.
Reply:C# is a part of visualstudio.net. you can learn c# using MSDN or you can buy a book the complete reference by herb schildt is also good.it is similar and advanced than C++.


What is the difference when programming for xp or vista in c++?libraries/.net win32. help!?

Right now i'm learning win32 on dev-c++ and it's hard without a visual developing environment like vc6 or vb5. Is there a difference when programming for xp or vista?

What is the difference when programming for xp or vista in c++?libraries/.net win32. help!?
Microsoft offers a very powerful .NET Framework for Windows XP and beyond. Microsoft Visual Studio 2005 Express edition for C++ or for C# are powerful development environments (Express editions are downloaded for free). The C++ version encourages you to write "safe" code. That means you cannot use pointers. However, you can write unsafe code and use pointers in this language.





The framework automatically cleans up resources/memory when you do not explicitly use pointers.





Microsoft has been very successful in offering a very powerful set of framework features. I recommend you go on to learn what Microsoft .NET Framework has to offer developers. C# is a successful threat to Java.
Reply:why is it difficult wthout vc6 or vb5? there are some free IDEs available.





there's some difference between XP and vista. Vista's security model is very strict - if you're not an elevated user (administrator), you're not allowed to store files in some directories, or create registry entries. Also, the firewall can make problems if you use the internet. XP is not that strict.





but in most cases a program will run fine on vista if it was written for XP.


How does one get and put files with FTP using Visual Basic .NET (and Visual Studio 2008)?

This is a follow-up to a question that was answered very nicely with a C# example, but I'm looking for a VB.NET (2.0 or 3.5) example.

How does one get and put files with FTP using Visual Basic .NET (and Visual Studio 2008)?
I'm working on a ftp control and here is a test class I started with.





Imports System.Net


Imports System.IO





Public Class GetFile


Friend Sub subGetFile(ByVal uri As String, ByVal LocalFile As String)


My.Computer.Network.DownloadFile(uri, LocalFile, My.Settings.strUser, My.Settings.strPwd, True, 100000, True)


End Sub





Friend Sub subDownLoadFile(ByVal strUri As String, ByVal strLocalFile As String)





Dim Instance As New Uri(strUri)


Dim Request As FtpWebRequest





Request = CType(WebRequest.Create(Instance), FtpWebRequest)


With Request


.Method = "RETR"


.UseBinary = False


.Timeout = 120000


End With





Dim Response As FtpWebResponse = CType(Request.GetResponse(), FtpWebResponse)


Dim ResponseStream As Stream


Dim TargetStream As Stream





Try





Response = CType(Request.GetResponse(), FtpWebResponse)


TargetStream = New FileStream(strLocalFile, FileMode.Create)


Using Writer As New StreamWriter(TargetStream)





ResponseStream = Response.GetResponseStream()


Using Reader As New StreamReader(ResponseStream, System.Text.Encoding.UTF8)





Writer.Write(Reader.ReadToEnd())


Reader.Close()





End Using





Writer.Close()





End Using





Catch Err As Exception


MessageBox.Show(Err.Message)





Finally


Response.Close()





End Try





End Sub





End Class


VB - .NET - Visual Studio 2005 - programming - coding - termimology and other issues, assistance needed please

Requesting answers that will be intuitive to a programming semi-illiterate.





I have inherited a VS 2005 project from an individual who left the company unexpectedly. I'm not an experienced programmer and I'm trying to see if the application he was building is working.





QUESTIONS:





What is meant by the following:





" 'C:\WINDOWS\blah, blah, blah...\Microsoft.VisualStudio.HostingPr... Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled."





In .NET programming speak (in VB context, if/where it matters), what is meant by:





- "Skipped loading symbols"? Does this indicated that some aspect or component of the application did not run successfully?





- "Module is optimized"? In this context, what's a "module"?





- What does "debugger option 'Just My Code' is enabled" mean?





Thanks!!

VB - .NET - Visual Studio 2005 - programming - coding - termimology and other issues, assistance needed please
If you're not an experienced programmer you are going to have a lot of pain working through this. It's not for the faint hearted. Briefly a module is a piece of code that compiles into a DLL. Just My Code is an option under Tools/Options/Debugging/General. If your module is optimized you can't debug it so the debugging symbols are not loaded.





Now switching off the optimization is something I have been trying to do without success for ages...





Sigh.

flowering plum

VB - .NET - Visual Studio 2005 - programming - coding - termimology and other issues, assistance needed please

Requesting answers that will be intuitive to a programming semi-illiterate.





I have inherited a VS 2005 project from an individual who left the company unexpectedly. I'm not an experienced programmer and I'm trying to see if the application he was building is working.





QUESTIONS:





What is meant by the following:





= = =





'loadABCV3.vshost.exe' (Managed): Loaded 'C:\Inetpub\wwwroot\Image_Load\LCIS_load... Symbols loaded.


'loadABCV3.vshost.exe' (Managed): Loaded 'C:\Inetpub\wwwroot\Image_Load\LCIS_load... No symbols loaded.





= = =





In .NET programming speak (in VB context, if/where it matters), what is meant by:





- "Symbols loaded"? Does this indicated that some aspect or component of the application has run successfully?





- "No symbols loaded"? Does this indicated that some aspect or component of the application did NOT run successfully?





Thanks!!

VB - .NET - Visual Studio 2005 - programming - coding - termimology and other issues, assistance needed please
Compiled code is essentially just a series of instructions to the CPU, calls to external libraries, and maybe some data. Normally what you see in the source code is not really recognizable in the compiled code. Symbols (or "debugging symbols" as they are often called) are the original function names and variable names from your source code that can be compiled into your executable (or otherwise referenced from another file such as a symbol database file), so that you can hook a debugger up to your compiled code, step through it, and have half a clue what it's doing.





Normally a "debug build" contains symbols, and a "release build" does not.





If something loads without symbols, it probably means that you've fired up a release build that is ready to be given out to the world. This does not mean that anything failed or that anything is wrong with this build.


Visual Studio 2008 Express Edition - question?

What are the limitations of the Express Edition when compared to the full Professional Edition? I am a beginner developer, so will I be limited in any way in the learning process? BTW I have good experience with Visual C++ 6.0 %26amp; Visual Studio 2003.NET

Visual Studio 2008 Express Edition - question?
There are no limitations on what you can do with the express edition. The major differences are that the express edition IDE lacks some features that the professional edition has, they both produce the same code though.


Can anyone write a simple tetris in visual c++ 6?

I need a simple code , not pictures, not sounds, ...


only the game


if it is on the net please give the url

Can anyone write a simple tetris in visual c++ 6?
of course!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


almost all commercial games are made by C++!!!


try google's search engine to find source codes or www.msdewey.com


Exception when I run a program developed with C# .net 2.0?

I used visual studio 2005 to developed an application. it was working well. recenty i used "Computerinfo" class of "Microsoft.VisualBasic.Devices" namespace. for which I had to add a visual basic dll as reference. But my problem is when I run the program from Visual Studio 2005 IDE It works fine. but after publishing It throws an exception with 'detail', 'quit' and 'continue' button.





************** Exception Text **************


System.Management.ManagementException: Provider load failure


at System.Management.ManagementException.Th... errorCode)


at System.Management.ManagementObjectCollec...


at System.Management.ManagementObjectCollec...


at Microsoft.VisualBasic.Devices.ComputerIn...


at Microsoft.VisualBasic.Devices.ComputerIn...


at MountUp.MainUI.MainUI_Load(Object sender, EventArgs e)


at System.Windows.Forms.Form.OnLoad(.....

Exception when I run a program developed with C# .net 2.0?
I recall reading somewhere that not all of the "My" objects available to VB function properly in C#. Since most of the objects provided through the "My" keyword are available to C# through other means, it's probably better in the long run to spend a little more time to write the code for that directly. You didn't say exactly what property you were trying to access when the exception occurred, but from what I can see that's available through the ComputerInfo class you'll probably have to resort to pinvoke to get most of that info.

nil

I need money to learn Visual C# (video tutorial) ?

Where can i get free money on net ? ...i need about 13USD.

I need money to learn Visual C# (video tutorial) ?
better is to ask about interlibrary loan It might be at a college that participates
Reply:I can't imagine why the world is full of idiots! Get your lazy *** off the couch, man.


How do I make the Visual Basic 6 GUI remain responsive during a DLL call?

My employer will not spend the money to get me Visual Basic.Net. I am stuck using Visual Basic 6. I am pretty good with programming embedded C, but have no time to learn to program in Visual C++.








So I am doing some advanced programming, in VB6, using several DLL’s. I have 4 DLL’s, and two of them use callbacks. The problem is the GUI will appear to freeze during a DLL call. When the DLL returns, everything returns to normal. I have partly cured the problem by refreshing the forms, and calling DoEvents during callbacks. This works fine, unless the user clicks on a control button. The button event will not fire until the DLL returns, or during the callback. This makes the app very sluggish.





I have tried various methods of multi-tasking. Several of them work, in the IDE, but crash at runtime. The app will crash with an exception when one of the DLL’s executes a callback.

How do I make the Visual Basic 6 GUI remain responsive during a DLL call?
Not easy to follow everything you did, but I'd try something like this:


Make a worker thread that does the DLL calls. Keep or drop the callbacks. I guess you are using callbacks to signalize progress, if so you will have trouble - VB6 is too slow for that. If you're using callbacks for other things, it may be worth reconsidering them, I don't have good experience with callbacks in VB6.


The worker thread should send simple Windows Messages to signalize progress. Even in VB6 you can post/send Windows Messages.





The User Interface thread is the main VB thread, no modifications needed. To Windows Messages are trapped by subclassing some (main) window - good source code can be found for that on Internet. This read will be responsive all the time, and no risk of crashing.


C++ compiler and guide?

I am interested in programming and so far I only know Visual Basic, Basic, and QBasic, not so amazing. Anyway, lately I have grown interest in C++ and want to learn it. I know C++ is a massive language but are there any compilers? guides? to get statrted? I like using the 32-bit compilers, but it doesn't make a difference. Also, I have VIsual Studio.NET 2003, but I don't know hwo to use it with Visual C++. Even teaching me how to program Hello World would be fine.

C++ compiler and guide?
Well, if you'd like to find a larger selection of compilers (though Bloodshed Dev-C++ is excellent) as well as links to tutorials, try out the URL below. It has a very nice selection of reviews, articles, tutorials, compilers in lots of languages and other programming tools. Good luck.
Reply:for C++ u may refer to "Exploring C++" by "YESHWANTH KNETHKAR ".
Reply:http://www.bloodshed.net/devcpp.html
Reply:#include %26lt;iostream.h%26gt;





main()


{


for(;;)


{


cout %26lt;%26lt; "Hello World! ";


}}


is the way to write in C++..on visual basic you have the option to choose C++ as a language. you kinda have to play with it, but there are lots of web sites to get you started


In c#.net or VB.net, how do I create a window that contains windows?

Many programs have a master window and there are sub-windows like in photoshop. Using the 'Window' menu a user can switch between the two or more sub-windows. Do I start with a form as is given when a new project is created(with visual studio) and add them (if so, how?) or do I create seperate forms and call one from the other(if so, how?) I am looking for an overview of how it works. A book that shows this would be great!

In c#.net or VB.net, how do I create a window that contains windows?
I think you mean to use MDI, the Multiple-Document Interface. The link below will lead to C# and VB examples.
Reply:assumption :


frmStart : The first form which loads when the program is executed.


frmSearch : A form for searching like find/replace.


menuSearch : A menu item in frmstart which when clicked opens the frmsearch.





the code is as follows:





private sub OpenSearch ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuSearch.Click


Dim frmSearchChld As New frmSearch()


With frmSearchChld


.Owner = Me


.Show() // .showDialog()


End With


end sub

sp

Visual Basics.NET. Help me please.?

I am taking a course in Visual Basics. We are using microsft visual basic 6.0 I have been struggling with this course all semester. People say visual basics was easier and better than C++ but I like C++ better. Can someone please help me.





We have to make a program to do the following.As an IF statement





A program that accept admission


It should accept ranking from high school, score on admission test.


Admit only if


Ranking%26lt;=10% and testsocre%26gt;=70%


Ranking%26lt;=20% and test score %26gt;=80%


Ranking%26lt;=30% and test score%26gt;=90%


Else do not admit.


I dont have the software at home but this is what i did in class.


Dim Score As Integer


Dim Ranking As Integer


Dim Admit As String


Dim AdmissionDeclined As String


If Score %26gt;= 20 And Ranking %26lt;= 10 Then Admit() Else If Score %26gt;= 80 And Ranking %26lt;= 20 Then Admit() Else If Score %26gt;= 90 And Ranking %26lt;= 30 Then Admit() Else AdmissionDeclined()


End Sub. I dont have enough characters to print the whole code

Visual Basics.NET. Help me please.?
First of all your code has score %26gt;= 20 when I think you mean score %26gt;= 70. That is probably just a typo. Secondly, make sure you have elseif as one word and you need "end if" after the else. In VB you always have to end an if with an "end if" statement Other than that, it appears everything else should work.





Oh and to let you know, VB has its strengths and C++ has its strengths. You really can't say one is better than the other because they are designed with different ideas in mind. C++ is great for memory management and speed, VB is great for GUI and database front end design.





Hope this helps you and good luck with the course. Stick with it, VB can take you places.





Enjoy!
Reply:It looks like you're on your way. What is the specific problem you're having?





You need to create methods for Admit() and AdmissionDeclined()


Making Internet Connection using Auto Dial up Using .net C#?

Hi,





I want to create dialup network and/or auto connect to internet from within my application.





If there is not already created dial up network then i need to create new one. If there is no modem installed, make warnings.





I need to do all these on Visual Studio 2005/2003 desktop application using c#.











I have done so many R%26amp;D's on it, but unable to achieve what exactly i want.





I tried InternetDial method of wininet.dll to connect internet but It opens the default dial up dialog and i need to connect manually. But i want it to be connected automatically without clicking to connect within windows dial up.


I tried to use InternetAutoDial but it didn't get success.











I tried IO.Port class in VS 2005 and tried to pass AT commands, some response i got from modem but unable to connect.





Could you please tell me whether i m in right way or not?


I am i need proper sources of guide like books or your help or any sample code etc.





Thank you

Making Internet Connection using Auto Dial up Using .net C#?
In NET 2.0 in the System.IO.Ports is support for serial connections over modems.





You may be able to say something like





private SerialPort port = new SerialPort("COM2", 38400, Parity.None, 8, StopBits.One);





Look on MSDN forms for a sample.
Reply:hi mohan have to got solution for your query if so can you give some info on how to make a network dialer using .net2.0.It should have to run on windows vista also along with all other Windows OS. Report It

Reply:Hi Mohan,have to got solution for your query if so can you give some info on how to make a network dialer using .net2.0.It should have to run on windows vista also along with all other Windows OS. Report It



I have downloaded latest version of Microsoft Direct x 9 SDK,can I use it with Visual C++ to compile programs?

I want to know whether Visual Studio 6 is sufficient to work with DX9 SDK or Do I need to have VB.NET.I want to compile %26amp; run simple Pixel and Vertex shading programs.I have got a supported GPU for pixel and vertex shading.

I have downloaded latest version of Microsoft Direct x 9 SDK,can I use it with Visual C++ to compile programs?
The directX SDK is a native library and most use C++ to code against it so yes. You can use COMinterop to use .NET and it's pretty good for the non-chatty interfaces (their might even be a publilshed .NET wrapper). But abosolutely you can use VS6 and C++.
Reply:Visual Studio 6 is fine, C++ will be the fastest executing language for this task. Or you can use .Net, DirectX now provide MDX, a managed directX that you can use from a .Net language (like C# or VB.Net). Or there's XNA, the latest .Net DirectX wrapper.


Any good references for using Visual Studio 2003 and .Net Framework 2.0 together.?

I work for a company and we currently develop software using Visual Studio 2003 on the Microsoft .Net Framework version 1.1





I have been tasked to look at a Content Management System written in C# but runs on the .Net Framework version 2.0. I know that I can have both frameworks installed on the same machine. What I would like to know is what I would need to be able to develop applications (in case we need to make any modifications to the CMS package) using Visual Studio 2003 for the .Net 2.0 framework. Any good websites or whitepapers or anything similar would be appreciated.





Thanks in anticipation.....

Any good references for using Visual Studio 2003 and .Net Framework 2.0 together.?
From everything I have seen you can't. Even on the MSDN library it claims that to work with a certain version of the framework you have to get the corresponding Visual studio. This doesn't mean that you can't create a project in the 1.1 version and not have it run in 2.0, it is saying that the actual development environment is hard wired to a specific version.





To create 2.0 framework applications you need visual studio 2005. However the .NET 2.0 framework should be able to run programs written for the 1.1 because it is backwards compatible.





I could find no official white papers, but people on and off the MSDN forums have said that each visual studio is tied to a version of the .NET framework. One report even said the 2003 debugger crashes when encountering the .NET 2.0 framework by accident. (There was a fix for it)





So it is pretty safe to say that if you want to develop in 2.0 that you will need 2005. Better hurry, I believe the free download expires this month.





Hope this helps!

radiata

How do I read a BYTE [not a sector] from a CD, preferably in C++?

I do apologize for having to include this in my question, but because the programming section is usually plagued full of slackers, pranksters, embeciles, and just plain ignorant individuals that interfere with those of us that wish to use this sub-site as a learning tool, it must be included: Please READ the darn question before you answer it. Please give an INTELLIGENT answer, not Huh? wot? I dunno, etc. ... Please PAY attention Do not give me code for VB5 under WinNT, DJCPP, or GCC on Linux, when all you had to DO was READ the whole question to realize I do not want that particular information. Thank you all for letting me speak my piece. Now on to the rest of myt question. I can use code in VC6, Visual C++ 2005, and Visual C# 2005. Managed / .NET is acceptable as well. I can use code for any Win32 OS. However, I do NOT do VB6, VB.NET, .VBS, Linux or any code developed for a Non-Microsoft OS. Thanks for all the help.

How do I read a BYTE [not a sector] from a CD, preferably in C++?
Hmmm, I never tried that, but assuming the byte is in a known file, I would think you could just open the file (same as on your hard drive), and read it out as characters. You would most likely have to open it as read (not write or read/write). Thats what I would try first.
Reply:It really won't matter which language you use, you are probably going to have to do a lot of low level OS interfacing, because reading at that level potentially violates a lot of OS protections that have been put in place to keep random programs from reading and writing random bytes to random positions your IO devices. Its just like reading from the 1537614th byte from your NTFS filesystem... you're supposed to be interfacing with the filesystem at the conceptual filesystem level, not the byte level, and its a good thing that most programs cannot.





BTW, VB.NET is easily translated to C# so even if you had a VB.NET solution, you probably could find something that would automatically translate it to C#. But I really doubt you'd find either.





CD's, Hard disks, etc, all read in blocks of data at one time so, like G. Whilikers said, even if you read in one byte, at some place in your memory the CD reader has read in the whole 512 bytes... so if you have code to read in the sector, the're really no other way to do it. Just pick the specific byte you need from that sector block.
Reply:Either find a way to treat the disk as an i/o stream, or grit your teeth and read the sector then pick up the byte you want. Even if you had a getSpecificByteFromCD() function available, underneath it's going to be reading the whole sector behind your back anyway.