WinXp Menus <-- Easy
-
would people please test this program for me.
Just press the right mouse button
the code is available for you, and is not complicated. It uses an Imagelist and a picture box..
no classes, or complicated menu handling.. I will be developing further for submenus, but its not bad...
Thanks.. -
The menu's look great. Just what I was looking for to add some dazzle to an app.
Critique...
If you have the menu open, and an item selected...and then right click somewhere else on the for...you get the menu popping up (good) but EVER item , including spacers are highlighted (BAD)...
You either need to deselect ALL items when a new instance of the popup is called, or remember whichh item is selected and force it to highlight....
Other than that, well done...
Would you mind making your code available? -
its not co,petely finished, but i like bug reports, thanks, i`ll check it out.
heres the code
also, if you could put a blue semi transparent border, instead of the green one, i`d like to know (When Selecting Items) -
I wished i lived in Australia, sun, sand blue seas, the girls..
okay, the poisonous insects and spiders that bite your arse when on the bog is bit of a down point, but still..
better than here... -
re-worked my winxp menus
available at the same links, as in the previous threads
the image is now selected along with the text, removed some redundant code
visible, check, keycodes, submenus and mouse buttons still unsupported
i`ll let ya know when i get around to it... -
i`ve updated again, fixed the error that Stretch reported to me
(if you selected the firstitem then open the menu again, all items would be selected) (easily fixed)
all items are created from the first control, if that is selected then the background is green, and if the menu is redrawn all items are created green (from the first control)
will be adding flags/support for different font styles/option box like menus
also, i need to know how to do gradient fills, semi-transparent fills (like when you click an icon and it goes blue)
thinking of adding background picture, but picture boxes that have the item text in cant be transparent, i know labels can, but the text doesn
t centre vertically..
any help/bug reports are appreciated.. -
19 years agoby Thushan Fernando
Thushan Fernando
Australia :: Melbourne, AustraliaJoined 19 years agowell living in australia isnt all that bad... im in melbourne which is(in my opinion) hte best part of australia other than quensland you get a bit of everyting in one day... which can be annoying but then again i dont go out all that much. the girls arent all that bad. and those nasty insects arent everywhere, only if your going bush or outer suburban area's.
with regards to the WinXP menu's ill take a look tonite. -
19 years agoby webjose
Jose Pablo Ramirez Vargas
Costa Rica, United StatesJoined 19 years agoDo you mean by gradient fill a solid fill from color 1 to color 2, like form bars on top of windows? If so, I have the function for you. Just let me know if you want it.
-
Hi again
I tried your menu. It lookes great
I don't wanna be a critic but when I rightclicked next to the right border of the form, menu appeared but part of it was hidden -
Everyone knows that Perth is the best place in Australia.
It's great that people are writing stuff that allows programmers to keep up with the Microsoft interface when they don't put it in the programming system.
VBSmart also has some nice .Net style controls. -
Interested in submitting this to Developer Fusion when it's finished?
-
firstly thanks for all for testing..
secondly, the menu will disappear because its basically a picturebox, and all controls are limited to inside a form. although i could put the menu into a borderless form, and that would appear above all other forms/windows, like a proper menu..
thirdly, i`ve got 4 resources pending (been there for ages), playing gifs, reading registry etc. I might submit it if it all goes according to plan..
Webjose: thats exactly what i mean, like the windows titlebar.. I also need to do a pattern, like draw every other dot. when you select an icon from desktop it puts a blue border on the icon, but it is not solid. WinXP also does this effect on the menus, but i cant. i
ve tried fillcolor/fillstyle but they don`t produce the desired effect..
ill be working on the menus today, so i
ll let you kow about improvements, lator on..
Thanks to all.. -
everyone take a look at http://www.vbsmart.com as Daniel said. theres controls to mimic XP style menus/toolbars.
better than anything i could ever produce. -
updated the menus
separator is smaller, you can drag the menu about by clicking the pictures or background
draws mnemonic charactor, keyboard not supported yet.
supports bold/italic, fixed a hilighting problem
Had a look at the controls on VBSmart, very nice.. Youd be better off using them though, I will still continue my project. and i
ll be working on a toolbar as well..
I`ve just this minute fixed a bug with menus with no picture, and added disabled feature to menu items..
Fixed the scalemode nonsense, and adjusted some of the colours, now put semi-transparent selection on item
Is anyone actually still interested ? -
added Up/Down Arrow keys, ESC and Return, Also returns Item Number Selected (Not Complete Yet), i know theres a problem with the arrow keys - selecting separator/disabled items, i will fix it.. -
19 years agoby webjose
Jose Pablo Ramirez Vargas
Costa Rica, United StatesJoined 19 years agoCode: Private Function CalculateGradient(ByVal color1 As Long, ByVal color2 As Long, ByVal steps As Long, ByRef arr() As Long) As Boolean
Dim cont As Long
Dim red() As Byte
Dim green() As Byte
Dim blue() As Byte
Dim tempRed As Byte
Dim tempGreen As Byte
Dim tempBlue As Byte
Dim temp() As Byte
On Error GoTo ErrorInGradient
ReDim red(1 To 2)
ReDim green(1 To 2)
ReDim blue(1 To 2)
GetColorByPieces color1, temp
red(1) = temp(0)
green(1) = temp(1)
blue(1) = temp(2)
GetColorByPieces color2, temp
red(2) = temp(0)
green(2) = temp(1)
blue(2) = temp(2)
ReDim arr(0 To steps - 1)
For cont = LBound(arr) To UBound(arr)
tempRed = red(1) + Sgn(CLng(red(2)) - CLng(red(1))) * CByte(Abs(CLng(red(2)) - CLng(red(1))) / (steps - 1) * cont)
tempGreen = green(1) + Sgn(CLng(green(2)) - CLng(green(1))) * CByte(Abs(CLng(green(2)) - CLng(green(1))) / (steps - 1) * cont)
tempBlue = blue(1) + Sgn(CLng(blue(2)) - CLng(blue(1))) * CByte(Abs(CLng(blue(2)) - CLng(blue(1))) / (steps - 1) * cont)
arr(cont) = RGB(tempRed, tempGreen, tempBlue)
Next cont
CalculateGradient = True
On Error GoTo 0
Exit Function
ErrorInGradient:
'MsgBox Err.Description
CalculateGradient = False
End Function
Private Sub GetColorByPieces(ByVal color As Long, ByRef arr() As Byte)
ReDim arr(0 To 2)
arr(0) = (color And 255)
arr(1) = ((color And 65535) - arr(0)) / 256
arr(2) = ((color And 16777215) - (CLng(arr(1)) * 256 + arr(0))) / 65536
End Sub
The CalculateGradient function will receive two colors, the amount of "steps", and one array. Will return false if there is an error, otherwise true. If true, the array will contain the different colors you requested. For example, if steps=5, then the array will contain 5 colors: First will be color1, and last will be color2.
GetColorByPieces will retrieve the color components for each color. It is used by CalculateGradient.
I have a project demonstrating the usage of this function, but I rather email it to you. What is your email? -
I`ve just this minute updated.
Keycode support is very nearly there..
up/down arrows no longer select disabled items.
Thanks for the gradient
Thanks for the example.. I`ve updated menus, i tried to put the code into a module, but it just slowed down. I tried to make it so you could use the routines on different forms..
You`ll have to copy he picture box and code to all forms you want the menus on.. -
a newer version: this time full row select. but no background behind the picture
I`m now working on a toolbar and sub menus.. -
Sen,
Very slick m8
feedback:
Not sure if this is a bug or a feature, after left clicking on the file menu and opening it, If I left click on the form's background the menu doesn't close.
regards
P -
its a bug
i`m more woried about submenus, my brains not working no more.
Thanks for the input..
Post a reply
.NET forum discussion
-
edmonton female escort services near me
by canadapleasure (0 replies)
-
Bagaimana memenangkan $ 1,54 miliar dalam Mega Jutaan
by gametogelan (0 replies)
-
input integer from text file and output text file
by shmilon (0 replies)
-
cSharp stuck at exercise
by xander_Michiels (0 replies)
-
Need help in selected the Tax Audit Year from drop down menu and displaying results for the selected year
by citymumbai (0 replies)
Quick links
Recent activity
- arif ahmad replied to How to receive data in web ...
- William Thompson replied to What is the name of the Win...
- Sameera Piyadigamage replied to Point of Sale Developers: H...
- Scott Carline replied to 4 x C# Developers for large...
- Rajendra Dhakal replied to Restore SQL Server text dat...
- cloud rainda replied to How to convert between TS f...
Enter your message below
Sign in or Join us (it's free).