10 Replies - 1791 Views - Last Post: 20 January 2010 - 07:59 AM Rate Topic: -----

#1 prog11  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 20-January 10

vb6 making a signal for users

Post icon  Posted 20 January 2010 - 12:29 AM

Hi,

I have a program in VB6 which is used by several users. How to appear a signal or a messagebox on some users screen when another user of the program inserts a new data into the program?
I'm beginner, please help on the simpliest way.
Thanks
Is This A Good Question/Topic? 0
  • +

Replies To: vb6 making a signal for users

#2 RobC  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 24-March 07

Re: vb6 making a signal for users

Posted 20 January 2010 - 01:30 AM

You probably should provide a wee bit more information.
I am guessing your Data Base(s) is on a server ?
Presumably there are many tables and fields.
Do you wish every user to be told every time any field, in any table, is updated ?
Do you wish to display where and what was changed, or just tell the other users 'look out, it has had changes'.
You say 'on some users screens', does that mean some users will not be told ?
Do you already have the logic to detect the changes, and you just wish a guide as to how to pop up the message ?
Or do you need help, detecting the changes as well ?

Regards,
Rob

This post has been edited by RobC: 20 January 2010 - 01:33 AM

Was This Post Helpful? 0
  • +
  • -

#3 prog11  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 20-January 10

Re: vb6 making a signal for users

Posted 20 January 2010 - 02:26 AM

View PostRobC, on 20 Jan, 2010 - 12:30 AM, said:

You probably should provide a wee bit more information.
I am guessing your Data Base(s) is on a server ?
Presumably there are many tables and fields.
Do you wish every user to be told every time any field, in any table, is updated ?
Do you wish to display where and what was changed, or just tell the other users 'look out, it has had changes'.
You say 'on some users screens', does that mean some users will not be told ?
Do you already have the logic to detect the changes, and you just wish a guide as to how to pop up the message ?
Or do you need help, detecting the changes as well ?

Regards,
Rob


I have my database on the server. One user is saving data about documents to a table and adds permissions for other users,who can see this and who not. For this I have a table where the user saves the data and a permission table.
When this user saves a new data to the table, the other users who got permissions to see, have to get a message. It is enough just to get a warning message.
Regards
Was This Post Helpful? 0
  • +
  • -

#4 RobC  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 24-March 07

Re: vb6 making a signal for users

Posted 20 January 2010 - 02:57 AM

I have my database on the server. One user is saving data about documents to a table and adds permissions for other users,who can see this and who not. For this I have a table where the user saves the data and a permission table.
When this user saves a new data to the table, the other users who got permissions to see, have to get a message. It is enough just to get a warning message.
Regards
[/quote]

You could have a Timer in your program.
The program would know who is logged in, so the timer event would check to see if there is a document that he can view.
If so the program can display an alert (we can work out the best display when you give more info on that).
If the user only views it once, then the ID can be deleted (to prevent false repeat alerts).
If you wish the permission to remain, so that valid users can view repeatedly, then you need some flag or Time Stamp, so that your program knows not to keep nagging about a document that the user has already viewed.
Was This Post Helpful? 0
  • +
  • -

#5 prog11  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 20-January 10

Re: vb6 making a signal for users

Posted 20 January 2010 - 03:05 AM

You could have a Timer in your program.
The program would know who is logged in, so the timer event would check to see if there is a document that he can view.
If so the program can display an alert (we can work out the best display when you give more info on that).
If the user only views it once, then the ID can be deleted (to prevent false repeat alerts).
If you wish the permission to remain, so that valid users can view repeatedly, then you need some flag or Time Stamp, so that your program knows not to keep nagging about a document that the user has already viewed.
[/quote]


Thanks for your help. I will look after the Timer function, and try this solution.
Was This Post Helpful? 0
  • +
  • -

#6 prog11  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 20-January 10

Re: vb6 making a signal for users

Posted 20 January 2010 - 04:28 AM

When the main user adds a new document (a new record in the main table) and chooses the users, then in the permission table in a new colomn I would write "yes" for thoose users who got permission.
The program could run continously on every users PC.
The program could appear on the taskbar blinking, when a user have "yes" in that colomn of the table. When the user clicks on it then I would modify his state for "no".

Is this idea executable? Is it possible to appear the program on the taskbar and to make it blinking, like when you get a new message on skype?
Was This Post Helpful? 0
  • +
  • -

#7 RobC  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 24-March 07

Re: vb6 making a signal for users

Posted 20 January 2010 - 05:28 AM

If you change Yes to No, that would prevent the user from coming back later to have another view of that document. Is that a problem ?. Or are we talking about a separate field for the Yes/No, and there is still another field saying he has permission to view.

The alerting can be done a variety of ways.
It is possible to 'flash' the Taskbar button
You have to take into consideration that the user may have it minimized, or maximized (normal), and may be in other forms within the program.
Also we should consider whether you are using VBModal or not, to display your Forms.
I can give you the link to a program, that can be built into your program.
It can create an alert window that appears bottom right (or other locations), similar to the alerts used by some commercial programs.
It can rise up and down, or fade in and out.
Was This Post Helpful? 0
  • +
  • -

#8 prog11  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 20-January 10

Re: vb6 making a signal for users

Posted 20 January 2010 - 05:40 AM

The alerting can be done a variety of ways.
It is possible to 'flash' the Taskbar button
You have to take into consideration that the user may have it minimized, or maximized (normal), and may be in other forms within the program.
Also we should consider whether you are using VBModal or not, to display your Forms.
I can give you the link to a program, that can be built into your program.
It can create an alert window that appears bottom right (or other locations), similar to the alerts used by some commercial programs.
It can rise up and down, or fade in and out.
[/quote]



I use VBModal in the program.
I would appriciate if you could give me the link to the program which creates alert windows.
Was This Post Helpful? 0
  • +
  • -

#9 RobC  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 24-March 07

Re: vb6 making a signal for users

Posted 20 January 2010 - 07:23 AM

Here you go -

http://www.planet-so...p...93&lngWId=1
Was This Post Helpful? 0
  • +
  • -

#10 vb5prgrmr  Icon User is offline

  • D.I.C Lover

Reputation: 109
  • View blog
  • Posts: 1,016
  • Joined: 21-March 09

Re: vb6 making a signal for users

Posted 20 January 2010 - 07:25 AM

All of that can be handled by the locking scheme you choose when you open a connection. Optimistic or Pessimistic locking and it would be better to use the SQL Update and Insert statement over update and addnew, which is even better than using the data controls.

So in short, if you program it right, you don't need to show any user what another user is doing, you only have to check the data integrity by making sure you have a fresh copy of the data...


Good Luck
Was This Post Helpful? 1

#11 prog11  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 20-January 10

Re: vb6 making a signal for users

Posted 20 January 2010 - 07:59 AM

I have just found this site on the net while I was searching earlier. The code is grate.
Thanks a lot for your help.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1