Results 1 to 5 of 5

Thread: Full Screen Games

  1. #1

    Thread Starter
    New Member StoopidMan's Avatar
    Join Date
    Mar 2001
    Posts
    8

    Question

    Does anyone know how to make a program that will take a game that takes up your whole desktop screen, and move it into a small frame or window?
    |`````````````````````````````
    | ||||| Mike [n00b] |
    | (o.O) VB prog 4 hire |
    |//( VB )\\ ElectricFuneral.da.ru |
    |0 ------- 0 |
    | | | | |
    | /`\/`\ |
    | ````` |
    |____________________________|

  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    hrm, try sending alt + enter keys to the prog.... if you can do this manually, you can also do it automatically.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  3. #3
    Guest
    Sastraxi's Method will only work for games that run in
    DOS. Games using DirectX, I know, the Full-Screen /
    Non Full-Screen-ness is set when the DirectX object is
    created. Im not sure you could make it run non-
    fullscreen if you wanted to, and if you could, i dont know
    how. Im pretty sure its the same way for OGL too.
    Sastraxi should know =).

    Z.

  4. #4
    Junior Member
    Join Date
    Mar 2001
    Posts
    25

    Exclamation

    Maybe this can help you:

    Copy this code into a form and set Borderstyle to 0

    Option Explicit

    Public DirectX As DirectX7
    Public DirectDraw As DirectDraw7
    Public DirectMusicLoader As DirectMusicLoader
    Public DirectMusicPerformance As DirectMusicPerformance
    Public DirectMusicSegment As DirectMusicSegment

    Private Sub Form_Load()
    Set DirectX = New DirectX7

    InitDirectDraw
    InitDirectMusic
    SetDirectDraw 1024, 768, 16
    SetDirectMusic -1, 1
    SetMidiFile "C:\", "1.mid"
    PlayMidiFile True, 0, 0

    End Sub

    Private Sub Form_Unload(Cancel As Integer)
    Set DirectMusicSegment = Nothing
    Set DirectMusicPerformance = Nothing
    Set DirectMusicLoader = Nothing
    Set DirectDraw = Nothing
    Set DirectX = Nothing
    End Sub

    Public Function InitDirectDraw()
    Set DirectDraw = DirectX.DirectDrawCreate("")
    End Function

    Public Sub InitDirectMusic()
    Set DirectMusicLoader = DirectX.DirectMusicLoaderCreate
    Set DirectMusicPerformance = DirectX.DirectMusicPerformanceCreate
    End Sub

    Public Sub SetDirectDraw(X As Long, Y As Long, Farbtiefe As Long)
    DirectDraw.SetCooperativeLevel Me.hWnd, DDSCL_EXCLUSIVE Or DDSCL_FULLSCREEN
    DirectDraw.SetDisplayMode X, Y, Farbtiefe, 0, DDSDM_DEFAULT
    End Sub

    Public Sub SetDirectMusic(Port As Long, OutputPort As Long)
    DirectMusicPerformance.Init Nothing, frmmain.hWnd
    DirectMusicPerformance.SetPort Port, OutputPort
    End Sub

    Public Sub SetMidiFile(SearchDirectory As String, Filename As String)
    DirectMusicLoader.SetSearchDirectory SearchDirectory
    Set DirectMusicSegment = DirectMusicLoader.LoadSegment(Filename)
    DirectMusicSegment.SetStandardMidiFile
    End Sub

    Public Sub PlayMidiFile(AutoDownload As Boolean, Flags As Variant, StartTime As Variant)
    DirectMusicPerformance.SetMasterAutoDownload AutoDownload
    DirectMusicPerformance.PlaySegment DirectMusicSegment, Flags, StartTime
    End Sub

    With this code you can change the display mode and play background music with dx7. You may change the display mode settings and the midi file path.

    >>> Have fun
    Visual Basic

  5. #5
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Zaei, with OGL you dont need a clipper you just change the width and height of the picturebox(or whatever you are using that has an hDC)'s size and then you set the aspect ratio so that it doesn't look screwy. All that's needed is 3 lines of code.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

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