What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Stuck with Visual Basic

Stuck with Visual Basic
Author: Message:
Salem
Senior Member
****

Avatar

Posts: 769
Reputation: 16
37 / Male / Flag
Joined: May 2004
O.P. Huh?  Stuck with Visual Basic
Hi guys.


I need some help with a Visual Basic 6 application. i've created a application in Visual Basic 6. I've added some images to create a custom theme for it. I've turned off the Border Style to none so that it doesn't display the windows Titlebar so that i could create my own using images i've done. Because of this i've create a lable which will replace the caption displayed on the Titlebar. the only think is, now there's no caption in the task bar. coz in order for it not to display the Titlebar i have to have no string in "me.caption" (even when Border Style is set to "none").
I've tried to set the text in me "caption lable" to be the same text that'll be displayed in the taskbar through the "me.caption" command, but when doing this the Titlebar reappears.

This only happens with the main form of my application. The Options, About, & Splace screens are all fine, with no "top bar" but wih taskbar text via using me.caption, and with my Windows caption displayed throught a lable, just like i've done in the main form.

Any idea's how i can get it to work in the main for like it does in the others? My application is 99% done, the only thing stopping me from creating the final EXE is this problem:s

Thanks in Advance

~Salem(@)

This post was edited on 07-11-2006 at 06:21 PM by Salem.
[Image: salem874.smart.jpg][Image: card.png]
Was i Helpful?[/url]
07-11-2006 05:22 PM
Profile PM Find Quote Report
pollolibredegrasa
Full Member
***

Avatar
formerly fatfreechicken

Posts: 483
Reputation: 34
35 / Male / Flag
Joined: May 2005
RE: Stuck with Visual Basic
I'm not very advanced in VB, so I don't know how good the code is, but go here and look for Proxy For Taskbar Demo.

Hope this helps :)
;p

[Image: chickennana.gif] Vaccy is my thin twin! [Image: chickennana.gif]
07-11-2006 05:27 PM
Profile PM Find Quote Report
Salem
Senior Member
****

Avatar

Posts: 769
Reputation: 16
37 / Male / Flag
Joined: May 2004
O.P. RE: RE: Stuck with Visual Basic
quote:
Originally posted by fatfreechicken
I'm not very advanced in VB, so I don't know how good the code is, but go here and look for Proxy For Taskbar Demo.

Hope this helps :)


Thanks for the help. I will give it a try.

Does anyone kno if there is another (simpler) way, or is the the only method. Like i said it only my main form that has the problem, all other windows (Option & About) work fine.

~Salem(@)

This post was edited on 07-11-2006 at 06:24 PM by Salem.
[Image: salem874.smart.jpg][Image: card.png]
Was i Helpful?[/url]
07-11-2006 06:20 PM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Stuck with Visual Basic
The example shown by fatfreechicken is for when you want to have borders too (eg to resize the window). But you said you disabled them as you have your own image for the form, so I assume here you don't need them either.

Thus the explanation below is for forms which don't show a caption AND don't show borders:

----------------------

In order to make a form borderless and captionless and still showing up in the taskbar you need to make only two changes:

1) Set the "Border" property to "none"
2) Set the "ShowInTaskBar" property to "True"

If you set a caption on the form, the borders do not reappear. Both things are independant (as long as borders is set to none) as you'll see in my example.

In other words, you can perfectly set a caption on forms which will be visible in the taskbar, while the form itself will have no border.

Also, don't forget to set "App.Title", this is the caption which is shown in your TaskManager.

See attached example project.

-------------


.zip File Attachment: captiontest.zip (4.19 KB)
This file has been downloaded 214 time(s).

This post was edited on 07-11-2006 at 07:01 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
07-11-2006 06:34 PM
Profile PM Find Quote Report
Salem
Senior Member
****

Avatar

Posts: 769
Reputation: 16
37 / Male / Flag
Joined: May 2004
O.P. RE: RE: Stuck with Visual Basic
quote:
Originally posted by CookieRevised
The example shown by fatfreechicken is for when you want to have borders too (eg to resize the window). But you said you disabled them as you have your own image for the form, so I assume here you don't need them either.

Thus the explanation below is for forms which don't show a caption AND don't show borders:

----------------------

In order to make a form borderless and captionless and still showing up in the taskbar you need to make only two changes:

1) Set the "Border" property to "none"
2) Set the "ShowInTaskBar" property to "True"

If you set a caption on the form, the borders do not reappear. Both things are independant (as long as borders is set to none) as you'll see in my example.

In other words, you can perfectly set a caption on forms which will be visible in the taskbar, while the form itself will have no border.

Also, don't forget to set "App.Title", this is the caption which is shown in your TaskManager.

See attached example project.


Thanks CookieRevised.

I have don what you have originally done what you suggested. My Border is set to none, and ShowInTaskBar is also "true". But like i said, it works in all forms except the main form. Strange i know. I'lll try it again now.

Also, must it be

code:
Me.Caption=App.Title
coz i've been using
code:
Me.Caption=App.ProductName
could this be the possible cause ofmy problem?
[Image: salem874.smart.jpg][Image: card.png]
Was i Helpful?[/url]
07-12-2006 07:39 AM
Profile PM Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: Stuck with Visual Basic
Well, it wouldn't cause any problem unless ProductName was blank...
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
07-12-2006 07:43 AM
Profile PM Web Find Quote Report
Salem
Senior Member
****

Avatar

Posts: 769
Reputation: 16
37 / Male / Flag
Joined: May 2004
O.P. RE: RE: Stuck with Visual Basic
quote:
Originally posted by ShawnZ
Well, it wouldn't cause any problem unless ProductName was blank...


Ok, i've just tried what Cookie had suggest again, and its still doesn't want to diaply a caption in my Main forms taskbar item while at the same time keeping the titlebar invisible. Are there any moe ideas? Can anyone help me with this? Likei said the application "Options" form works fin with Borderstyle set to false, and hence havin the titlebar off as well. DisplayInTaskBar is also enabled, and yet forthis form a caption is displayed in the taskbar, and the titlebar remains turned off.

Please could someone help me with my dilemma.


Thanks in advance

~Salem(@)
[Image: salem874.smart.jpg][Image: card.png]
Was i Helpful?[/url]
07-12-2006 02:08 PM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Stuck with Visual Basic
attach your current project so we can have a look at it. If you dont like throwing your source in public, you could mail it to me (see pm).
.-= A 'frrrrrrrituurrr' for Wacky =-.
07-12-2006 04:29 PM
Profile PM Find Quote Report
Salem
Senior Member
****

Avatar

Posts: 769
Reputation: 16
37 / Male / Flag
Joined: May 2004
O.P. RE: RE: Stuck with Visual Basic
quote:
Originally posted by CookieRevised
attach your current project so we can have a look at it. If you dont like throwing your source in public, you could mail it to me (see pm).


Thanks, i'll mail it to you later tonight. Thanks for offering to help.
[Image: salem874.smart.jpg][Image: card.png]
Was i Helpful?[/url]
07-12-2006 04:33 PM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Stuck with Visual Basic
I just had a quick look at your project...

If you check the borderstyle of the main form, you'll notice that it does not change when you switch between "None" and "Fixed Single". So even if you do set it to "None", it still will have a thin lined border. Compare that to my example project I posted before, you'll notice that it does not have a thin lined border when you set the border property to "None".

The reason why the thin lined border still shows in your form is because you use a menu on that form, which you forgot to mention in this thread.

Remove the menu and you'll notice that there wont be a border, toolbar, etc and that you can perfectly set a caption for the form and show it in the taskbar.

If you still want to use the menu, I suggest to try the method given in the link given by fatfreechicken. Though, I'd suggest to first optimize and revise your project as it is a bit chaotic already.

;)
.-= A 'frrrrrrrituurrr' for Wacky =-.
07-15-2006 07:44 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On