Solved

how to put hyperlinks in a grid(flex/hflexgrid)?

Posted on 2004-10-07
3
338 Views
Last Modified: 2008-01-09
Is there any way to how to put hyperlinks in a grid(flex/hflexgrid)?
0
Comment
Question by:sonashish
  • 2
3 Comments
 
LVL 50

Accepted Solution

by:
Ryan Chong earned 50 total points
ID: 12246408
Try customize below, example using MSFlexGrid:

Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Public Function StartDoc(ByVal FileName As String, Optional CommandLine As String = "") As Long
    StartDoc = ShellExecute(0&, "Open", FileName, CommandLine, vbNullString, 1)
End Function

Private Sub Form_Load()
    MSFlexGrid1.Cols = 3
    MSFlexGrid1.Rows = 5
    MSFlexGrid1.FixedCols = 1
    MSFlexGrid1.FixedRows = 1
   
    For i = 1 To 4
        MSFlexGrid1.TextMatrix(i, 1) = "Item " & i
        MSFlexGrid1.Row = i
        MSFlexGrid1.col = 2
        MSFlexGrid1.CellForeColor = vbBlue
        MSFlexGrid1.CellFontUnderline = True
    Next i
   
    MSFlexGrid1.ColWidth(1) = 1000
    MSFlexGrid1.ColWidth(2) = 2500
   
    MSFlexGrid1.TextMatrix(1, 2) = "http://www.yahoo.com"
    MSFlexGrid1.TextMatrix(2, 2) = "http://www.google.com"
    MSFlexGrid1.TextMatrix(3, 2) = "http://www.experts-exchange.com"
    MSFlexGrid1.TextMatrix(4, 2) = "http://www.download.com"
   
End Sub

Private Sub MSFlexGrid1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
    If MSFlexGrid1.col = 2 Then
        StartDoc MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, MSFlexGrid1.col)
    End If
End Sub
0
 
LVL 2

Author Comment

by:sonashish
ID: 12256130
ryancys

This is an excellent solution. I am giving you full point.

Just for FYI, following I need to mention in a module(nas file)

Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Everything is working perfectly, as I am looking for.
0
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 12256135
Sure and glad could make help here, cheers 8-)
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

777 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