7 Replies - 7129 Views - Last Post: 20 October 2010 - 04:53 AM Rate Topic: -----

#1 kayla23  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 28
  • Joined: 19-October 10

convert java into c#

Posted 19 October 2010 - 11:17 AM

Hi guys first of all i am newbie here so please go easy on me

Ok my question is i am at school and my teacher gave us an assignment which we meant to convert this program that current runs on java which is an image where the user use the mouse to zoom into d image runs on java as a html

now we need to convert it into c# i dnt know anything about java or c# sharp so got a begginers book on c# which is Beginning
Microsoft® Visual C#® 2008
Karli Watson and others

now the problems is due on a week an gone tru i've been learning if statment switch and loops but i am thinking bt the time i go tru d book i will not be able to create a image that uses the mouse to zoom in the image so does anyone know what would be the quickest way for me to be able to do this program?? i mean what should i try to concentrate in learning to be able to achive on time?? i could upload the current java program if anyone interest in seing bt i gt learn how to do it in c# myself

Is This A Good Question/Topic? 0
  • +

Replies To: convert java into c#

#2 Curtis Rutland  Icon User is offline

  • (╯°□°)╯︵ (~ .o.)~
  • member icon


Reputation: 5101
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: convert java into c#

Posted 19 October 2010 - 11:23 AM

So what about your textbook for the class? Have you talked to your professor about the assignment and told him what you don't understand?

How is it that you have a class assignment that involves both C# and Java, and yet you "dont know anything about java or c#?" Surely your class covered how to do this, right? Have you gone back over your notes?

Regardless, here are some things to read:

PictureBox control
MouseWheel event
Was This Post Helpful? 1
  • +
  • -

#3 tlhIn`toq  Icon User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6504
  • View blog
  • Posts: 14,355
  • Joined: 02-June 10

Re: convert java into c#

Posted 19 October 2010 - 11:29 AM

I doubt that a class assignment like this was given without the Java and C# material being covered. I think what you are really saying is that you didn't bother to pay attention to those topics and now you're fraked and need someone to save your butt.


Also, dis not b d'hood dawg... You are not here texting your high school posse to come to your kegger after their shift at Taco Bell. You are here asking for help from senior coding professionals who graciously donate their valuable time to helping the next generation of coders with their chosen craft. Please try to show them, yourself and the industry some respect by writing at least at an eighth grade level. (IE: English not ebonics or SMS, real words, punctuation and so on)

If you can't take your own problem/question seriously enough to write like an adult, then why would you expect anyone else to take it seriously?
Was This Post Helpful? 0
  • +
  • -

#4 kayla23  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 28
  • Joined: 19-October 10

Re: convert java into c#

Posted 19 October 2010 - 11:44 AM

Hi i appreciate your comment no i have not done java in the past as i just moved into this course on my previous course i was learning other languages such as c++ and php and yes he does help us but unfortunally my opinion is not the best tutor so it is hard to learn from him that is why i have been trying to learn from the book and online video tutorials and yes he mention if you do not know java then you just have to learn the c# and you should be able to create a c# code that will do the job.

As tlhIn'toq I will definetly take on board what you said but you got understand for a next generation of coders there is a beginner advance and expert stage for everyone just like you were a beginner in the past had no intention in offend you.
Was This Post Helpful? 0
  • +
  • -

#5 Curtis Rutland  Icon User is offline

  • (╯°□°)╯︵ (~ .o.)~
  • member icon


Reputation: 5101
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: convert java into c#

Posted 19 October 2010 - 11:54 AM

Well, for future reference, this is the kind of thing you should have come to the forums about weeks ago. If you're just now learning about control structures like switches and loops, and you're expected to turn in a project with advanced GUI features in a week, it's a bit late for that now. Nobody will simply hand you the code, so you need extra time to learn some things, try them, report back on your success/failure, and have us help refine your work. As it stands, you've got to rush a lot of learning.

Read the links I had in the earlier post, they're the control and event you'll need to familiarize yourself with to do this project. Also, a bit of googling lead me to this codeproject page:
http://www.codeproje...PictureBox.aspx

It's basically the same thing you're going to do. Don't copy it, use it as a model for what you're going to do.
Was This Post Helpful? 0
  • +
  • -

#6 tlhIn`toq  Icon User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6504
  • View blog
  • Posts: 14,355
  • Joined: 02-June 10

Re: convert java into c#

Posted 19 October 2010 - 12:03 PM

View Postkayla23, on 19 October 2010 - 10:44 AM, said:

Hi i appreciate your comment no i have not done java in the past as i just moved into this course on my previous course i was learning other languages such as c++ and php and yes he does help us but unfortunally my opinion is not the best tutor so it is hard to learn from him that is why i have been trying to learn from the book and online video tutorials and yes he mention if you do not know java then you just have to learn the c# and you should be able to create a c# code that will do the job.

As tlhIn'toq I will definetly take on board what you said but you got understand for a next generation of coders there is a beginner advance and expert stage for everyone just like you were a beginner in the past had no intention in offend you.


Did the course not have a pre-requisite? It seems odd that you were even allowed to move into a course that you weren't prepared for. I also agree with InsertAlias that waiting until a week before your project was due was a bad idea.

I totally understand learning to crawl before you can walk. Like many people here I am self taught. Started with BASIC on Commodore computers in the 80's, all the way through to C, C++, Objective-C and C# in today's world. And like many of the folks here I've even tried to help out the next generation with some tutorials.

I am going to guess that you are trying to teach yourself C# without much guidance, a decent book or without knowing where to look. Sometimes just knowing where to look can make all the difference. Google is your friend.
Search with either "C#" or "MSDN" as the first word:
"C# picturebox load image openfiledialog" Its all the key parts of your question
Any new control like a picturebox is fully explained on the MSDN with example code so this works: "MSDN Picturebox"

But honestly, just typing away and seeing what pops up in Intellisense is going to make your self-education take 20 years. You can learn by trying to reverse engineer the language through banging on the keyboard - or you can learn by doing the tutorials and following a good "How to learn C#" book.

May I suggest picking up a basic C# introductory book? It's not that people here don't want to be helpful, but there is a certain amount of basic learning work that one should really take upon themselves before asking for help. There are so many great "How do I build my first application" tutorials on the web... There are dozens of "Learn C# in 21 days", "My first C# program" books at your look book seller or even public library... Asking a forum, any forum, to hand-hold you through it is just redundant. In many ways it disrespects the people who have invested dozens of hours in the on-line tutorials and those that spent thousands of hours in authoring books.

Build a Program Now! in Visual C# by Microsoft Press, ISBN 0-7356-2542-5
is a terrific book that has you build a Windows Forms application, a WPF app, a database application, your own web browser.

C# Cookbooks
Are a great place to get good code, broken down by need, written by coding professionals. You can use the code as-is, but take the time to actually study it. These professionals write in a certain style for a reason developed by years of experience and heartache.

Microsoft Visual Studio Tip, 251 ways to improve your productivity, Microsoft press, ISBN 0-7356-2640-5
Has many, many great, real-world tips that I use all the time.

The tutorials below walk through making an application including inheritance, custom events and custom controls.
Quick and easy custom events
Bulding an application - Part 1
Building an application - Part 2
Working with environmental variables

Writing a text file is always one of the first things people want to do, in order to store data like high-scores, preferences and so on
Writing a text file tutorial.

These are just good every-day references to put in your bookmarks.
MSDN C# Developers Center with tutorials
Welcome to Visual Studio

Have you seen the MSDN Code Samples? They spent a lot of time creating samples and demos. It seems a shame to not use them.

  • Anonymous Delegates: Demonstrates the use of unnamed delegates to reduce application complexity.
  • Arrays: Shows how to use arrays.
  • Attributes: Shows how to create custom attribute classes, use them in code, and query them through reflection.
  • Collection Classes: Shows how to make non-generic collection classes that can be used with the foreach statement.
  • COM Interop Part I: Shows how to use C# to interoperate with COM objects.
  • COM Interop Part II: Shows how to a use a C# server together with a C++ COM client.
  • Commandline: Demonstrates simple command-line processing and array indexing.
  • Condiational Methods: Demonstrates conditional methods, which provide a powerful mechanism by which calls to methods can be included or omitted depending on whether a symbol is defined.
  • Delegates: Shows how delegates are declared, mapped to static and instance methods, and combined into multicast delegates.
  • Events: Shows how to declare, invoke, and configure events in C#.
  • Explicit Interface: Demonstrates how to explicitly implement interface members and how to access those members from interface instances.
  • Generics: Shows how to make generic collection classes that can be used with the foreach statement.
  • Hello World: A Hello World application.
  • Indexers Part I: Shows how C# classes can declare indexers to provide array-like access to objects.
  • Indexers Part II: Shows how to implement a class that uses indexed properties. Indexed properties enable you to use a class that represents an array-like collection.
  • Libraries: Shows how to use compiler options to create a DLL from multiple source files; also, how to use the library in other programs
  • Named and Optional (C# 4.0): Demonstrates Named and Optional parameters, an alternative to method overloads
  • Nullable: Demonstrates value types, such as double and bool, that can be set to null
  • Office Sample (C# 4.0): Demonstrates how Dynamic and COM Interop make it easy to call Microsoft Office in C# 4.0
  • OLEDB: Demonstrates how to use a Microsoft Access database from C# by creating a dataset and adding tables to it.
  • Operator Overloading: Shows how user-defined classes can overload operators
  • Partial Types: Demonstrates how classes and structures can be defined in multiple C# source-code files
  • PInvoke: Shows how to call exported DLL functions from C#
  • Properties: Shows how properties are declared and used; also demonstrates abstract properties
  • Python Sample (C# 4.0): Learn how to call a Python script by using the Dynamic feature in C# 4.0
  • Security: Discusses .NET Framework security and shows how to modify security permissions in C# by using permission classes and permission attributes
  • Simple Variance (C# 4.0): See how Covariance and Contravariance are supported in generic interfaces and delegates
  • Structs: Shows how to use structs in C#.
  • Threading: Demonstrates various thread activities such as creating and executing a thread, synchronizing threads, interacting between threads, and using a thread pool
  • Unsafe: Shows how to use unmanaged code (code that uses pointers) in C#
  • User Conversions: Shows how to define conversions to and from user-defined types
  • Versioning: Demonstrates versioning in C# by using the override and new keywords
  • XML Documents: Shows how to document code by using XML
  • Yield: Demonstrates how to use the yield keyword to filter items in a collection

Was This Post Helpful? 0
  • +
  • -

#7 kayla23  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 28
  • Joined: 19-October 10

Re: convert java into c#

Posted 19 October 2010 - 12:09 PM

Thank you guys you both at least pointed me in the right direction will do my best, which is what i wanted. The reason i did brought this up so late its due to the fact i was trying to learn from my tutor because i thought is an expert and i was sure we would learn enough to make it, but to be honest that didn't happen. which a think alot of tutors these days don't bother make the effort to actually make you understand what you writting but just get you past the course.

Thank you
Was This Post Helpful? 0
  • +
  • -

#8 kayla23  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 28
  • Joined: 19-October 10

Re: convert java into c#

Posted 20 October 2010 - 04:53 AM

Butway my project is convert zoom in fractal.java into a fractal in c sharp don't know if anyone heard of fractal's like i said am new if anyone know good tutorial on that particular type please just point me in the direction?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1