Results 1 to 5 of 5

Thread: where are the gurus, who can help me????

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    chicago (hope)
    Posts
    146
    ok...

    once again.

    1. how to resort a mshflexgrid by a col?

    if i click on "name" the flexgrid resorts with ascending names.
    and if i click on city the flexgrid resorts with ascending cities.

    2. how to open the default email-prog, when the user clickes on a label in my app, where a e-mail adress is shown.?

    thanx in advance, me

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    Sure thing. MsFlexGrid allows you to sort data very quickly.
    Code:
    Private Sub Form_Load()
        Dim intCol As Integer
        Dim intRow As Integer
        
        With MSFlexGrid1
            .Cols = 5
            .Rows = 10
            
            For intCol = 0 To .Cols - 1
                For intRow = 1 To .Rows - 1
                    If intRow = 1 Then .TextMatrix(0, intCol) = "Header" & intCol + 1
                    .TextMatrix(intRow, intCol) = intRow & intCol
                Next
            Next
        End With
    End Sub
    
    
    Private Sub MSFlexGrid1_Click()
        Static blnAscend As Boolean
        Dim intSortOrder As Integer
        
        
        
        If blnAscend Then
            intSortOrder = flexSortGenericAscending
        Else
            intSortOrder = flexSortGenericDescending
        End If
        
        With MSFlexGrid1
            .Col = .Cols - 1
            .Sort = intSortOrder
        End With
        
        blnAscend = Not blnAscend
    End Sub

  3. #3
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177
    To open the Default email application with an address filled in use the ShellExecute() API, i.e.
    Code:
    Private 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
    
    Private Sub Form_Load()
        Label1 = "[email protected]"
    End Sub
    
    Private Sub Label1_Click()
        ShellExecute 0, "OPEN", "mailto:" & Label1, "", "", 1
    End Sub

  4. #4
    Guest
    Here is how to send email and also put text in the TO: SUBJECT: and BODY:.

    Code:
    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 Const SW_SHOWNORMAL = 1
    
    Private Sub Label1_Click()
    ShellExecute Me.hwnd, vbNullString, "mailto:[email protected],[email protected][email protected]&subject=whatever&body=your text", vbNullString, "c:\", SW_SHOWNORMAL
    End Sub

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    chicago (hope)
    Posts
    146

    malfunction?

    always, when col <> colsel then vb shows a error message.

    WHY



    [Edited by vbAlex on 09-08-2000 at 07:31 AM]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width