Previous in Forum: Automatic Restarts in Windows 7   Next in Forum: Dell Dock Problem - Inspiron 1545
Close
Close
Close
6 comments
Rate Comments: Nested
Anonymous Poster

Help Needed Regarding Visual Basic Forms

05/06/2010 9:52 PM

Hello fellow engineers,

I've recently developed a text messaging application that consists of a front-end (coded in Visual Basic) and a back-end (coded in C) but I have one slight problem - I need to know if there's a way of launching the form from the command prompt. This is important because I don't want my clients to see the source code or the development environment at all, they must just see the form.

If I can launch it from the command prompt I can then write a script / batch file and pin it to the start menu so that it launches automatically at boot time. Thanks in advance.

Limpho Mothae,

Pretoria, South Africa.

Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Guru
Engineering Fields - Electromechanical Engineering - Technical Services Manager Canada - Member - Army brat Popular Science - Cosmology - What is Time and what is Energy? Technical Fields - Architecture - Draftsperson Hobbies - RC Aircraft - New Member

Join Date: Sep 2006
Location: Clive, Alberta, Canada
Posts: 5916
Good Answers: 204
#1

Re: Help Needed Regarding Visual Basic Forms

05/07/2010 11:09 PM

Is this a windows target environment?

Which version of VB are you using?

How is the VB app engaging the C app? Are they separate executables?

If you have compiled each app to .exe, I don't see that any regular user can see your source code??

Why have you coded the "back end" in C? (do you mean something like C++ ?)

Perhaps you should do the whole thing in a single Visual C++ app or C# or something.

Chris

Reply
Guru

Join Date: Apr 2010
Location: About 4000 miles from the center of the earth (+/-100 mi)
Posts: 9910
Good Answers: 1141
#2
In reply to #1

Re: Help Needed Regarding Visual Basic Forms

05/08/2010 4:05 PM

I can understand why he would want to use visual basic for the GUI. It is much easier to use than visual C++. I'm thinking maybe the C part can be compiled as a DLL and the visual basic can include it as a library. If the visual basic can be compiled as an EXE file then the source code shouldn't be accessible.

Reply
Anonymous Poster
#3
In reply to #2

Re: Help Needed Regarding Visual Basic Forms

05/10/2010 9:55 AM

"It is much easier to use than visual C++." Uh, no it is not. What he needs to do is learn his IDE.

Reply
Anonymous Poster
#4
In reply to #2

Re: Help Needed Regarding Visual Basic Forms

05/10/2010 10:54 AM

Hi guys, thanks for your feedback. Actually, I've no trouble concealing the back-end source code as it's invoked via the front end as in,

Call Shell("CMD /c textv2.exe", vbNormalFocus),

where textv2.exe is the executable file created using C code. The GUI is just there to make it 'user-friendly'. The textv2.exe executable is invoked via a command button in the GUI.

The real challenge that I have is to make only the 'form' visible to users as they've no need to see anything else but so far it looks as though it's impossible to launch the form (or GUI) alone. Having said that, perhaps I should add that my command of VB is average since I only learnt what I needed to learn to make my app have a nice look and feel :-) so I'm sure there's a way to accomplish that. Btw, I think it'd be very helpful to compile the VB code as a binary file @ Rixter so I'm definitely gonna look into that. Cheers guys.

Limpho Mothae

Reply
Guru
Engineering Fields - Electromechanical Engineering - Technical Services Manager Canada - Member - Army brat Popular Science - Cosmology - What is Time and what is Energy? Technical Fields - Architecture - Draftsperson Hobbies - RC Aircraft - New Member

Join Date: Sep 2006
Location: Clive, Alberta, Canada
Posts: 5916
Good Answers: 204
#5
In reply to #4

Re: Help Needed Regarding Visual Basic Forms

05/10/2010 11:34 AM

I think if you look into your MSDN docs & samples, you will see that there are sample vb apps that do what you want. One thing I'm thinking of is the splash screen that comes up first, and then calls the form you want to load (as the main form, but if you have more than one form, you can call which ever one you want I think)

I'm reasonably sure that you can do this in a single app, and compile the whole thing to exe, unless you are actually working with some form of vba? (excel, word, etc.)

I'm certain that in vb, you can create an executable, which will be binary. That doesn't make it crack-proof though. In windows, nothing is crack proof, because all applications have to interact with the OS, and the hackers have apps that capture every message back and forth between the app and the OS. that is the keys to the kingdom.

my favourite help site is called www.vb-helper.com

Chris

Reply
Anonymous Poster
#6
In reply to #5

Re: Help Needed Regarding Visual Basic Forms

05/10/2010 6:30 PM

Thanks Chris, that's very helpful. You guys are amazing :-) Cheers.

Limpho

Reply
Reply to Forum Thread 6 comments
Copy to Clipboard

Users who posted comments:

Anonymous Poster (3); chrisg288 (2); Rixter (1)

Previous in Forum: Automatic Restarts in Windows 7   Next in Forum: Dell Dock Problem - Inspiron 1545

Advertisement