Transparent Drawing Surface To Place Over A Group Of Controls?
Aug 17, 2009Is there a transparent drawing surface I can place over a group of controls?
View 5 RepliesIs there a transparent drawing surface I can place over a group of controls?
View 5 RepliesSo I've created a custom ListView by inheriting it and overriding the OnDrawSubItem(). I can now draw icons in several of the columns. It's pretty nice! My question is, is there anyway to do this for the ListViewGroup? I'd like to place an icon just before the group text.
View 6 RepliesI am making an application in VB.NET that allows a user to highlight some text in images of documents so that the highlights could be saved for future reference, but the original images would not be modified. I figured I can achieve it by creating a graphics out of an image file and allowing the user to draw on that graphics. The problem is - the graphics can not be created from indexed image files, which many of mine are. I am wondering: is it possible to create a transparent graphics surface above an image in a PictureBox control, so that the user could draw on that surface, but it would appear as if he is drawing directly on an image?
View 3 Repliesstudying GDI+ for drawing, there are many suggestions to expose the graphic surface for the paintbox control or a form using e.graphics in the paint event. Can graphics be exposed outside the paint for the picture box control?
In my old vb6 project that I am converting to vb.net 2010, I have several large routines located in a code module that draw lines, circles, etc on a picture box and it is desirable to keep these outside the paint event of the picture box so the same routines can be used to draw on more than one picture box.
In experimenting, I found I can create e.graphics from the picture box paint event and pass it by reference to a drawing routine and the drawing routine seems to work ok on initial experiments but it requires visiting the picture box paint event to get the drawing surface in the external sub.Is this apprach good programming practice or is there a better way to create the graphics surface of a picture box or form in subroutines outside the paint event?
Question:Is it possible to make a userform transparent but have non-transparent controls?I notice changing the opacity of the userform will change the opacity of controls embedded on it.
View 9 RepliesI am writing an application and I do not know how to reference a group of controls inside a group box. I will include the code I have written so far and a picture with a detailed explanation as to what I am trying to do. Feel free to comment on any discrepancies that you may notice in my code.
Code:
Public Class Form1
' The following class-level constants are used
' to calculate the price of the model
Const decCOUPE As Decimal = 18000
[code].....
Okay, I'm making a fresh start and re-exploring my options. I'm trying to put a layer of transparency over a program that will act as a drawing layer. The cursor should be able to sniff to see whether it's sitting on transparency, or a drawn object. Transparency it will click through, while clicking on a drawn object will enable the user to edit said drawn object.
I've been trying to do this using a user control I made from scratch, but this is starting to look more and more like a dead end the deeper I get into it. Currently the layer of transparency works, along with the cursor sniffing, but the user control refuses to be brought to the front.
Any ideas on other ways to go about this / ways to make the user control work?
I have code that creates a number of pictureboxes on a form. How can I place the pictureboxes inside a group box rather than directly on the form? Here's a snippet of my [code]...
View 1 RepliesI am working on a snake game for my portfolio and was wondering where the best place to put the logic for drawing the snake. Should the code reside within the snake object or within the form? Either would work, but I am wondering from a business objects/coding standard perspective where such code belongs.
View 2 Repliesi'm trying to place a label with "backcolor = color.transparent" over a progressbar, but it seems that the progressbar becomes transparent too, how can i avoid this?
View 6 RepliesI know Opactity controls a form's tranparency but the controls have the same level of tranparency too.
View 5 RepliesI wrote a class, StyledForm that inherits from Form.
StyledForm draws a styled titlebar, ect. However, in the designer you can place a control over the titlebar (because it isn't actually the form).
In a normal form if you place a control in the same spot, the titlebar (or form edges) would draw over the control, and the control wouldn't receive input there.
if I set the property Opacity = 0, a form becomes transparent... but become transparent all it controls, too!how to make transparent ONLY the form and let the controls, labels, buttons etc. visible??
View 3 RepliesWhen I make my form Opacity 0% everything disappears including controls that I know will happen im not dumb ok so I tried another method using Transparency Key I had success BUT my problem there is that when I have a picture box and an image IN the picture box around the image is the Form Background color so lets say I picked Maroon for Form1.BackColor, The edges of my image is Maroon
View 6 RepliesI have made one game Tic tac toe. Where the use could place a X or a O i used a empty label with back colour "transparent" for them to click on.I have now come round to making a Connect 4 game in the exact same solution, once again i am using empty labels for the users to select which slots to place there counters. However when i select "transparent" as these labels back colour they still dont go transparent.Its now happening on all forms, all projects, is there another attribute that controls if a background can be transparent?
View 6 RepliesHow can I make a panel on my form not become transparent when the form is set to transparent? I have the form at 80% opacity, but I don't want the panel to be transparent.
View 6 RepliesI am having trouble finding a way to make the form transparent but the controls still visible. The only transparency I have been able to get to work on the form is
Me.Opacity = <value between 0 and 1>
but that affects all the controls on the form Is there a way to make the controls not inherit this property from the form? Is there another way to make the form transparent? I have buttons and a checkbox that I don't want to be affected by the transparency at all, and a picturebox that I do want to be able to control the level of transparency. Currently, I'm using a slider bar, and controlling the opacity of the form, but that makes everything on the form transparent. I'd actually like for the form itself to be completely invisible, and for my slider bar to control the opacity of the picturebox only.
I have a form populated with controls. Short of looping through every control and hiding them, is there a way I can draw something like a message over them using the form's paint event? Or would I be better off putting an actual control in the middle of the form over all the controls?
View 3 RepliesBasicly what I have is a form and it is serving as an interface to an access db. Well it has some navigation buttons on it now, but I am trying to place a navigation drop down with the db controls that drop under it when I click it.
View 2 Repliesif I set the property Opacity = 0, a form becomes transparent... but become transparent all it controls, too!how to make transparent ONLY the form and let the controls, labels, buttons etc. visible??
View 2 RepliesI have multiple picturebox controls in my form. Both of them contain an image with a transparent background. I want them to be on top of each other. I've already set their BackColor property to Transparent, but when I place one on top of the other one, the following happens: [URL]. How can I make them transparent while they are on top of each other?
View 4 RepliesI have a 75% transparent form and I would like the controls and elements that I place on it to be 100% opaque. I've searched but didn't turn up any results.
View 4 RepliesHow can I group controls in my Form?
I don't need groupbox or panels, just something in the code...
To make it clear:
I have one form, Form1.
I have 3 buttons: Button1, Button2 and Button3, and I have 2 labels, named Label1 and Label2.
I have 2 "groups", in group1 there is Button1, Button2 and Button3. In group2 there are the two labels (Label1 and Label2).
But how can I program that, that if I write (for example) "Group1.Hide()", then everything In Group1 hides (visible = false). And so on with group2.
I programatically add a group of UserControls to a flowLayoutPanel control.
sometimes I need to destroy that group of controls, but have no idea on how to do it.
assigning the flowLayoutPanel variable to nothing only erases the pointer, but the controls remain in the window.I have found a page in MSDN saying that the best way to destroy a control is to call the DestroyWindow API, to destroy the container window. But I don't want to destroy the container window.
I have 53 text boxes in my windows forms application. I need to save the "text" of all the textboxes into a single file. Is there a way, I can control all the textboxes as a single textbox group and use its properties.
For example: Can I write something like :
For i As Integer = 0 to 52
Textboxgroup.text = TextBox(i).Text
Next
??
I know this is probably not going to be simple, I tried searching around, but couldn't find anything. I am using some code to 'draw' text in a custom format to a panel with a custom bitmapped region (custom shape).Here is the code that writes the text inside a specified area:
g = LeftControlPanelV2.Panel1.CreateGraphics
Using fnt As New Font(New FontFamily("Arial"), 9, FontStyle.Regular, GraphicsUnit.Point)
Dim sf As StringFormat = StringFormat.GenericDefault
sf.Trimming = StringTrimming.EllipsisWord
[code]....
Obviously the text is not really located on the panel, but looks like it as it's drawn on top of the panel. So, when the panel or form that the panel is attached to moves, I lose the text. I though I could just call back to writing the text when the panel/form arrives at the correct place, while clunky, it works to a degree. I was hoping there was a better way of doing this, so that the text doesn't disappear when moving controls and I don't have to make repeated calls to the same drawing text over and over and over...
Edit: Should probably add that there will be 5 different panels each with their own custom drawn text, and all 5 need to move at the same time...
I have designed a form in VB.NET. At design time I have placed two buttons on it. When I run it, the form size looks smaller and the buttons I have placed at the bottom are not visible. Also the alignment of the text and picture box is also different from what I set at design time. Computer at which I am running the form is using a different resolution.
View 2 RepliesI have a asp.net placeholder which gets populated with many custom controls, each custom control is a summary of a location containing various facts and interactions. When directly populating the placeholder with the controls they get added one under another down the page. I'm trying to find a way to place each custom control generated in a loop in its own tab (any sort of tab, asp.net/jquery ui etc) so that the user can select the summary they wish to view instead of having to scroll down the page to find it. (I'm using ASP.NET and VB.NET)
View 2 RepliesDim img As New Windows.Forms.PictureBox
img.Location = New System.Drawing.Point(newx, newy)
img.BackgroundImageLayout = ImageLayout.Zoom
img.Size = New System.Drawing.Size(100, 100)
img.Name = "img" & t
I need a mousedown function to cover all the images that are produced by the above code.The following code only affects the areas that aren't covered by the images. I just need something that covers the whole form
Private Sub main_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyClass.MouseDown
MsgBox(Me.GetChildAtPoint(e.Location))
End Sub
I am wanting to populate a form with check boxes and labels on starting of the app. My idea is to store to locations on the form in a database. I am creating an app that would have check boxes and labels that the user could check off to store points for completed tasks. The tasks on the form could change so I want the form to change as the tasks are changes with out re-coding the app.I am using VB 2003. I have searched but couldn't find anything.
View 2 Replies