Fill A Closed Shape In VB 2010?
Jun 7, 2012how to fill an closed shap in visual basic 2010
i try it but when i press on the button fill all the page was colored
how to fill an closed shap in visual basic 2010
i try it but when i press on the button fill all the page was colored
I am trying to create a legend for some colors and thought of adding rectangleshpes to do so. However, I do not seam to be able to set the fill color of the shape.
View 3 Repliesi am working on a virtual make-up software and the only thing i lack to totally finish it is the lipstick part. is there a way that i can trace the edges of the lips of the picture that im editing and fill its insides with colors from a colordialog that will serve as if it applied a lipstick. just like what they have on jkiwi that users will jut trace the edges of the lips and then the color will automatically be filled out and it can be changed by choosing a color in a dialogbox.
View 1 RepliesI need to create an on-screen shape (circle) that has a fill color, which will blink every X seconds (go from fill color, to white, back to fill color). This is trivial to do...BUT... i want to do it in my own class, so that I can instantiate it numerous times passing it unique coordinates for each instantiation.
How do I do it? Can a class have its own "timer control" in it independent from the form? How would I draw a shape from a class?
Im using a dataset to display data in a datagrid from a sql server DB. One of the colums I have in my datagrid is "Status" the table adapter sql statment selects certain items based on whether there open or closed e.g "where = Open ". I want to remove this row entirely and instead of displaying open or closed for status column, display the open/ closed results in colour on the datagrid. Im really not sure how to go about this whether i need to do it in the table adapter or some sort of property. I presume i need to write a sql statement and selct the identity of the row where x= open etc , is there a way of assigning a colour in sql statement so it displays on my vb form ?
View 2 RepliesI am using Rack-mounted Equipment (US units).VSS as stencil. I need to Connect a server on Rack.
View 1 RepliesThe VBA Code is
ActiveSheet.Shapes.AddShape(msoShapeRectangle, 105.75, 54.75, 114, 65.25).Select
ActiveSheet.Shapes.AddShape(msoShapeOval, 441, 57, 117.75, 90.75).Select
For VB.Net, I tried looking the prefix for "msoShapeRectangle" or "msoShapeOval" in
Microsoft.Office.Core.MsoShapeType. But couldn't find it.
im trying to make an ovalshape change colour when i click a button?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "hello" Then
OvalShape1.FillColor = Color.Red
[code]....
I am trying to make a shape move in a rectangular route clockwise. Right now I am only able to make the shape go right, down, left but not back up again. Whenever I try to make the shape return to its original position, the shape moves back up at the wrong place.
Public Class Form1
Public movingright1 As Integer
Public movingdown1 As Integer
[Code]......
I am creating a simple shape editor, much like the Visual Studio form designer. You can create shapes, select them and move/resize them using drag handles just like in Visual Studio or most other applications (Visio, etc).
I have run into some problems trying to implement a MinimumSize property for the shapes.First of all, this is how I'm resizing the shapes. Each shape has a Resize method, accepting two integers (dx and dy) that represent how much the shape must resize by, and one 'HitStatus', which determines in which direction the resize must take place (for example, from the TopLeft, or Bottom, or BottomRight, etc..)
What it does basically is use a large Select Case statement for the hit status. In each case, it changes the Bounds property of the shape (which determines the location and size), so that it is resized:
[Code]...
for example i have this code :
Sub Month()
Dim Conn As New Data.OracleClient.OracleConnection
Conn.Open()
Try
Dim Cmd As New Data.OracleClient.OracleCommand
With Cmd
[Code]...
What will happen to the datareader when the Connection is closed ( Conn.close)
Will the Cursor that is used by the datareader be freed ? or will it stay open ?
If the cursor that is used by the datareader is still open , when will it be automatically closed ? or should i just closed it manually ?
Will it cause the dreaded "ORA-01000: maximum open cursors exceeded" ?
I have a problem connecting to an access database. I'm currently trying to build a login/register program that reads the username and password from a database and allows login if the specified username and password are found. I have code that will work properly for that so that's not an issue. However, when I make an attempt to register a new username along with a bunch of other things such as email, password, etc. I am unable to because the database connection is closed. The code I'm currently using to open the database connection is :
[code]...
However, when I try to use this code to open the connection to the database, it leaves the connectionstate closed. I decided to then build in as a test, a block of code that would check on load to see if the connectionstate is open or closed. Each time I've run it so far by making a few changes it always tells me that the connectionstate is closed no matter what I do.
I have a program which when a button is clicked on a form sends the form to the back, so that Notepad can open on top, then it opens up notepad
Me.SendToBack()
System.Diagnostics.Process.Start("notepad.exe", myPath & "*********.txt")
Now what I want to do is to detect when the notepad has been closed then I can bring the form back to the front and I just do not know which commands to use for this to detect a program outside of VS 2010.
I have created extension method which operates items in IEnumerable(Of T). .NET Framework 4.0 has new method File.ReadLines which returns IEnumerable(Of String). I got two implicitly typedvariables which operate on lines returned by File.Readlines.The first iteration goes OK, but when second iteration starts, program stops ancompiler goes to my extension method and points to ProcessFunction(item) with the following: "Cannot read from a closed TextReader".If I change data to data.ToList, then no error occurs. What can be wrong?
Here's code:
Module Program
Delegate Sub ProcessFunc(Of T)(ByVal item As T)
[code].....
I created another form that had a pic and two simple buttons, one button plays music the other will stop the music if played and take you back to the previous form. My problem lies in when the users uses the windows "x" button to flose the form, the music does not stop. I have searched and failed and light that could be shed would be awesome.Apparently I saved the wrong file and am not on my VB box so this code is incorrect. I basically added the music to the resources, dim'd it and activated it with a button. The other button not listed in this code was set to "portal.stop()" and "Me.Close()"
Public Class frmFail
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
Me.Close()
[code]....
My program will need to store some settings for when the program gets closed then opened again. I would then like to reload the settings, and I was wondering what is the best way to do this with VB?
- Flat file
- Database
- Registry
- Other
When multithreading in VB, if you close the form while different threads are running, the process itself will not end. Is there a way I can force all threads to end, or end the process like in the Task Manager, when the form is closed?
View 2 RepliesIs there any way to determine whether a form was closed by clicking the "X" button or by calling Me.close? They both fire the FormClosing event, but I need to determine how the form is being closed so I can do different things.
View 7 RepliesI have a program that will load a web page into the Program Contained 'Webbrowser1' and autocomplete the Login by referencing the Code:
WebBrowser1.Document.GetElementById( _
"frmLogin:strCustomerLogin_userID").SetAttribute("Value",
TextBox1.Text)
What I actually want to do is directly enter the Value into the Active Browser page, rather than the program contained 'Webbrowser1'. What code do I need to access the Current Browser Web page (be it IE, FireFox etc)?
How to fill a TreeView from two related tables (Customers 1 -> Products n)? I have seen the example of microsoft using Northwin Database and I do not understand this, I need something simpler.
View 2 Repliesthis is the code in the webpage:
<select id="topic_id1" class="createSelect" tabindex="3" title="Choose a topic (the best that fits)" name="topics[]">
<option value="">Choose a topic (the best that fits)</option>
<option selected="selected" value="5887581">Arts & Design</option>
<option value="5887601">Books, Poetry & Writing</option>
<option value="5887571">Business & Work</option>
[Code]...
I am wondering is there an easy way to fill up text boxes. Lets say, i have a form with 11 text boxes. User puts a decimal number in one text box, hits button and that decimal number becomes converted to binary and i need to fill up all 10 other textboxes with elements of that binary code. My code looks like that:
Dim a As Integer
Dim s As String
Dim aa() As String
[Code]......
<input name="Email" type="text" value="" class="email" />
how to do put text into that field.
I'm quite a newbie when it comes to coding. I am creating a bot to automatically fill in a form for me.I've got everything but the birthday down. When I go to debug, I select my month, date, year, and click the start button. It'll load the webpage but it won't fill in the year section of the birthday. I looked over the code and it looks fine to me.
[Code]...
My program will need to store some settings for when the program gets closed then opened again. I would then like to reload the settings?
- Flat file
- Database
- Registry
- Other
is it possible to fill up a 3 column ListView with an array.
View 5 RepliesIt seems I've tried a million little variations of this and I keep getting the same error: "The SelectCommand property has not been initialized before calling 'Fill'
Imports System.Data
Imports MySql.Data.MySqlClient
Public Class clsDB
[code]....
I am trying to fill a datagridview with data from a SQL database.The dgv will print rows and values where each row is a different category.
[VB CODE] Private Sub populatedgv1()
'setup temptable to store Server data
Dim m_table As New DataTable
[code]....
Why does it only print all the rows for each DS (different sizes/colors) only if there are more then one DS? (if there is only 1 DS it will only print one row, regardless of different colors/sizes but if there is 2 DS, it will print all the values from the first DS)I have gotten a massive headache from trying to figure out these 2 problems. If any1 can help I would be very grateful. Please let me know if you need anymore info (SQL tables, data), and I'll put them up.
I have an Access 2003 DB and an SQL Server 2005 DB.
I have one datagridview where I want to present data from both databases.
My query would look like this:
SELECT
ACCESS2003.Resource_ID,
ACCESS2003.NAME,
SQL2005.Resource_ID
[Code]....
I have an Access 07 database I'm using to store my data. I have no problem at all filling a worksheet in excel or a table in word from the textboxes currently on the screen and saving it as a pdf. That's basically how I'm reporting my data from my program.
Where I'm stuck is how can I do the same process for each row in my dataset that has a date or value similar to a filter? I can filter the dataset by adding a query in the dataset designer so it only displays the rows I want to build form reports for, but I don't know how to code a loop to make it work for each row.
Basically I'm looking to find a way to print and/or create pdf form from one button click for multiple records and not just the one currently bound on the screen.