Shoutbox

Stuck with Visual Basic - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Stuck with Visual Basic (/showthread.php?tid=63058)

Stuck with Visual Basic by Salem on 07-11-2006 at 05:22 PM

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(@)


RE: Stuck with Visual Basic by pollolibredegrasa on 07-11-2006 at 05:27 PM

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 :)


RE: RE: Stuck with Visual Basic by Salem on 07-11-2006 at 06:20 PM

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(@)
RE: Stuck with Visual Basic by CookieRevised on 07-11-2006 at 06:34 PM

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.

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


RE: RE: Stuck with Visual Basic by Salem on 07-12-2006 at 07:39 AM

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?
RE: Stuck with Visual Basic by ShawnZ on 07-12-2006 at 07:43 AM

Well, it wouldn't cause any problem unless ProductName was blank...


RE: RE: Stuck with Visual Basic by Salem on 07-12-2006 at 02:08 PM

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(@)
RE: Stuck with Visual Basic by CookieRevised on 07-12-2006 at 04:29 PM

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).


RE: RE: Stuck with Visual Basic by Salem on 07-12-2006 at 04:33 PM

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.
RE: Stuck with Visual Basic by CookieRevised on 07-15-2006 at 07:44 PM

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.

;)