Previous in Forum: VPN Latency Problem   Next in Forum: Code Comedy
Close
Close
Close
9 comments
Rate Comments: Nested
Participant

Join Date: May 2010
Posts: 2

Help Needed Urgently! How do I Create a Front End in VB for a C Code?

05/15/2010 9:05 AM

Can I build a GUI using Visual Basic for a C program? I need a dynamic GUI, i.e. when the user gives an input as 5 in the GUI there should be 5 text boxes displayed for the next set of inputs, if input is 6, 6 text boxes should be shown.

So the control should shift between VB and the C code several times. The input is requested from the user around 8 times and ultimately the output needs to be displayed on VB.

My C code is ready and now i need to build a GUI for this as a front end. I need to submit my project within 4 days so please please somebody help me out of this. I will be very thankful to you guys. Thanks a lot.

__________________
Mithun
Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Anonymous Poster
#1

Re: HELP NEEDED URGENTLY !! How do i create a front end in VB for a C code?

05/15/2010 9:41 AM

You might find your answer here but sites that specialize in software might be a better place to look. Also, Google Groups is a good resource.

Register to Reply
Participant

Join Date: May 2010
Posts: 2
#2

Re: HELP NEEDED URGENTLY !! How do i create a front end in VB for a C code?

05/15/2010 10:10 AM

thank u lots... may i knw any such forum pls?

__________________
Mithun
Register to Reply
Guru

Join Date: Jan 2010
Posts: 2446
Good Answers: 60
#3

Re: HELP NEEDED URGENTLY !! How do I Create a Front End in VB for a C Code?

05/15/2010 2:39 PM
Register to Reply
Power-User
Hobbies - Automotive Performance - New Member Hobbies - CNC - New Member

Join Date: Jun 2008
Location: Long Island, NY
Posts: 326
Good Answers: 1
#4

Re: HELP NEEDED URGENTLY !! How do I Create a Front End in VB for a C Code?

06/01/2010 7:06 PM

You can build a GUI using C.. no need for VB... check this out http://www.winprog.org/tutorial/

__________________
It is better to fail in originality than to succeed in imitation.
Register to Reply
Active Contributor

Join Date: Jun 2010
Location: Move between Pakistan, Singapore, UK, and Canada
Posts: 13
Good Answers: 1
#5

Re: HELP NEEDED URGENTLY !! How do I Create a Front End in VB for a C Code?

06/30/2010 12:58 AM

I bet this would be irrelevant for you now (since you just had 4 days) but you would need to use COM (component object model) For that your C dll will be a COM object will be used by the VB front end and can be referenced inside the VB project. You could use early or late binding depending on your exact requirements. But anyway, try MSDN to learn more about COM, and Microsoft actually have a step by step guide to that in MSDN

Register to Reply
Power-User
Hobbies - Automotive Performance - New Member Hobbies - CNC - New Member

Join Date: Jun 2008
Location: Long Island, NY
Posts: 326
Good Answers: 1
#6
In reply to #5

Re: HELP NEEDED URGENTLY !! How do I Create a Front End in VB for a C Code?

06/30/2010 1:07 AM

I have also recently found out that you can use C# to access the .NET CLR for all your GUI purposes while retaining your native C code.

__________________
It is better to fail in originality than to succeed in imitation.
Register to Reply
Active Contributor

Join Date: Jun 2010
Location: Move between Pakistan, Singapore, UK, and Canada
Posts: 13
Good Answers: 1
#7
In reply to #6

Re: HELP NEEDED URGENTLY !! How do I Create a Front End in VB for a C Code?

06/30/2010 1:23 AM

He wanted to use un managed C component in VB. Even if you are using C# you would need to generate a COM Interop to reference unmanaged code into the managed part.

Register to Reply
Power-User
Hobbies - Automotive Performance - New Member Hobbies - CNC - New Member

Join Date: Jun 2008
Location: Long Island, NY
Posts: 326
Good Answers: 1
#8
In reply to #7

Re: HELP NEEDED URGENTLY !! How do I Create a Front End in VB for a C Code?

06/30/2010 1:39 AM

Yes, once you have created your dll in C, all you have to do is use extern "C

__________________
It is better to fail in originality than to succeed in imitation.
Register to Reply
Power-User
Hobbies - Automotive Performance - New Member Hobbies - CNC - New Member

Join Date: Jun 2008
Location: Long Island, NY
Posts: 326
Good Answers: 1
#9
In reply to #7

Re: HELP NEEDED URGENTLY !! How do I Create a Front End in VB for a C Code?

06/30/2010 1:46 AM

I am sure you are already familiar with this but you may refer to the following website.. http://www.etro.vub.ac.be/Personal/bjansen/dlls/interfacing.html#cdll

__________________
It is better to fail in originality than to succeed in imitation.
Register to Reply
Register to Reply 9 comments
Copy to Clipboard

Users who posted comments:

Anonymous Poster (1); Economist (4); myth_terry (1); peterg7lyq (1); SimS (2)

Previous in Forum: VPN Latency Problem   Next in Forum: Code Comedy

Advertisement