PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

eVB Help

Im starting a new game pack called "Pocket Fun Box" (If there already is something with the same name, please tell me) but anyway, I need to know for:

1. How to hide the Taskbar and Start Bar in eVB
2. How to click certain things on a bmp image and have them do things(Like by clicking exit on the bmp it would close. Do I have to hide something behind the picture??)

Thanks In Advance.

Btw: If anyone has any simple Idea's of games I could add into the "FUN BOX" please let me know. So far I plan to have:

1.Flip a Coin
2.Guess The Number
3.Tic Tac Toe...(Questionable)
I don't know that much eVB (I've dabbled in it, nothing more), but I'll answer what I can. I might be wrong, but if I am, so be it.

1. I don't think you can in eVB
2. If you go into the coding part of your project and select the picture object you want to be used from the drop-down menu (I think), one of the events you can select should be something that has to do with tapping or clicking.
1. Do you want to make your program full screen? Is that why you want to hide the taskbar and startmenu and maybe the SIP (the little keyboard icon)? If so I have code for that. Just tell me if that's what you want to do and I will post it.


2. To make a graphic do something you put it in a picturebox and then write your code in the picturebox. For instance if I had a picturebox called PicBox1 and I wanted it to close the program when a user clicked on it, in the PicBox1_Click() I would write App.End
If I wanted it to only close the program if something else happened like the game was over, I would write in my code that when the game was running a variable named close was false and if the game was over the variable was true. Then in the PicBox1_Click() I would write If close = True Then App.End


I hope that helped. Let me know weither you need to hide the SIP, Taskbar, and Startmenu permanetly or hide them only when you program calls them to be hidden and I will post code to do either of those things.


Edit: I think I misunderstood you about the graphic stuff. You want to click on certain parts of the graphic and have them do things. You can't really do that whitout a ton of work (like defining the x,y postion on your .bmp and then mapping out what points on the bitmap do things and what don't). The easiest way to do what you want is to cut your bitmap into pieces and assign each piece to a picturebox. Then they will all have their own controlls and will be much easier to handle then the other way to do it.
Thanks For your help. What I ended up doing was just making seperate graphics for the buttons and putting them in clickable picbox's. As for the full screen, Yes I want to make it full screen, and that would be great if you could post the source on how to do it! Thanks A Lot. :D The Way that I was doing it didnt work out right.
Although i've never really used VB much, to get different parts of a bitmap to do different things couldn't you just use:

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

Start with that and then play with matching up MouseDown() with MouseUp() events so it acts more like a button (IE: it doesn't do anything until you release the stylus)
Sorry for the delay, I have been really busy with school and making my space shoot'em up game. Here is the code for making your eVB app full screen.

Code:
'=======================================
Const SW_HIDE = 0
Const SW_SHOWNORMAL = 1

Const SHFS_SHOWTASKBAR = &H1;
Const SHFS_HIDETASKBAR = &H2;
Const SHFS_SHOWSIPBUTTON = &H4;
Const SHFS_HIDESIPBUTTON = &H8;
Const SHFS_SHOWSTARTICON = &H10;
Const SHFS_HIDESTARTICON = &H20;
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2

Const SWP_SHOWWINDOW = &H40;
Const SM_CXSCREEN = &H0;
Const SM_CYSCREEN = &H1;
Const HHTASKBARHEIGHT = 26
'===================================================
Dim bShowMenu As Boolean
Dim bShowStart As Boolean
Dim bShowTaskbar As Boolean
Dim bFullScreen As Boolean
Dim lHwnd As Long


'=======================================
Declare Function GetSystemMetrics Lib "Coredll" ( _
ByVal nIndex As Long) As Long

Declare Function SHFullScreen Lib "aygshell" ( _
ByVal hwndRequester As Long, _
ByVal dwState As Long) As Boolean

Declare Function MoveWindow Lib "Coredll" ( _
ByVal hWnd As Long, _
ByVal X As Long, _
ByVal Y As Long, _
ByVal nWidth As Long, _
ByVal nHeight As Long, _
ByVal bRepaint As Long) As Long

Declare Function SetForegroundWindow Lib "Coredll" ( _
ByVal hWnd As Long) As Boolean

Declare Function GetLastError Lib "Coredll" () As Long

Declare Function ShowWindow Lib "Coredll" ( _
ByVal hWnd As Long, _
ByVal nCmdShow As Long) As Long

Declare Function FindWindow Lib "Coredll" Alias "FindWindowW" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
'=======================================

'=======================================
Private Sub Full_Screen()
Dim lret
If bFullScreen Then
lret = FindWindow("menu_worker", "")
If lret <> 0 Then 'window found
ShowWindow lret, SW_SHOWNORMAL
End If
lret = SetForegroundWindow(Me.hWnd)
lret = MoveWindow(Me.hWnd, 0, HHTASKBARHEIGHT, _
GetSystemMetrics(SM_CXSCREEN), _
GetSystemMetrics(SM_CYSCREEN), True)
Else
'show form full screen
lret = FindWindow("menu_worker", "")
If lret <> 0 Then 'window found
ShowWindow lret, SW_HIDE
End If
lret = SetForegroundWindow(Me.hWnd)
lret = MoveWindow(Me.hWnd, 0, 0, _
GetSystemMetrics(SM_CXSCREEN), _
GetSystemMetrics(SM_CYSCREEN) + HHTASKBARHEIGHT, 0)
End If
bFullScreen = Not bFullScreen
End Sub
'=======================================

Private Sub StartFullScreen()
'Nedanstående fixar fullscreen
bShowMenu = True
bShowStart = True
bShowTaskbar = True
bFullScreen = False
lHwnd = Form1.hWnd
Call Full_Screen
Call Hide_Menu
Call Hide_Start
Call Hide_Taskbar
End Sub

'=======================================
Private Sub Hide_Menu()
Dim lret
lret = SetForegroundWindow(lHwnd)
If bShowMenu Then
lret = SHFullScreen(lHwnd, SHFS_HIDESIPBUTTON)
Else
lret = SHFullScreen(lHwnd, SHFS_SHOWSIPBUTTON)
End If
bShowMenu = Not bShowMenu
End Sub
'=======================================

'=======================================
Private Sub Hide_Start()
Dim lret
lret = SetForegroundWindow(lHwnd)
If bShowStart Then
lret = SHFullScreen(lHwnd, SHFS_HIDESTARTICON)
Else
lret = SHFullScreen(lHwnd, SHFS_SHOWSTARTICON)
End If
bShowStart = Not bShowStart
End Sub
'=======================================


'=======================================
Private Sub Hide_Taskbar()
Dim lret
lret = SetForegroundWindow(lHwnd)
If bShowTaskbar Then
lret = SHFullScreen(lHwnd, SHFS_HIDETASKBAR)
Else
lret = SHFullScreen(lHwnd, SHFS_SHOWTASKBAR)
End If
bShowTaskbar = Not bShowTaskbar
End Sub

Private Sub Timer1_Timer()
Call StartFullScreen
End Sub

Yeah you have to use a timer to call StartFullScreen, over and over. If you don't and you launch another app while yours is running it will return to part screen.

If you're serious about making PPC games with eVB, I would highly reccomend the ASpriteCE ActiveX control. I's a hybrid of C++ and Evb and gives you the speed of a C++ app. I just got it a month or so ago, and I love it! The speed is incredible! And no flickering, yay!
I know somebody is going to say this so I'll say it first.

If you're serious about making PPC games with eVB, I would highly reccomend the ASpriteCE ActiveX control. I's a hybrid of C++ and Evb and gives you the speed of a C++ app. I just got it a month or so ago, and I love it! The speed is incredible! And no flickering, yay!


C++ lovers: "Or you could just learn C++."


Well poop on you too. :)
haha, Thanks a lot for the code. BACK TO CODING!?!?! :D
All right, the code worked, but when I go to a new form is is back to normal screen again. How do I make all the forms Full Screen?? If I try to copy the code into the next form, it tells me I need Unique names. That would be a pain to have to put in unique names for all that code each time. Or is that the only way to do it?!
How would I set that on a timer?
How do I save to files in eVB?
Matt Gifford · 27 Feb 2003, 07:42 UTC
That was me. I also need to know how to add a button to the menu that is already at the bottom of the screen. I've searcjed through the help file, but it isn't very helpful.