Alpha On ListViewItem ForeColor / BackColor?
May 25, 2009
I've been tingling with the colors of listviewitems.For the most part, they work great, but I can't set alpha:
Me.BackColor = Color.FromArgb(100, 40, 40, 40)
Me.ForeColor = Color.FromArgb(1, 255, 255, 255)
Me.BackColor = Color.FromArgb(100, 40, 40, 40)
Me.ForeColor = Color.FromArgb(100, 255, 255, 255)
The result of any of these two lines is exactly the same ( no change in alpha ). The colors take ok though.
View 9 Replies
ADVERTISEMENT
Oct 20, 2010
I'm making a C++ code editor application using VB.NET. I'd like to change the color of the keywords as the user types it. Also I'm looking for a way to highlight some lines of the code.
Is there a way to change the forecolor and backcolour of a piece of text inside a textbox or a rich textbox?
View 3 Replies
May 23, 2011
I have set the following colors of my form /controls:
[Code]...
At design time, everything is ok but during the run time, I cannot see the text of labels / groupboxes.
View 4 Replies
Dec 6, 2011
The title says it all, I'm having some difficulties with the combobox, The items in the list are "Black & Green" - Black will be the Backcolor of a Text box, and Green will be the Forecolor.The App I made is just a Mimic of a CMD, and replicates the output of the command into the Textbox. It's 100% complete, but I'd love it to have the ability to have different colors to choose rather than White and Black.
View 6 Replies
Sep 30, 2009
I created 3 Forms (Form1, Form2 and Form3) and I added a button on every form. This is code for Button1 on Form1:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form2.BackColor = Color.Red
Form3.BackColor = Color.Red
Me.Hide()
Form2.Show()
End Sub
Code for Button1 on Form2:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Close()
Form3.Show()
End Sub
Code for Button1 on Form3:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Close()
Form2.Show()
End Sub
Now, the problem is that when I click on Button1 on Form3 it shows Form2 but the Form2 BackColor is not red, it is default color, A.K.A Control Color. But I specified in Button1 on Form1 that Form2.BackColor is Red. And also if I click on Button1 on Form2 when Form3 shows it, the Form3 BackColor is also default, it is not red.
I know one way to solve it but it is so not-professional. It is that you add on Button1 on Form2 this:
Form3.BackColor = Color.Red
and on Button1 on Form3 this:
Form2.BackColor = Color.Red
It is ok in this situation but what if I have more stuff, for example if I have an option for changing theme so it has to change all labels and buttons ForeColor, what then, is there any other way?
View 8 Replies
Mar 23, 2012
How can I change the backcolor or forecolor of highlighted item in listbox?
View 7 Replies
Feb 9, 2009
I am trying to change the forecolor and backcolor of the column headers in a ListView and I have been able to change the background color; however, now the text has disappeared (the text that shows up in the column headers). How do I go about specifying Color.Argb(193, 218, 248) as the text color? Please advise as I have searched all night online and have not been successful as of yet.
This is what I am using right now:
[Code]..
View 3 Replies
Feb 20, 2009
i've a datagridview control populated with records from database. i've formatted certain cells of datagridview according to a condition. (i mean i've set the fore color and back color of cell). But when i export these datagridview contents to excel 2003, no cell colors will be appearing.
i'm developing desktop application with vb.net 2008 and excel 2003.
View 1 Replies
Feb 20, 2009
i've a datagridview control populated with records from database.i've formatted certain cells of datagridview according to a condition.(i mean i've set the fore color and back color of cell).But when i export these datagridview contents to excel 2003, no cell colors will be
View 3 Replies
Mar 24, 2011
Is there an effecient way to give one label the ForeColor, BackColor and Text of another one of 3 possible labels? I need to do this frequently for a dozen labels in a windows form.
View 2 Replies
Jan 13, 2010
I have PNG and need to know if it has an alpha (or if the alpha is completely white)? How can I accomplish this in vb.net code.
View 1 Replies
Feb 11, 2010
1: Start with bitmap in picturebox colored white2: Draw a filled rectangle (50,50,100, 100) Color black - ARGB (255,0,0,0)3: Draw a filled rectangle covering black rectangle (25,25,150, 150) Color blue, with Alpha set to 100 - ARGB (100,0,0,255) -because of 100 Alpha setting the black rectangle is visible through the blue rectangleProblem : Using bitmap.GetPixel on the blue rectangle (over white background) the result is ARGB(255,155,155,255) -an Alpha value of 255. The new color loooks the same but is not transparent.Question: How to find Alpha(transparency) value of pixel
View 7 Replies
May 3, 2012
on cloning a selected listviewitem from listview1 when a button is clicked to listview2. How do I achieve this? Here is the code I have but does not work exactly how I want it, it just makes a clone of all the listviewitems in listview1.
foreach (ListViewItem item in this.listView1.Items)
this.listView2.Items.Add((ListViewItem)item.Clone());
View 3 Replies
Aug 30, 2011
I want to start a thread, which handles a class.That class should add a listviewitem into a listview on the main form.[code]No idea why that doesn't work.I really need threading, cause it would block the program.These codes are examples, the real one is with loops & stuff, so that blocks the program.
View 1 Replies
May 2, 2012
Trying to figure out how to take a selected listviewitem and when a button is clicked add it to another listview.
View 10 Replies
Dec 2, 2004
I am trying to find a way to associate a key with an index for a Listviewitem in VB.Net. I'm not even sure if it can be done with .Net but I know in VB6 I could do a
Listview.listitem.add "somestring", "somestring".
For the application I am using this in, I cannot have duplicate item.text so I would make the key the same as the string. this also made accessing the item easier since I didn't have to rely on index to update the subitems.
View 12 Replies
Jun 25, 2009
How would I go about referring to specific listview items directly.
Under certain circumstances I want to check a specific listviewitem, but i can't seem to refer to the specific item of the listview...
View 4 Replies
May 26, 2011
Dim phoneNumber As String = "077 47578 587(num)"How do i strip the above string off every character which isnt a number. So only the numbers are left and then check to make sure it is 11 characters long?
View 4 Replies
Apr 9, 2009
I have a ListView, wich its View property is set to LargeIcon and there isn't any ImageList attached to it.The thing is that ListViewItem's text overlaps next ListViewItem's text. With View set to Tile I have no problem at all, but It shows the items one below another.When I add columns header,I set their width to a large number,but it seems that ListViewItem doesn't care,I get the same mentioned effect.My question is wich property do I have to change to avoid ListViewItem's text overlapping?
View 6 Replies
Nov 17, 2011
I'm trying to create a program using Visual Basic .NET 2010 that alters the use of my media keys - Volume up, Volume down, Play, etc. All of the example I have found don't seem to compile quite correctly in 2010. Don't get me wrong they run fine and look exactly as specified but the problem is that the form cannot be edited because it claims the designer code is ill-formatted or something along the lines of that.
Can anybody possibly spare a project or form that has perpixel alpha transperancy?The only thing i want to do is show an overlayed png that has an alpha channel, on the desktop. The form border style will most certainly be "NoBorder"
View 1 Replies
Jun 30, 2009
I am trying to create a function that would take 2 images. 1 of the images is a grayscale image and the other is a normal image. What i want to do is apply any of the R or G or B of the grayscale image (in grayscale image r=g=b so it makes no difference) to the Alpha of the second image. i DID succeed on it. However the code is EXTREMELY slow. It takes 1 second to perform it. And i have to perform the function atleast 30 times a second (it will be outputting to a Decklink card). Here is the code:
public function createOverlay(ByVal Main as Bitmap, ByVal Key as Bitmap) as Bitmap
For index as integer =0 To (Key.Width*Key.Height)-1
Dim crntX= index Mod(Key.Width)
[code].....
This function will have to run infinitley until the user presses stop and keep updating the output buffer. How can i make it faster? ( i need at least 30 executions per second)
View 5 Replies
Mar 1, 2009
Here is my problem, I have been learning about SendMessage and getting the Handles of Windows. In the following code example I show that I can get the number of Items in a ListView Control by API, but I have no idea of how to select an Item within the Control, ListView; in other words, how to select a ListViewItem:
[Code]...
View 3 Replies
Feb 11, 2011
I have a form that has a listview with a number of items on it. In certain circumstances, when I load the form, I want a particular item to be automatically selected. The user will select the item to be selected from another form, and I will pass this item to the form in question.
But how do I tell the listview 'hey, set this item as your selected item?" There isn't a writable 'SelectedItem' property.
View 4 Replies
Mar 2, 2009
I have been learning about SendMessage and getting the Handles of Windows. In the following code example I show that I can get the number of Items in a ListView Control by API, but I have no idea of how to select an Item within the Control, ListView; in other words, how to select a ListViewItem:
Public Class Form1
'Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
[Code]....
View 14 Replies
Nov 9, 2010
I have Main and Detail forms. The Main form has ListView1. I would like to select new added ListViewItem in ListView1 when user click Save button in Detail form. I have problem only when I'm adding new item. When I modify and save existing item according item is selected after save command.
View 1 Replies
May 2, 2010
I would like to drop a few buttons onto a picture box or a container control that has a background image set.
I would like to have the button's image be an alpha PNG file.
I can manage the mouse over and click such that the button behaves exactly as one does on a web page.
I struggled with it in vb.net 2005 with no luck. If you take a PictureBox and lay it on top of another PictureBox, and set its images to alpha PNG's, and its background to transparent, then the form shows up in the alpha blend, not the other picture box.
And if i accept that i am limited to the background of the form, then it's performance then becomes unacceptable.Since i can Graphics.DrawImage onto a PictureBox's image fast, i assume that the folks at Microsoft must have decided to use the form's background (and slow painting, and not the other controls and the z-order), by design. I cannot for the life of me figure out why they have made that choice.
So my question is this:Does vb.net 2010 support the layering of controls that supports alpha transparency, and can we now create a custom-control with a transparent background?
View 4 Replies
Dec 7, 2010
below is a small part of my asynchronous TCP connection code. When I connect I'm passing a ListViewItem as Object parameter. I'd like to update the ListViewItem once the connection has been established or an error occurs. ServerConnect runs on a separate thread, because it's an asynchronous connection, so I can't update the ListViewItem directly.
Does anybody know how to update the ListViewItem?
I looked at jmcilhinney's asynchronous TCP example in the Codebank forum, but it confused me. I don't know which parts I need and which parts I don't need.
::edit::
One more thing. I also need to update the ListViewItem in the Read sub, but I'm passing "buffer" as Object, so how would I update the ListViewItem there?
vb.net
Imports System.Net.Sockets
Public Class TCP
Private Socket As TcpClient
[Code].....
View 8 Replies
Aug 6, 2009
i have a listview in form1 and combobox in form2..i want add every first item of listview of form1 into combobox of secondform....i did this...
View 1 Replies
Jan 29, 2011
I'm using the Wolfram Alpha API wrapper for .NET at this location http:[url]......However it's written in VB.NET and written for version 1.0 of the API. It's unusable.
View 1 Replies
Jan 12, 2010
I have a listview but I would like to add 3 properties (for example one of them is "image") to the listviewitems in it. I was fine with making a custom class with the 3 properties and just inheriting ListViewItem but now I need to use MultiSelect, so it means doing things like(in For Each loops):
ListView1.SelectedItems.Item(i).Image don't work because it returns a ListViewItem not my CustomClass. I could always do : Ctype(ListView1.selectedItems(i), MyCustomClass).Image
But using that over and over again seems like a waste/wrong way to do it?
View 2 Replies