| |

Visual-Basic EinsteigerJa, solche Ausgaben mache ich ständig... | |  | Autor: effeff | Datum: 28.09.05 13:46 |
| Ich benutze zwar nicht das Webbrowser-Control, aber hier ist ein Beispiel, wie du aus deinem FlexGrid die Daten in eine Text-/HTML-Datei einliest und dann per API mit dem Browser anzeigen lassen kannst:
Option Explicit
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
Const SW_SHOWNORMAL = 1
Private Sub Command1_Click()
Dim ff As Integer
Dim Datei As String
Dim Inhalt As String
Dim cols As Integer
Dim rows As Integer
ff = FreeFile
Datei = "d:\test\html_ausgabe_flexgrid.html"
Inhalt = "<html>" & vbCrLf
Inhalt = Inhalt & "<head>" & vbCrLf
Inhalt = Inhalt & "<title>Ausgabe von " & Datei & "</title>" & vbCrLf
Inhalt = Inhalt & "</head>" & vbCrLf
Inhalt = Inhalt & "<body>" & vbCrLf
Inhalt = Inhalt & "<table border=1 cellpadding=0 cellspacing=0>" & vbCrLf
For rows = 0 To MSFlexGrid1.rows - 1
Inhalt = Inhalt & "<tr>" & vbCrLf
For cols = 0 To MSFlexGrid1.cols - 1
Inhalt = Inhalt & "<td>" & MSFlexGrid1.TextMatrix(rows, cols) & "</td>"
Next cols
Inhalt = Inhalt & vbCrLf & "</tr>" & vbCrLf
Next rows
Inhalt = Inhalt & "</table>" & vbCrLf
Inhalt = Inhalt & "</body>" & vbCrLf
Inhalt = Inhalt & "</html>"
Open Datei For Output As ff
Print #ff, Inhalt
Close ff
ShellExecute Me.hwnd, vbNullString, Datei, vbNullString, "C:\", SW_SHOWNORMAL
End Sub
Private Sub Form_Load()
Dim cols As Integer
Dim rows As Integer
With MSFlexGrid1
.cols = 5
.rows = 5
For cols = 0 To 4
For rows = 0 To 4
.TextMatrix(rows, cols) = "Eintrag " & rows & "/" & cols
Next rows
Next cols
End With
End Sub
EALA FREYA FRESENA |  |
 | Sie sind nicht angemeldet! Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.
Einloggen | Neu registrieren |
  |
|
sevAniGif (VB/VBA) 
Anzeigen von animierten GIF-Dateien
Ab sofort lassen sich auch unter VB6 und VBA (Access ab Version 2000) animierte GIF-Grafiken anzeigen und abspielen, die entweder lokal auf dem System oder auf einem Webserver gespeichert sind. Weitere InfosTipp des Monats Oktober 2025 Matthias KozlowskiUmlaute konvertierenErsetzt die Umlaute in einer Zeichenkette durch die entsprechenden Doppelbuchstaben (aus ä wird ae, usw.) TOP Entwickler-Paket 
TOP-Preis!!
Mit der Developer CD erhalten Sie insgesamt 24 Entwickler- komponenten und Windows-DLLs. Die Einzelkomponenten haben einen Gesamtwert von 1866.50 EUR...
Jetzt nur 979,00 EURWeitere Infos
|
|
|
Copyright ©2000-2025 vb@rchiv Dieter Otter Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.
Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel
|
|