By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,723 Members | 1,270 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,723 IT Pros & Developers. It's quick & easy.

gradient titlebar in vbdotnet

P: n/a
hi everybody! does anyone know how to get a gradient titlebar in
vbdotnet app...?
pls help. thanks in advance.

Sep 13 '06 #1
Share this Question
Share on Google+
10 Replies


P: n/a

Ammu wrote:
hi everybody! does anyone know how to get a gradient titlebar in
vbdotnet app...?
pls help. thanks in advance.
--------------------------------------------------------------------------------------
Hello Ammu,

This is something I found. Not sure whether it will work in dotnet or
not.
I think this is vb6.0 stuff

Anyway have a look (I havent checked it myself)

http://cuinl.tripod.com/Tips/gradienttitle.htm

I have something really simple. Only 4-5 lines of code
But that also VB 6 stuff.

Regards.

Sneha (India)
sp**********@gmail.com

Sep 13 '06 #2

P: n/a
--------------------------------------------------------------------------------------
Hello Ammu,
I thought you can use this. Only a picture box. So I think it will
work in dotnet also.
If it does not you shall try modifying it.

Code------------------------
Private Sub Command1_Click()
Picture1.ScaleMode = vbPixels
Picture1.DrawWidth = 3
For i = 1 To 765
Picture1.Line (i, Picture1.ScaleHeight)-(i, 0), RGB(0, 0, Int(i / 3))
Next i
Picture1.ScaleMode = vbTwips
End Sub

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

In the above example I have used a Picture box
width 10400 twips and height 375

Autoredraw should be set to true
Border style fixed single and
Appearance -Flat

The measurements of the pic doesnt matter.
Again, you can try changing the RGB values

for i=1 to 765...
is it clear to you? See I have used the Blue Value in RGB as
i/3. So the maximum value of BLue will be 765 /3 that is 255

Let me know If you need further help.
But remember I use only VB 6

Regards.

Sneha (India)
sp**********@gmail.com

Sep 13 '06 #3

P: n/a
"Ammu" <pr********@gmail.comschrieb:
hi everybody! does anyone know how to get a gradient titlebar in
vbdotnet app...?

Hm... At least on some color settings forms have a gradient in the titlebar
by default.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Sep 13 '06 #4

P: n/a

Sneha Menon wrote:
--------------------------------------------------------------------------------------
Hello Ammu,
I thought you can use this. Only a picture box. So I think it will
work in dotnet also.
If it does not you shall try modifying it.

Code------------------------
Private Sub Command1_Click()
Picture1.ScaleMode = vbPixels
Picture1.DrawWidth = 3
For i = 1 To 765
Picture1.Line (i, Picture1.ScaleHeight)-(i, 0), RGB(0, 0, Int(i / 3))
Next i
Picture1.ScaleMode = vbTwips
End Sub

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

In the above example I have used a Picture box
width 10400 twips and height 375

Autoredraw should be set to true
Border style fixed single and
Appearance -Flat

The measurements of the pic doesnt matter.
Again, you can try changing the RGB values

for i=1 to 765...
is it clear to you? See I have used the Blue Value in RGB as
i/3. So the maximum value of BLue will be 765 /3 that is 255

Let me know If you need further help.
But remember I use only VB 6

Regards.

Sneha (India)
sp**********@gmail.com
hi Sneha!
First of all,thank u for ur quick response!i ve already tried the
codings found in that website.it doesnt work with dotnet when i upgrade
the code from vb,but still works with vb.

Next thing,i could nt use picture box control for fake titlebar
look,since it conflicts with my custom menubar ( position) settings in
the form. i need some api programming codes to give a my app titlebar,
a gradient look especially in vbdotnet.

i do ve vb codes for gradient titlebar,but none of them working when
upgraded to vbdotnet .
let m know if there is any way to do that? please.....
thank u ! take care

Sep 13 '06 #5

P: n/a

Ammu wrote:
let m know if there is any way to do that? please.....

-----------------------------------------------------------------------------
Hi Ammu

A little confused.

In the beginning, when you asked for a gradient title bar, I had the
impression you were using a borderless form. Now it seems you are not.

If you are using a regular form with menu bar and all, the default
title bar also will be there. Then what you want actually? Change the
colors of the default title bar?

I think I am missing some point.

If you can tell me what it is exactly, may be I can point you in the
right direction.

Best Regards Ammu.

Sneha (India)
sp**********@gmail.com
-------------------------------------------------------------------------------

Sep 13 '06 #6

P: n/a

Sneha Menon wrote:
Ammu wrote:
let m know if there is any way to do that? please.....
-----------------------------------------------------------------------------
Hi Ammu

A little confused.

In the beginning, when you asked for a gradient title bar, I had the
impression you were using a borderless form. Now it seems you are not.

If you are using a regular form with menu bar and all, the default
title bar also will be there. Then what you want actually? Change the
colors of the default title bar?

I think I am missing some point.

If you can tell me what it is exactly, may be I can point you in the
right direction.

Best Regards Ammu.

Sneha (India)
sp**********@gmail.com
-------------------------------------------------------------------------------
hi Sneha!

i wanna to change my application's default titlebar's color ! i like to
give a gradient look to my titlebar with gray and whitesmoke colors .

i already made my application gui with a metallic gray gradient
look(including menu bar and all) except titlebar.i am just trying to
change my titlebar's color .

regards
Ammu

Sep 14 '06 #7

P: n/a

Ammu wrote:
i wanna to change my application's default titlebar's color ! i like to
give a gradient look to my titlebar with gray and whitesmoke colors .
-------------------------------------------------------------------------------
Hi Ammu

Here I am stumped! I could not remember coming accross such a code
Item. I wont be of any help on these line.

All the same, these are some thoughts...

I doubt the outcome of the exercise. The standard Form is almost always
at the mercy or otherwise of the end user. For example, The standard
Form extensively depends on the System/OS settings. If we prefer the
cool, sober, rectangular appearance and incorporate the same in our
forms, calamity is still only one or two clicks away. As long as the
user also has the same taste, we win. On the other hand, if he switches
to Windows XP style? Our hard work goes awry.

If you are a developer with an aesthetic bend as the case seems to be,
I would suggest Custom forms itself. Of course, you have to take care
of everything, The backGround color/Picture, Icon, Title Bar
Color/appearance, Minimize/Maximize/Close buttons, Caption, resizing
issues everything. But that is worth the effort. What ever the whim and
fancy of the user, your form remains the same.

And again, that is NOT a difficult task as it sounds. It is very easy
to Create custom forms with all the features of the standard form and
more. You can create forms of any shape.

If you need it, I am in a position to give you all the guidance in this
line and related graphic issues.

Once again, I am in VB 6. Translating my guidance into dotnet
compatibility would be your headache.

Anyway, I will watch this thread.

Sorry, I could not help you in the current strategy

Regards

Sneha (India)
sp**********@gmail.com

Sep 14 '06 #8

P: n/a
On 13 Sep 2006 23:03:40 -0700, "Ammu" <pr********@gmail.comwrote:
>
Sneha Menon wrote:
>Ammu wrote:
let m know if there is any way to do that? please.....

-----------------------------------------------------------------------------
Hi Ammu

A little confused.

In the beginning, when you asked for a gradient title bar, I had the
impression you were using a borderless form. Now it seems you are not.

If you are using a regular form with menu bar and all, the default
title bar also will be there. Then what you want actually? Change the
colors of the default title bar?

I think I am missing some point.

If you can tell me what it is exactly, may be I can point you in the
right direction.

Best Regards Ammu.

Sneha (India)
sp**********@gmail.com
-------------------------------------------------------------------------------

hi Sneha!

i wanna to change my application's default titlebar's color ! i like to
give a gradient look to my titlebar with gray and whitesmoke colors .

i already made my application gui with a metallic gray gradient
look(including menu bar and all) except titlebar.i am just trying to
change my titlebar's color .

regards
Ammu
What you are trying to do is commonly called skinning a form. You might try a
google search for VB.Net skin or skinning.

You can also use a thrid party control to do this:
http://www.sunisoft.com/irisskin/index.htm

Gene
Sep 14 '06 #9

P: n/a

Sneha Menon wrote:
Ammu wrote:
i wanna to change my application's default titlebar's color ! i like to
give a gradient look to my titlebar with gray and whitesmoke colors .
-------------------------------------------------------------------------------
Hi Ammu

Here I am stumped! I could not remember coming accross such a code
Item. I wont be of any help on these line.

All the same, these are some thoughts...

I doubt the outcome of the exercise. The standard Form is almost always
at the mercy or otherwise of the end user. For example, The standard
Form extensively depends on the System/OS settings. If we prefer the
cool, sober, rectangular appearance and incorporate the same in our
forms, calamity is still only one or two clicks away. As long as the
user also has the same taste, we win. On the other hand, if he switches
to Windows XP style? Our hard work goes awry.

If you are a developer with an aesthetic bend as the case seems to be,
I would suggest Custom forms itself. Of course, you have to take care
of everything, The backGround color/Picture, Icon, Title Bar
Color/appearance, Minimize/Maximize/Close buttons, Caption, resizing
issues everything. But that is worth the effort. What ever the whim and
fancy of the user, your form remains the same.

And again, that is NOT a difficult task as it sounds. It is very easy
to Create custom forms with all the features of the standard form and
more. You can create forms of any shape.

If you need it, I am in a position to give you all the guidance in this
line and related graphic issues.

Once again, I am in VB 6. Translating my guidance into dotnet
compatibility would be your headache.

Anyway, I will watch this thread.

Sorry, I could not help you in the current strategy

Regards

Sneha (India)
sp**********@gmail.com

Hi Sneha! thank u for ur timely reply ,sweety.i m very much interested
in knowing of custom forms creation .if u could help me,i would be
grateful to u.

As of now,i know to create forms of different shapes using gdi+
techniques in vbdotnet.Ayway translating ur vb graphics guidances into
vbdotnet techniques would be my problem as u mentioned .

i really interested in exploring these techniques,Anyway i ll take care
of those issues and u ll take care of u my friend.

regards
Ammu

Sep 14 '06 #10

P: n/a

Hi Ammu

I had been away from my PC for a while

I am only glad to help you out.

Please throw in a query in vb general discussion also. This is a
dotnet group and people here may not like it if I talk too much VB6.

To get started, I would like to know some trivia like..
...Do you use Photoshop? (Any Version)..
...If the answer is NO, still, is Photoshop installed on your PC? (It
can happen, if you share your PC with colleagues or siblings)
...Are you comfortable at using (VB6) Resource File/Editor?
...Do you use (VB6) Imagelist control?

You see, these info is important, otherwise I will be wasting my time
describing things you already knew, or I might skip out things you have
no much idea about. Once I get this, I can use the apt phrasing or
level of language.

Still, Here and there I will use some Beginner-level language so that
other people who use the group shall also benefit.

Regards Ammu.

Sneha (India)
sp**********@gmail.com
-----------------------------------------------------------------------

Sep 14 '06 #11

This discussion thread is closed

Replies have been disabled for this discussion.