SELECT CASES ???
#35
No. Not in a new "console" or window, in the same window. Consoles are text only, so that option is out for this graphics routine. You want to open an image in a new separate window, right?

To do so, you'd have to write a separate program, pass the info to it, and shell to it from the part of your code that now does the your _PUTIMAGE routine.

Example:

Program 1 (Name this anything you want.)
Code: (Select All)
'Bild in neuem Fenster aufrufen

DIM AS INTEGER SatzNummer
DIM Bild AS LONG, myFont AS LONG
DIM Text AS STRING
', Text2 As String

INPUT "Satznummer: ", SatzNummer

IF SatzNummer = 1 THEN
    _CLIPBOARD$ = "..\Bilder\Yamaha-250-1965.jpg"
    SHELL "bild.exe"
END IF

Program 2 (Name and save this as Bild.bas and compile it as Bild.exe)
Code: (Select All)
DIM AS INTEGER SatzNummer
DIM Bild AS LONG, myFont AS LONG
DIM AS STRING Text, myBild
myBild = _CLIPBOARD$
IF _TRIM$(myBild) = "" THEN SYSTEM ' Nothing got transferred.

SCREEN _NEWIMAGE(800, 600, 32)
CLS
'Neue Farbe setzen
COLOR _RGB32(255, 165, 0), _RGB32(0, 0, 0)

Bild = _LOADIMAGE(myBild)

'Neues Fenster - Bildgroesse fuer mittig
_PUTIMAGE (((800 - 689) / 2), 15), Bild

Text = "Die Yamaha als Zweitakter mit 250 ccm - 1965"
'Text2 = " and leaves before she is left."
myFont = _LOADFONT("C:\Windows\Fonts\Tahoma.ttf", 25, "")
_FONT myFont

'Zeile, Spalte und die Bildhoehe(!) beruecksichtigen
_PRINTSTRING (135, 490), Text
'_PrintString (256, 537), Text2

'Farbe und Schrift zuruecksetzen
COLOR _RGB32(255), _RGB32(0, 0, 0)
_FONT 16
_FREEFONT myFont

It uses the _CLIPBOARD statement to transfer the file path and file between programs.

Anyway, if you want more than a single window, this is what I developed to make it so. Just run program #1 and input 1. A new window will open with your motorcycle pic.

Pete
Reply


Messages In This Thread
SELECT CASES ??? - by Pete - 10-16-2022, 07:55 PM
RE: SELECT CASES ??? - by SMcNeill - 10-16-2022, 08:48 PM
RE: SELECT CASES ??? - by mnrvovrfc - 10-17-2022, 07:40 AM
RE: SELECT CASES ??? - by James D Jarvis - 10-16-2022, 08:49 PM
RE: SELECT CASES ??? - by SMcNeill - 10-16-2022, 09:07 PM
RE: SELECT CASES ??? - by Pete - 10-16-2022, 09:01 PM
RE: SELECT CASES ??? - by Pete - 10-16-2022, 09:12 PM
RE: SELECT CASES ??? - by SMcNeill - 10-16-2022, 09:23 PM
RE: SELECT CASES ??? - by Kernelpanic - 10-16-2022, 09:35 PM
RE: SELECT CASES ??? - by SMcNeill - 10-16-2022, 09:57 PM
RE: SELECT CASES ??? - by Pete - 10-16-2022, 10:28 PM
RE: SELECT CASES ??? - by Kernelpanic - 10-16-2022, 10:44 PM
RE: SELECT CASES ??? - by SpriggsySpriggs - 10-16-2022, 11:06 PM
RE: SELECT CASES ??? - by Pete - 10-16-2022, 11:42 PM
RE: SELECT CASES ??? - by SMcNeill - 10-17-2022, 01:34 AM
RE: SELECT CASES ??? - by Pete - 10-17-2022, 02:04 AM
RE: SELECT CASES ??? - by SpriggsySpriggs - 10-17-2022, 02:46 AM
RE: SELECT CASES ??? - by mnrvovrfc - 10-17-2022, 07:48 AM
RE: SELECT CASES ??? - by dbox - 10-17-2022, 03:46 AM
RE: SELECT CASES ??? - by SMcNeill - 10-17-2022, 05:21 AM
RE: SELECT CASES ??? - by DSMan195276 - 10-17-2022, 06:32 AM
RE: SELECT CASES ??? - by Pete - 10-17-2022, 06:41 AM
RE: SELECT CASES ??? - by DSMan195276 - 10-17-2022, 07:34 PM
RE: SELECT CASES ??? - by Pete - 10-17-2022, 08:28 AM
RE: SELECT CASES ??? - by RhoSigma - 10-17-2022, 09:29 AM
RE: SELECT CASES ??? - by Pete - 10-17-2022, 07:00 PM
RE: SELECT CASES ??? - by Kernelpanic - 10-17-2022, 08:15 PM
RE: SELECT CASES ??? - by SMcNeill - 10-17-2022, 09:44 PM
RE: SELECT CASES ??? - by Pete - 10-17-2022, 09:45 PM
RE: SELECT CASES ??? - by SMcNeill - 10-17-2022, 09:50 PM
RE: SELECT CASES ??? - by Pete - 10-17-2022, 10:05 PM
RE: SELECT CASES ??? - by Kernelpanic - 10-18-2022, 08:07 PM
RE: SELECT CASES ??? - by Pete - 10-18-2022, 08:38 PM
RE: SELECT CASES ??? - by Kernelpanic - 10-18-2022, 08:49 PM
RE: SELECT CASES ??? - by Pete - 10-18-2022, 09:33 PM
RE: SELECT CASES ??? - by Kernelpanic - 10-19-2022, 06:32 PM
RE: SELECT CASES ??? - by Pete - 10-19-2022, 06:39 PM



Users browsing this thread: 3 Guest(s)