Minimising Without A Caption
*** I have found the cause of the problem - I have an invisible menu so that I can have pop-up menus in the form - this makes the border/caption bar visible unless the caption = "" - if anyone knows how to change this, it would be much appreciated. Thanks ***
Here goes my first post here!
I have made a full screen application (without caption bar) that covers the taskbar - this is all very nice until someone wants to minimise the form. I have made a command box with frmForm.windowstate = vbMinimized, which works fine, except there is naturally no caption in the taskbar (i.e. I just get the application icon with a blank space).
To solve this, the line before the windowstate line, I have added frmForm.caption = "xxxxxxx'.
However, when I come back to the form, there is a horrible caption bar! I have attempted to find some solutions by seeing if adding frmForm.caption = "" to a random command box (would capture events if it works), but that shifts the whole screen up, so the taskbar and some space above that is visible.
As the form is maximised, I can't then go and change the form's size.
Does anyone know how to make the caption appear in the taskbar, and to return to a fully maximised screen with no caption bar?
Thanks in advance, Ed
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Minimising
i am trying to minimize a window by clicking a label/text i use the code "Main.MinButton" but it gives me a compile error, why is this or am i doing it completely the wrong way?
Minimising Excel With VBA
Hi all,
I'm currently doing an excel spreadsheet for an ICT course at 6th form college and I'm doing it entirely in VBA (past programming experience and the desire for a proper interface makes that my prefered way of doing it) and I'm wondering if its possible to minimise Excel with VBA. I will be launching an MD5 hash login screen when the worksheet is opened so the trigger event is sorted, I'd just like to know if there is the facility to do so.
Thanks in advance.
Regards,
Matt
About Minimising Userform ...
Hi there. Can anyone please advise me how to set by VBA code a minimise icon at the upper right corner of the userform so that user can minimise the userform when needed? Can I also minimise the worksheet(s) associated/opened with the userform at the same time?
Cheers
Form Minimising
Hi here's a challenge.... If I set a VB form not to show in the taskbar, when I minimise the form minimises down and sits above the start button (out of the taskbar). If I move the minimised form to the top of my screen and restore it, then minimise again it minimises to the top of my screen.
Question: Is there anyway to set the minimise position (x,y)? so that when I minimise a form the first time, it minimises to the top of my screen??
Minimising To Taskbar
Hello Again
I have loaded the control to put my program in the system tray (systemtray.ocx) but it leaves it there all the time. I was just wondering if I could tell it to only place the icon in the system tray while the program was minimised.
Hope you understand me, please post if more info needed
Thanks
Alistair
EDIT: title changed from Taskbar to Systray, i'm to tired
Minimising The Application
Hi Friends,
Is there any way to minimise my VB application to taskbar automatically...? (Not to system tray)
I dont see any events which are related to Form minimise.
If u can help it wud be a great help
Minimising Programmes
Hello,
I would like to know how to minimise other programmes/applications such as Windows Media Player, Internet Explorer etc from my own Programme. I don't have a clue where to start so any help would be great. I don't want to minimise them all, just the app of my choice.
Thanks
Minimising A Form
Help:
I am trying to make my program minimise into an icon by the time like my wizip software. Can anyone help me I am completely stuck on this one??
Thanks
Philip Lavin
Form Minimising
hey guys, i want to be able to minimise my form, but *not* be able to resize it, how can i do it?
Minimising Game
Hey,
Im trying to minimise a game but i'm having problems. The game doesn't appear to minimse. However the Windows Calculator does. I'll show you some of my code, which is messy and rubbish, so if you could share some source or point me into the right direction on how to minimise a game that would be great. Alot of the code is not needed but i'm that much of a noob
Code:
Option Explicit
Private Declare Function GetActiveWindow Lib "user32" () As Long
Private Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Const HWND_TOPMOST = -1 'bring to top and stay there
Private Const SWP_NOMOVE = &H2 'don't move window
Private Const SWP_NOSIZE = &H1 'don't size window
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Const HWND_NOTOPMOST = -2
Private Type POINTAPI
x As Long
Y As Long
End Type
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Type WINDOWPLACEMENT
length As Long
FLAGS As Long
showCmd As Long
ptMinPosition As POINTAPI
ptMaxPosition As POINTAPI
rcNormalPosition As RECT
End Type
Private Declare Function GetWindowPlacement Lib "user32" (ByVal hWnd As Long, lpwndpl As WINDOWPLACEMENT) As Long
Private Declare Function SetWindowPlacement Lib "user32" (ByVal hWnd As Long, lpwndpl As WINDOWPLACEMENT) As Long
Private Const SW_SHOWMINIMIZED = 2
Private Const SW_SHOWMAXIMIZED = 3
Private Const SW_SHOWNORMAL = 1
Private sAppName As String, sAppPath As String
Private Sub Command1_Click()
Shell sAppPath, vbMinimizedFocus
End Sub
Private Sub Command2_Click()
'Call EndTask(sAppName)
End Sub
Private Sub Command3_Click()
Dim app_hwnd As Long
Dim ofp As WINDOWPLACEMENT
app_hwnd = FindWindow(vbNullString, sAppName)
ofp.length = Len(ofp)
ofp.showCmd = SW_SHOWMINIMIZED
SetWindowPlacement app_hwnd, ofp
End Sub
Private Sub Command4_Click()
Dim app_hwnd As Long
Dim ofp As WINDOWPLACEMENT
app_hwnd = FindWindow(vbNullString, sAppName)
ofp.length = Len(ofp)
ofp.showCmd = SW_SHOWMAXIMIZED
SetWindowPlacement app_hwnd, ofp
End Sub
Private Sub Form_Load()
sAppName = "Operation Flashpoint"
sAppPath = "C:Program FilesCodemastersOperationFlashpointFLASHPOINTRESISTANCE.EXE"
Call SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE)
End Sub
Private Sub Mini_Click()
Dim app_hwnd As Long
Dim ofp As WINDOWPLACEMENT
app_hwnd = FindWindow(vbNullString, sAppName)
ofp.length = Len(ofp)
ofp.showCmd = SW_SHOWMINIMIZED
SetWindowPlacement app_hwnd, ofp
End Sub
Private Sub Timer1_Timer()
If GetActiveWindow = 0 Then
Call SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE)
End If
End Sub
Thanks in advance
Minimising To The Task Bar
HOw can i get my app to run in the taskbar(in the background so to speak). I needc it running all the time so when the user finishes with the app i need to just minimise it instead of closing it.
Thanks
Chris
Minimising Forms In VB
As far as I can tell, it is impossible to perform operations such as minimising and maximising forms using code in VB6 - you have to rely on the user pressing the buttons on the title bar. Please could someone advise me whether this is true or not, and if not, how is it done?
Thanks in advance,
Dave Turner
Minimising Access DB To SysTray
Any ideas how (if at all) you can minimise Access to the system tray (where the clock is). I want my Access program to run at Windows startup (easy enough), and then minimise to the SysTray till I need it.
Thanks in advance
Adam
Hiding Or Minimising All Tables Through VB - Can It Be Done?
Hi all.
What I'm trying to do, in brief, is create a 'front end' in VB for a table. The values the table generates are reliant on variables in another table, which is set to VeryHidden so the user can't fiddle with it.
Trouble is, VB won't allow you to open a form and then hide all sheets..
Is it possible to minimise a table through code, or otherwise remove it from view?
Thanks in advance to all willing to help...
Minimising To System Tray
Back again!!
This time I want to minimise to the system tray, I know it's possible to minimise out of the toolbar, but that only puts the program into a little box on the desktop, is there anyway of minimising it to the system tray?
Minimising Memory Usage
Hi Guys,
I have built an app that collects images from a users computer and allows them to specify their order and so forth. Basically it means that they have 24 images in the system and they can drag and drop them around the form.
I have this one client who continually crashes the system on this one page. It contains 24 image boxes and 24 text boxes, as well as associated buttons for general stuff. The user can swap images, or delete or copy them using drag and drop. The image boxes are 81 x 81 pixels.
I think this client is crashing the system by using ridiculously large images - 1179 x 769 and thereabouts. Having said that, my question is - How can i minimise the memory usage for a page like this? Is there a more efficient API i could use or some way to store an array of thumbnails in memory, so i don't have to continually reprocess them?
Anyway, I'm not sure, so i hope someone can help me.
Thanx all in advance,
Modal Form And Minimising App!
Hi All,
I have wrote an application that has an MDI form and then loads a form modally which loads another form modally. The reason for loading them modally is so that the code after loading a form is not executed until the form it loaded is unloaded. That all works fine until you want to minimise the application to go to another. Does anyone have any ideas please????
Kind Regards,
Jiggy!
Minimising A Modal Window
i have an mdi appliction which launches some modal windows. and from one of these modal window i launch another modal window which shows a progress bar. The user needs this to be minimized as it may take more time to execute.
His requirement is, when he clicks the minimize button of this modal window, the whole application should be minimized and when clicked from the task bar it should be shown as normal.
can we get any event( or APIs) when user user clicks on the minimzed application on task bar ...
please help me !
thanks in advance...
Minimising Exe File Within A Rich Text Box Itself
pls tell me how to open multiple exe files within a rich text box and is it possible to minimise all the exe files in a rich text box itself..????? please tell me the source code to do the above...
Minimising / Hiding Excel While Code Executing
Hi all,
Is it possible to hide or minimise the excel window while my user forms are active. I don't want the excel sheet to be behind the forms as it looks a little un-professional, which is appropriate maybe for a non-professional programmer
I have tried excel.application.visible=false and also tried Excel.Application.WindowState = xlMinimized with no luck, maybe such code needs to go in a specific place ?
Anyway, cheers in advance if you can help
Stu
Stop Program Minimising When Press Show Destop
i have a program which sits on the desktop and provides quick shortcuts to network locations.
this work great but when a user hits show desktop this also get minimised, is there a way to stop this happing?
Keep Form Caption ...but Change Taskbar Caption...how?
I want to keep the Form caption as is...but kind of need that the button in the TaskBar shows the percentage of completion of a task... since it'll be sometimes working in the background
this is just like it happends in the application FlashFXP ...in the main it shows the app.caption and the FTP where I'm logged and in the TaskBar it shows the percentage of the file being retrieved and total time to finish...
I just need to find out the ...How to do it... been searching here in general and in the API section but all (that I've found) reffers to borderless or without titlebar forms ...
Thanks in advance for any lead provided!
Caption
Hi All
Have an ocx made which is more or less a Label (in vb)
What I would like to do is to resize the label depending on the font chosen
Is there a way to define the height of my label depending on the font used
a bit like in a text box if you try to make the text box smaller than the font
chosen it wont allow you
thanks
Caption Help
I need to know how to make the caption in form2 the same as another label in form1.
I'd imagine it would be something like:
form1.label1.caption form2.label1.caption
but that doesn't seem to work. Thanks.
Caption
Hello to all,
How do you center the caption text of any form. I hate adding spaces to manually center the text. Is there another way of doing this.
thanks a bunch.
Caption
When trying to set the caption after loading a form the form load event is executed a second time. The form is being called by a class. If I call the form from outside the class a second form load event does not occur. If I set the caption within the class module a second form load does not occur. Is there a way to set the caption from within the form?
Caption
When I use the following code in a command_click event on another form it doesn't change the caption of the main form:
<pre>
If strFile = "title.dat" Then
frmMain.Caption = Text1.Text
ElseIf strFile = "nick.dat" Then
Nick = Text1.Text
End If
</pre>
Re Caption Bar
hi all...thanks for the info.i will delve into the attached code in due course.is there any reason why microsoft would not add this featurs to the toolbox controls.is it available in ver 7.
there must be zillions of undocumented tricks thats waiting to be discovered....
thanks again for all the replies...
yes please post the newer code for me.
john
Caption Bar
You see a snapshot of Windows(R) Media Player 10.0.
Is it possible to add a button to the control box of form like the one in picture in VB 6.0?
If yes, how this should be done?
Thanks.
Caption
In a form with ControlBox = False and Caption = "" how may I show a text in taskbar as caption?
Note that I don't wanna have an actual caption on the form to avoid having caption bar.
Use Anything That Has .caption
Hello, I was wondering, I have a function and I want the user to enter a control they have (label, form, commandbutton, anything that can do .caption). But I don't know how I can do this...
Module:
vb Code:
Option Explicit Dim i As IntegerDim Start As LongDim EndT As LongDim Total As DoubleDim DoTime As Integer Declare Function GetTickCount Lib "kernel32" () As Long Public Function TimerStart(Optional Lbl As Label, _Optional Cmd As CommandButton, _Optional Frm As Form) As Long i = i + 1 If i = 1 Then Start = GetTickCount End If EndT = GetTickCount Total = (EndT - Start) / 1000 Cmd.Caption = Total Lbl.Caption = Total Frm.Caption = Total End Function Public Function TimerReset() i = 0End Function
Basically my question is.. how can I get cmd.caption=total, lbl.caption=total etc. into just one. Example: obj.caption=total. Thanks.
I wasn't quiet sure how to ask this, I hope it wasn't too confusing.
How To Get A Caption
How do you get the caption of the window with focus? I know how to get the caption.. but how do I get the handle of the window with focus?
Alt+Key Caption!
A VB6 Form has a TextBox & a ListView. Each of these controls have a corresponding Label. This Form also has a CommandButton. When the CommandButton is clicked, all the items in the ListView get deleted. Here's the layout of the Form (the Captions of the 2 Labels are red colored):
Enter Website:
'here comes the TextBox
Manage Website:
'here comes the ListView
NOTE THE SHORTCUT KEYS (S & W) FOR THE 2 LABELS WHICH ARE UNDERLINED.
Assume that the ListView is not empty. What I find strange is if I press Alt+S or Alt+W from the keyboard, then all the items in the ListView get deleted! On the other hand, if the ListView is empty, then pressing Alt+S or Alt+W unloads the Form.
If I am not mistaken, Alt+S & Alt+W should set the focus on the TextBox & the ListView respectively, isn't it? So why is this happening? How do I overcome this?
Note that the shortcut key of the CommandButton is M i.e. the Caption of the CommandButton is Remove All. So when Alt+M is pressed, the CommandButton gets activated & all the items in the ListView get deleted.
Thanks,
Arpan
Cmd Caption
Need help. Trying to place a up arrow on 1 cmd button and a down on another cmd button. This is so i can make a lable were the number will increase or decrease on click of the cmd.
How To Set Caption... ?
I have a form, where i have set the controlbox to off, and the ShowInTaskbar thingie on. What i want to do is being able to set a caption for the form, which is only visible in the taskbar, thereby making the controlbox remain invisible. Does anyone know how to do this ??
Cheers !
Caption
How do you put a caption under the programs name when it is an exe file.Like some progs have the name of it then say "Microsoft" underneath it.How do you get a name under there?Thx yall I appreciate it
Caption Bar
Hi,
I would like to give the caption bar at the top of a form a title, but at the same time i do not want it to be visible.
Does anyone know a way of doing this?
Thanks in advance
Sarah
Get IE Caption
Anyone know how to get the title bar caption in Internet Explorer. I don't want to change it, I know how to do that. I just want to be able to get it in a text box whether it be the roiginal or a customized one.
'&&' In Caption?
Really quick, stupid question. Is there any way to get the '&' character to appear in a menu or button caption, ie without causing the underline?
Thanks.
Caption
well how can i change the caption of a form or a lable so that the last caption is still there until i want it .
|