|
-
Apr 6th, 2008, 02:04 AM
#1
Thread Starter
New Member
Desing VB GUI for a C .exe file
Hi all,
I have a project which required the algorithm to be developed using C.
As youll knw designing a GUI in c can be tedious, but i heard from a friend of mine a GUI can be developed in VB and communicate with the c .exe file.
However, after hours of search in the net i couldn't find anything. can anyone of you guys/girls help me.
Best of regards
-
Apr 6th, 2008, 02:57 AM
#2
Frenzied Member
Re: Desing VB GUI for a C .exe file
friend of mine a GUI can be developed in VB and communicate with the c .exe file.
Doubt about this. It would be possible , but wont be easy and neat as done using either vb or C.
Cant you develop the Algorithm in VB?
Or develop the whole app using GUI friendly version of C.
(VC++ or C#) ?
If you give some idea about this algorithm, may be someone would give you a better solution.
-
Apr 6th, 2008, 03:09 AM
#3
Re: Desing VB GUI for a C .exe file
You can access Methods in C DLL files from VB (as long as they've been designed correctly) Perhaps that was what your friend was thinking about.
-
Apr 6th, 2008, 03:14 AM
#4
Re: Desing VB GUI for a C .exe file
Yes, and instead of a C exe you do it all in dlls so its just interfacing withthe exposed functions, methods and properties etc.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 6th, 2008, 03:35 AM
#5
-
Apr 6th, 2008, 04:12 AM
#6
Re: Desing VB GUI for a C .exe file
Well he can still use a C exe but passing messages back and forth is more work then having a dll instead. There is no real reason to use a C exe though if this is the proposed design.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 6th, 2008, 08:53 AM
#7
-
Apr 6th, 2008, 12:24 PM
#8
Thread Starter
New Member
Re: Desing VB GUI for a C .exe file
Thx guys,
I really appreciate your replies.
Although i have not done it i will look into how to create .dll and use it
Anyway, For my project we are to design the application in C, however i though it would get me more marks if i design a GUI. From what i understand designing a GUI in C is quite hard. so thats why i wanted to look at how VB could help me out. Anyway THx again guys. If u have any more suggestion pls to post it, i surely appreciate it
-
Apr 8th, 2008, 06:41 AM
#9
Re: Desing VB GUI for a C .exe file
An alternative would be to have the VB interface capture the stdin and stdout streams of the existing C app and have the VB app impersonate a person at the keyboard. Actually this is very easy and has the added bonus that you don't have to alter the C application at all.
In VB, use the Windows API to locate and start the C app, then capture its IO streams. From that point on all you have to do is write strings to the stdin stream of the C app and then listen for the C app's responses on its stdout stream. This pretty much makes the VB app a dumb-terminal, all the clever stuff is handled by the existing C app.
From a coding point of view the only tricky bit is actually capturing the streams to start with. Once that's done its basically just impersonating what the user would type if he was using the C app physically with a keyboard.
A lot of unix system tools have this kind of relationship with their optional GUI. Basically it means that you can have one standard C app and then you can use it with or without the GUI, depending on your needs. No configuration outside the apps is required.
All of this is straightforward to do in VB6.
This approach is sometimes adopted when the C app is intended for use on more than one platform and/or is old and not easily reworked. It's actually quite similar to client/server programming but with a single user instead of many.
Last edited by wossname; Apr 8th, 2008 at 06:51 AM.
I don't live here any more.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|