Home > Archive > Visual Basic Syntax > March 2005 > communication and instances
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
communication and instances
|
|
| sentinel 2005-02-15, 9:01 am |
| I have one application that is a logon manager
it collects name of the user currently logged on the windows and then
it asks for a password (different one from the logon)
when clicked login the app connects to mysql and authenticates the user
for running applications
if everything is ok it stores username into first variable and user
rights into second variable
my problem starts here:
i vahe another application that when starting must ask first
application weather currently logged on user can start it or not? (this
is in order not to enter username or password when every app is started
(there are 6 for now...))
the second question is: how to prevent multiple instances of the
application?
Thanks
| |
| Ken Halter 2005-03-01, 3:59 am |
| "sentinel" <support@elma.hr> wrote in message
news:xn0dyj7i38vadg000@news.t-com.hr...
>I have one application that is a logon manager
> it collects name of the user currently logged on the windows and then
> it asks for a password (different one from the logon)
> when clicked login the app connects to mysql and authenticates the user
> for running applications
> if everything is ok it stores username into first variable and user
> rights into second variable
>
> my problem starts here:
>
> i vahe another application that when starting must ask first
> application weather currently logged on user can start it or not? (this
> is in order not to enter username or password when every app is started
> (there are 6 for now...))
>
There are quite a few ways to get apps to communicate.... but, it's starting
to sound like you'd be better off writing one app as a Standard EXE and turn
the rest into DLLs. If you did that, you wouldn't need to worry about a user
just double clicking on one of them, out of order. They'd be under the
control of the single Standard EXE so you'd be in full control over what the
user sees and has available to them.
>
> the second question is: how to prevent multiple instances of the
> application?
For the basics, check out the App.PrevInstance property.
>
> Thanks
--
Ken Halter - MS-MVP-VB - http://www.vbsight.com
Please keep all discussions in the groups..
| |
| sentinel 2005-03-01, 9:00 am |
| Ken Halter wrote:
[color=darkred]
> "sentinel" <support@elma.hr> wrote in message
> news:xn0dyj7i38vadg000@news.t-com.hr...
>
> There are quite a few ways to get apps to communicate.... but, it's
> starting to sound like you'd be better off writing one app as a
> Standard EXE and turn the rest into DLLs. If you did that, you
> wouldn't need to worry about a user just double clicking on one of
> them, out of order. They'd be under the control of the single
> Standard EXE so you'd be in full control over what the user sees and
> has available to them.
>
>
> For the basics, check out the App.PrevInstance property.
>
i tryed that... but i could never figure out how to raise events
i do define an event (eg. LoginSuccess)
and when login form does all the nessecery things it should raise that
event with
raiseevent LoginSuccess
the exe should now check if login was successful or not and enable all
options from the menu if successful or exit unsuccessful
the problem is that in step by step mode i can see that the event is
risen from within the dll but the code in exe (event code) is never
executed - and the dll is referenced withevents
this bothered me for a while and now it is time to solve the problem
one way or the other
Tomislav
|
|
|
|
|