Painting An Opaque Black Rectangle?

Mar 5, 2009

I'm not sure if this should be here or in the Graphics subforum. Basically, I want to simulate the monitor(s) going black (it's an immature April Fool's Day prank). My initial thought was to create a borderless form that is the size of all the monitors with a backcolor of black. Then, slowly, increase the opacity of the form. This approach works great as far as the visual effect I'm trying to achieve...the problem is that it's a form. If the form is on top - while you can *see* windows below it - you can't interact with them. I'm wondering if there is a way to create the same visual effect without using a form so that the PC will remain usable while the monitor appears to slowly be getting darker?

View 1 Replies


ADVERTISEMENT

Draw Rectangle On Image Where Color Pixel Is Black?

Mar 17, 2011

I want to draw a rectangle on image where color pixel of image is black

View 1 Replies

.net - Opaque Form Overlay Without Covering Task Bar?

Aug 10, 2010

Using Visual Studio 2008 and VB.NET ...

I've created a form (OpaqueForm), which is an intermediary form between other forms which I will open with ShowDialog. The idea is that when I want to show a form using .ShowDialog, this OpaqueForm, with an opacity other than 100%, sits in between the main form and the dialog form, effectively "greying out" the underlying main form.

The OpaqueForm has the FormBorderStyle property set to None, and accepts in the constructor a Form object on which it invokes .ShowDialog. The effect works fine, but there is one caveat. The task bar is also covered by the OpaqueForm; I am assuming because it has a FormBorderStyle of None and a WindowState of Maximized.

I don't want the OpaqueForm to cover the Task Bar, because it would be impolite to have my modal form lock out a user from switching between tasks. How could I go about preventing OpaqueForm from covering the Task Bar, too, while still using a FormBorderStyle of None?

View 3 Replies

Semi-transparent Form With Opaque Controls?

Oct 30, 2009

I 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 Replies

Draw A Shape In GDI+ That Overlays Opaque Pixels With Transparency?

Feb 24, 2010

I have a mask bitmap (bmpMask) that I am drawing onto a destination bitmap (bmpDest). Both bitmaps have alpha channels but are already full of opaque content. What I want to do is produce transparent areas using GDI+ 'Draw...' methods on bmpMask so that bmpDest shows through when I draw bmpMask over it.Of course gMask.DrawLine(Pens.Transparent, 0, y, wMax, y) causes no change to bmpMask, because GDI+ works as designed and doesn't draw anything when transparent. Even with semitransparent colors, only the r,g,b values of bmpMask's pixels are updated.

View 1 Replies

List(of Rectangle), Rectangle.offset(x,y) Doesn't Work?

Jul 26, 2010

i've got a little problem with List(on T) variables.

[code]...

It works perfectly fine. Does anyone know what the problem is?

View 2 Replies

Identify Subtriangle Within A Rectangle Given A Coordinate In That Rectangle?

Feb 22, 2010

Given a rectangle of width w and height h. and a coordinate x,y in that rectangle I would like to identify which triangle I am within.

i.e. the function should take parameters(x,y) and return a,b,c,d or a zero based number representing that triangle index i.e. (0=A,1=B,2=C,3=D) if they are in that order.

I think this would be something like >= the formula of the red line and >= the formula of the green line?

I'd like to implement this in VB.NET

View 3 Replies

Draw Rectangle Divided To Four Rectangle?

Dec 3, 2011

This code is to draw rectangle. How can I draw rectangle divided to four rectangle or more

e.Graphics.DrawRectangle(Pens.Coral, 50, 200, 30, 40)

View 11 Replies

Drawing Rectangle Inside Another Rectangle?

Jul 26, 2009

I'M creating a kind of photo viewer, and I cannot figure out how to orient the scroll buttons with the photos I want to draw because they all are different sizes.This is really hard to explain so please ask questions if you don't understand.I'M thinking if i could draw every photo on a single rectangle and then the scroll bars will position that rectangle up or down. but is there a way to make a rectangle inside another one so it only shows inside that rectangle?

View 10 Replies

Cell Painting In Datagrid?

Aug 19, 2009

This is mis system projectcell painting in datagrid when error while calculating datai have made a datagrid with 7 columns firstly 7 r with values 0 at beginning when user enters input then in the datagrid with first 6 columns & 7 one with total i.e. total (column 7) = col1 + ...to Col7now, when the total entered by user is different from total it should match itif same then no cellpainting is done

View 4 Replies

Datagridview Scroll Bar Painting

Sep 29, 2010

Has anyone ever noticed that when adding many rows to a datagridview the scroll bar has a problem painting and the user can no longer use it? How do I fix this?

View 3 Replies

Datatables And Screen Painting?

Dec 2, 2010

Their system executes a DB query everytime they select something, causing performance issues. So I thought that I would read the superset of data into a datatable, and then whenever they want subsets, simply run against the datatable. I've done some testing and the performance difference is HUGE.The problem is how the screen paints on postbacks. The screen will temporarily go blank then the data will appear as expected. Of course, they don't want the blanking of the screen each time they select a subset of data.

I am currently using a repeater to handle the display of data due to the nature of what they want to display. A datagrid might be a good alternative for sorting functions, but I think it would still blank the screen when it data binds.How do I go about filling the repeater without blanking the screen? Is it even p[ossible? Logically I would think not but I don't have the experience. Or perhaps I can fill a datagrid without blanking the screen on the postback?I'd rather not have to go out to the database every time, but if that's the way to go then I can live with that.

View 5 Replies

Doing Art/painting/graphics In Basic?

Aug 24, 2010

I downloaded Visual Basic 2010 Express and got familiar with it over several days but the following issues are stumping me:

Where are the art instructions to be found? The ones featured in the examples are pretty basic. I've looked all over but can't find anything.

View 2 Replies

Painting A Polygon Given The Coordinates?

Feb 18, 2011

I just finished creating a program where you find the area of a 5 sided polygon. But not I want to actually draw the polygon given the coordinates

Private Sub PI_Estimation_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
Dim myGraphics As Graphics

[code].....

View 1 Replies

Painting On A RichTextBox Control?

Oct 16, 2009

Drawing on top of a RichTextBox control has always been a pain due to the Paint event, and related OnPaint() method being suppressed. Here is a bit of code that gets around this issue.The following derived RichTextBox will use a seperate NativeWindow control to hook into the message stream of the RichTextBox, listen for the WM_PAINT message, and then raise the Paint event on the RichTextBox for you.In this way, it is possible to use the Paint event handler of the RichTextBox control to paint on top of the control after it has performed its default rendering of the text.The following code is an initial implementation but appears to be pretty solid so far. 'Based in part on code located at: [URL]

''' <summary>
''' A RichTextBox object which raises, and utilizes, its own Paint event.
''' </summary>
''' <remarks></remarks>

[Code].....

I may continue to expand upon this idea, but I wanted to get the initial code out here as this seems to be the minimum to get the painting functionality to work.Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

View 1 Replies

Painting - Gradient Effect From Red To Yellow

Jan 2, 2010

in the painteventargs of the form, i've got something like this: [Code] i'm getting a very cool gradient effect from red to yellow, but why is that the case? shouldn't the 1x1 portion be totally red? and the remaining pixels be totally yellow?

i'm not trying to paint a 1x1 portion in my form, im trying to know why e.Graphics.DrawImage(bm, 0, 0, 100, 100) doesn't draw a 1x1 red portion on my form through the code provided above. my understanding is that 0,0 specifies the point to draw the image. bm specifies the image actually drawn, which is 1x1 px. and 100,100 specifies the allowed space for the graphics to draw, if this is correct, the first pixel should be red and the remaining 9999 pixels should be yellow but they aren't.

View 5 Replies

Painting Only Part Of Text In Cells?

Feb 18, 2011

painting only part of text in cells like my column is NAME and values are bahushekh ,bahushekh1,msdn ,abc etc for that column. Now I want to paint only bahu in Red if it exists rest part will be black

View 2 Replies

Painting To Graphics On A Panel With A BackgroundImage?

Feb 28, 2012

I have a panel that has a BackgroundImage set to "zoom". Because of this, the image usually has some grey "letterboxing" showing the panel beneath the BackgroundImage. I want to paint on the Graphics Object of the Panel using its paint event handler. Is there a way to contrain my painting to just the image part of the panel? Is there a way to find the rectangle that the BackgroundImage is occupying within the panel?

P.S. I don't want to make a graphics object from the BackgroundImage because I'm already using that for some other "paint layers".

View 5 Replies

VS 2008 Painting - Minimize My Application

Apr 28, 2010

I've never had a need minimize my application until today. But when I did, and I brought it back up, it looked... strange. Which makes me think it has something to do with a paint problem... or something.

Before:

After:

View 3 Replies

VS 2008 Painting Cell In DataGridView?

Apr 29, 2010

I have a datagridview, wich on colum is a Combobox getting data from another table.This column it's an evaluation score mark, who permit user choose between number 1 and 10I wanna do the following:In my DGV, if the value is lower than 5, then paint this cell, and only this cell, redIf the value is uper than 5, than paint this cell green (and only this cell).That means in the DGV I will have at the same time, red and green cells.

View 1 Replies

VS 2008 Painting Part Of A Tab Control

Nov 24, 2010

How do I paint the part pointed to?

View 1 Replies

VS 2008 Print After Painting To Picturebox

Sep 20, 2009

I am not doing something right! I just changed my program over to painting to a picturebox instead of the form. Anyway I want to be able to print the picturebox as big as it can on a 8.5x11 size piece of paper without streching the image!

First of all I can't even get it to print at any size... it says I have no Picturebox1.image!

Public Sub Picturebox1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint, PictureBox1.Paint
g = e.Graphics

[Code].....

View 4 Replies

VS 2010 Custom Painting An MdiParent?

Jun 4, 2010

I'm tired of looking at the boring default dark gray back of an MdiParent. I tried using Juggalo's Gradient Form and realized that the MdiParent was not being painted, at all. A temporary work around was to create an Image and set it as the background. This is fine and dandy but when I bring the thing to full screen and drag around my MdiChildren forms, the application gets laggy. I have already tried setting the Form to Double Buffered and it doesn't work at all, no noticeable change.I did try editing the Form's Paint() event, but to no avail.Here's the code I'm using to create the image (practically from Juggalo's Gradient Form):

[code]...

Creates the image nice and fast. I want this to happen in the Form's Paint Event though, so I don't have to rely on an Image that causes my program to lag about.

View 39 Replies

Center A Cursor At The Top Of A Line In Freehand Painting?

May 27, 2012

How to center a cursor at the top of a line in freehand painting. I made a freehand painting program in Visual Basic 2010, I used m_Graphics.FillEllipse(brush1, e.X, e.Y, 40, 40) for painting a broad line. It works.. But.. the cusor is not centered on the front of the broad line. He is at the Left Top of the rectangle that describes the FillEllipse. How can I make the cursor to stay in the middle of the front , while moving around, so that I can more precise paint with him ?

[Code]...

View 4 Replies

Painting Custom Panel Control (.Net Framework 4.0)

Dec 7, 2011

I have inherited the standard panel control to create a panel having custom border color. The problem is, while the panel is on a form and any other form is moved across it, it paints hapazard lines of the same color as the panel custom border color, all throughout background of the panel. I tried to Refresh or Invalidate the panel in its paint event but of no avail. The same is happening while designing in the design editor too. See attached image. Why is this happening and how to get rid of it? My code follows:

[Code]...

View 1 Replies

Painting Non-client Area Of Windows Forms?

Oct 3, 2010

1)How to Paint close,Maximize,Minimize buttons with images

2)How to change height of title bar

3)How to Paint Form border

View 2 Replies

Painting With .Net 4 And Nested User Controls On Win 7 Machine?

May 22, 2012

I have form, on which a component is placed, which is inherited from Forms.UserControl. This component, called Panel, handles the layouting as visible in the screenshot below.

The screenshot shows 10 Panels. Each Panel contains its own title bar and visible area, in which any UI can be displayed.When the application starts, the application contains only one single Panel. When the user decides to split this Panel into 2 Panels, those new Panels are displayed side-by-side in the area of the old Panel either horizontally or vertically. Inbetween these Panels a splitter is added, so that the user can resize the Panels. The user can do the splitting multiple times, so that you reach a layout as given in the screenshot above with 10 Panels.

Minimizing and the maximizing the application causes a painting issue as displayed in the screenshot below. The red rectangle indicates the area, where the layout is not displayed properly.

Here some additional information:

1. Windows 7 The issue occurs only on Windows 7 machines. On Windows XP the application is running properly.

2. .Net Framework The application was developed for the .Net Framework 1.1. I upgraded it to 4.0. All warnings were fixed, which occured after the upgrade to 4.0.

3. Layouting Technically The Panel works internally with mutiple Forms.Panel, 1 Forms.Splitter etc. objects. If the Panel is not splitted, it displays the title bar and a visible area below, both instances of Panel. If splitted, the Panel replaces the title bar and visible area with 2 instances of Panel again but divided by a Splitter.

View 1 Replies

PictureBox - How To Save Painting On Hard Disk

Mar 19, 2011

I made a painting on a picturebox in Visual Basic 2010. Now I wish to save that picture on my harddisk. But
pictureBox1.Image.Save("C:MyImage.jpg")
does not work.

Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Drawing.Imaging
Imports System.Text
Public
Class Form
[Code] .....

View 8 Replies

Custom Controls - Painting Only Visible Area On Spreadsheet

Mar 18, 2011

I am working on a spreadsheet-like custom control, manually painting all cells according to its bounds and indexes. All is working fine until I populate it to upto a hundred rows (with fixed 6 columns). Basically my sheet expands itself to fit all cells, so to use it properly on a form, I use a panel with autoscroll = true and with my sheet inside. The problem is, the control flickers a lot, which I think is caused by painting ALL of the cells. Is there a way to paint only the visible area.?? So when I scroll down, the control would paint only the visible cells on that area. What I am thinking right now is to not put it in a container, but rather, put a scrollbar in my control. Then that scrollbar would then handle the setting of visible cells, and then my paint event would only paint that visible cells. I am using VB btw, .NET 3.5.. I cant put the code in here cause its separated in different classes(Cell, CellCollection, Rows, Columns, Range, Worksheet, etc.)

View 1 Replies

Interface And Graphics :: Drawing / Painting Imgs To Background.

Feb 9, 2009

Well im just upgrading from VB6 and i was able to paint images to the background of a form. The same method does not seem to work in VB 2008. Is there a way i can draw/paint images to the background of my form?

View 7 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved