|
Okay, I have added a menustrip to a program, and when you rune the program and use the menu strip, the "onmousedown", "onmouseover" or what not, of the items have different colors than I want them too, how would I change the colors for when you scroll over a menu item, and for once you click the menu item...
Right now it's like this.... [File][Edit] ... Background Color = Black, Foreground Color = Red.
When you scroll over one, the Background Color = "LightBlueish", Foreground Color = "Reddish", with a 1px "Blueish" border.
When you click on one, the Background Color = White, Foreground Color = "Reddish".
After you have clicked on one, then scroll over the other options, the Background Colors = "LightBlueish", Foreground Colors = "Reddish", with 1px "Blueish" borders.
What I'm getting at is how to get it for when you scroll over them or click them the Background Color = "Red", Foreground Color = "Black". Thanks.
|
|
|
|
|
|
Well, that didn't really work. Hopefully this can help, I need to know where this should go...
public class MyRenderer : ToolStripProfessionalRenderer
{
protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e)
{
if (!e.Item.Selected)
{
base.OnRenderMenuItemBackground(e);
e.Item.BackColor = Color.Black;
}
else
{
Rectangle rc = new Rectangle(Point.Empty, e.Item.Size);
e.Graphics.FillRectangle(Brushes.Red, rc);
e.Graphics.DrawRectangle(Pens.Black, 1, 0, rc.Width - 2, rc.Height - 1);
e.Item.BackColor = Color.Red;
}
}
protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e)
{
base.OnRenderItemText(e);
if (!e.Item.Selected)
{
e.Item.ForeColor = Color.Red;
}
else
{
e.Item.ForeColor = Color.Black;
}
}
}
public class MenuStripAllowsCustomHighlight : MenuStrip
{
public MenuStripAllowsCustomHighlight()
{
this.Renderer = new MyRenderer();
}
}
Where should that go, I believe it will be what I need to complete what I want. Here is what I already have... Well, I will post the "Edit" menu...
Public Class Form1
Private Sub CutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CutToolStripMenuItem.Click
TextBox1.Cut()
End Sub
Private Sub CopyToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CopyToolStripMenuItem.Click
TextBox1.Copy()
End Sub
Private Sub PasteToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PasteToolStripMenuItem.Click
TextBox1.Paste()
End Sub
Private Sub SelectAllToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SelectAllToolStripMenuItem.Click
TextBox1.SelectAll()
End Sub
End Class
Thanks.
|
|
|
|
|
|
If you actually read the entire thread I posted, you will find your answer. You will not change the "hover" or highlight color by changing either the Forecolor or the Backcolor properties. Forecolor typically affects font color of a control and backcolor will change the fill color when not hightlighted. BTW, voting 1 for a post that was a legitimate effort to help is very rude.
|
|
|
|
|
Well sorry, I also stated that I couldn't figure out how to use your suggestion to my advangtage, so that is why I did what I did... Sorry, I didn't realize you would take offense for such a small thing... But thanks.
|
|
|
|
|
want to sell my softwares online what steps should i take, will standard edition licence work plzz help
|
|
|
|
|
Boost2010 wrote: want to sell my softwares online what steps should i take
Contact your local Chamber of Commerce, build a nice site that's fast and interesting, write some good software, research various online payment-methods, and check out the competition.
Boost2010 wrote: will standard edition licence work plzz help
For what application? If you're referring to your own application, then yes, a standard edition license would be fine. My second guess would be that you're referring to the license of SQL Server, or another 3d-party product.
In the case of SQL Server, yes, you need a license. Unless you're using SQL Express, which is free.
For any other third party library/application/control you'd need to check the license. You can paste the productname in a post here if you're unsure
I are Troll
|
|
|
|
|
Hello To All,
My Application Accessing Registry and Write. So Antivirus is treat it Like a Spyware. So please Give me the solution for using it.
Thanks
Anubhava Dimri
If you can think then I Can.
|
|
|
|
|
Not much you can do with code. Disable your antivirus.
If you are writing code for a client, make sure they are made aware about this.
There are only 10 types of people in this world — those who understand binary, and those who don't. |
|
|
|
|
|
Thanks for relying Abhinav,
My application working fine but in the Client Machine where Antivirus is installed my application shows like a virus and Application will be block working or delete.
If you can think then I Can.
|
|
|
|
|
It's up to the antivirus software, but it may depend on where in the Registry you're writing to. So, where are you writing data in the Regsitry?
|
|
|
|
|
I am writing data in the LocalMachine of Registry.
If you can think then I Can.
|
|
|
|
|
That's why you're getting flagged. User code should not be writing anything to HKEY_LOCAL_MACHINE.
Pick a different place to put your data, such as a file.
|
|
|
|
|
Hello To All,
Actually i have not any idea for Sucuring my code from deesembler. And How to Use Security Tools (sn.exe,Makecert.exe,Certmgr.exe,Caspol.exe,PEverify.exe etc).
Your help is needed.
Thanks & Regards
If you can think then I Can.
|
|
|
|
|
Those tools do not stop anyone from disassembling your code. Google for ".NET obfuscator" instead.
|
|
|
|
|
eg_Anubhava wrote: Actually i have not any idea for Sucuring my code from deesembler.
First, ask yourself how many computers there would be that are running an illegal version of Windows. How about Office? Now, with the knowledge that even Microsoft doesn't have a definite answer, how much money do you want to spend on prevention?
eg_Anubhava wrote: And How to Use Security Tools (sn.exe,Makecert.exe,Certmgr.exe,Caspol.exe,PEverify.exe etc).
The explanation on how to use them can be found quickly with Google. Knowing when[^] to use them is somewhat trickier.
I are Troll
|
|
|
|
|
Eddy Vluggen wrote: how much money do you want to spend on prevention?
7%
|
|
|
|
|
hi friends,
i need to get system information and mac address in vb6.0...
plz help me..
Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
Mail To : foreverkans@gmail.com
|
|
|
|
|
Look here,
MAC Address in VB6[^]
google to the rescue again
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|
|
thank u for reply...
i need harddisk serial number also...
how to get??
Any possible in vb 6.0
Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
Mail To : foreverkans@gmail.com
|
|
|
|
|
Did andy's "google to the rescue" line not give you hint?
Also, search this form, i think this was discussed about a month ago.
|
|
|
|
|
From the depths of Google[^]
This should do it.
As Dave said previously, these were very simple to find simply by using your questions.
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|
|
Use WMI. Also, the HD serial number changes every time the disk is formatted.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Ok, i know it sounds ridiculous, but i am stuck here.
I have 2 spineditors.The purpose is to make an SQL statement.
The first(a) spineditor takes values from 1 to 12 and represents the months.
The second(b) spineditor takes values from 1 to 5 and represents the latitude of the value selected in a (the number of months above and below the first spineditor).
For example.
If on (a) i choose 1(JANUARY) and on b 2(which means i want to get 2 months below JANUARY and 2 months above JANUARY), i want the SQL stetement to be "SELECT * from TABLE WHERE (MONTH BETWEEN 11 AND 12) OR (MONTH BETWEEN 1 AND 3)"
In other words i want to select all the months from NOVEMBER to MARCH
I hope you understand what i am saying here
|
|
|
|