Solved

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

Posted on 2004-10-07
3
334 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 49

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 49

Expert Comment

by:Ryan Chong
ID: 12256135
Sure and glad could make help here, cheers 8-)
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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

747 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

9 Experts available now in Live!

Get 1:1 Help Now