Solved

microsoft exchange server/outlook/VB

Posted on 1998-06-01
8
180 Views
Last Modified: 2010-05-03
Have you ever used Microsoft Outlook? If yes, then here is the question : if you open tasks in outlook, a spread sheet will open with a header column and if you click on one of the rows, an assign task window will open. i want to incorporate the same in to my VB application. can somebody please direct me as to how to go about it? intially i am giving 50 points, but i can increase the points accordingly.
thanks in advance,
vmano.
0
Comment
Question by:vmano
  • 4
  • 3
8 Comments
 
LVL 5

Accepted Solution

by:
bin_huwairib earned 50 total points
ID: 1462241
vmano,

vmano,

Basically Task spreadsheet is a special control but you can do something similar to it using List View control with LVS_EX_GRIDLINES and LVS_EX_CHECKBOXES extended styles and use the List View's DblClick to activate the Task details form.

Example
=======
Private Const LVM_FIRST = &H1000
Private Const LVM_SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 54
Private Const LVM_GETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 55
Private Const LVS_EX_GRIDLINES = &H1
Private Const LVS_EX_CHECKBOXES = &H4

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal lpMsg As Long, ByVal dwParam As Long, ByVal lpParam As Long) As Long

Private Function LVXCheckBoxes(lvw As ListView, bMode As Boolean) As Boolean
 Dim X As Long, dwStyle As Long
 
 LVXCheckBoxes = True
 dwStyle = SendMessage(lvw.hWnd, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0)
 If bMode Then
  dwStyle = dwStyle Or LVS_EX_CHECKBOXES
 Else
  dwStyle = dwStyle Xor LVS_EX_CHECKBOXES
 End If
 X = SendMessage(lvw.hWnd, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle)
End Function

Private Function LVXGridLines(lvw As ListView, bMode As Boolean) As Boolean
 Dim X As Long, dwStyle As Long
 
 LVXGridLines = True
 dwStyle = SendMessage(lvw.hWnd, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0)
 If bMode Then
  dwStyle = dwStyle Or LVS_EX_GRIDLINES
 Else
  dwStyle = dwStyle Xor LVS_EX_GRIDLINES
 End If
 X = SendMessage(lvw.hWnd, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle)
End Function

Private Sub Form_Load()
 ListView1.ColumnHeaders.Add , , " ", 10
 ListView1.ColumnHeaders.Add , , "Subject", ListView1.Width / 2
 ListView1.ColumnHeaders.Add , , "Due Date", ListView1.Width / 2
 LVXGridLines ListView1, True
 LVXCheckBoxes ListView1, True
End Sub

Private Sub ListView1_DblClick()
 Form2.Show
End Sub


Best regards
Bin Huwairib
0
 
LVL 3

Author Comment

by:vmano
ID: 1462242
i am very sorry to say that your code is not at all working. do i have to do anything else other than your code? please respond.
thanks,
vmano
0
 
LVL 5

Expert Comment

by:bin_huwairib
ID: 1462243
How it is not working? do you get any error message? please explain more.

Bin Huwairib
0
 
LVL 3

Author Comment

by:vmano
ID: 1462244
i did put a listview control on my form and and also your code accordingly. when i run it, it just don't do anything except for a blank list view on the form. no error messages also. please let me know if you want more info.
thanks for responding,
vmano.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 3

Author Comment

by:vmano
ID: 1462245
OK. let me rephrase the question.
i am developing a case management system and are trying to integrate the user interface to include a view of a users outlook tasks in our main window. i would like to find an ocx or something to use to connect to the exchange server without making our users open outlook.
hope this is much more clear as to what i am looking for.
thanks in advance,
vmano


0
 
LVL 5

Expert Comment

by:bin_huwairib
ID: 1462246
vmano,

Replace Form_Load sub with the following:

Private Sub Form_Load()
 ListView1.View = lvwReport
 ListView1.ColumnHeaders.Add , , " ", 10
 ListView1.ColumnHeaders.Add , , "Subject", ListView1.Width / 2
 ListView1.ColumnHeaders.Add , , "Due Date", ListView1.Width / 2
 LVXGridLines ListView1, True
 LVXCheckBoxes ListView1, True
End Sub

Bin Huwairib
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1462247
Bought This Question.
0
 
LVL 3

Author Comment

by:vmano
ID: 1462248
MirkWood,
What is this all about "BUYING"? Can you tell me more about this buying questions?

vmano
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now