Draw Graphic With Multi-layers?
Jul 1, 20101. Is there any tutorial to draw graphic show as the picture I upload?
2. How to draw graphic with multi-layers, so that we can do modification on peaks instead of coordinate.
1. Is there any tutorial to draw graphic show as the picture I upload?
2. How to draw graphic with multi-layers, so that we can do modification on peaks instead of coordinate.
im making a game with XNA, but when I draw diffrent layers it's not drawing them transparancy, why? (just run the game and you'll see)
View 4 RepliesI got this code to create textstring and make it center in the rectangle. The probleam that I faced is, it make the text only center for the hight rectangle( as you see in the pic). How can I make it center for both width and height?.
Dim drawString As [String] = "Sample Text"
' Create font and brush.
Dim drawFont As New Font("Arial", 16)
[code].....
Currently I'm trying to make multi selection (draw shape) on the picturebox but no matter how i edit my code, it jus dn draw any square or circle when I click on my button (either circle or square).
Below are the codes that i'm currently working on:
Public Class Page_2
Public blnCircleClicked As Boolean 'Is The Circle Tool Clicked?
Public blnSquareClicked As Boolean 'Is The Square Tool Clicked?
[Code]......
I'm trying to make a mini map for a 2d space shooter of mine; I've for the math down (I think) for when an item should appear on the mini map, but the problem is the graphic. As it stands, the graphic spills over the edge of the mini map graphic and disappears only when it's fully outside. I need it to crop the image, or at least not show it off the mini map graphic.I thought of using the sourcerect rectangle of the spritebatch.draw, but it seems to me that would only work for the right and bottom section, as I can adjust the size of the rectangle. I haven't tried this yet, but I will soon. Can the location of the source rectangle be changed in relation to the graphic that it is a part of being drawn so that I can use that to crop the left and top sides?
View 5 RepliesI am trying to do a game application similar to chess, where i need to move the game peaces(graphics) over another graphics which is the game board. using the mouse. How can I do multiple layers of graphics and control their movement(without direct x)?
Note: I have visual basic 2010 express, windows xp home
i got a large picture box sent to the back with a default image.i got a few picture boxes set to transparent and they are placed in front of that large picture box. these picture boxes have no images, just set to transparent in the properties.
I use the mousehover event on those picture boxes so when one is hovered over, it will change the image of the large picture box which is behind it.the problem is that even though those picture boxes in front have been set to transparent, when the large picture box behind them loaps a new image due to an event, it doesnt show through those picture boxes which are in front of it!
I have a 3 layer treeview and is using the code below. I am getting it to do the following,
1) If parent is checked, check all child nodes.
2 If just one child node is unchecked, uncheck parent node.
3) If all child nodes are checked, check parent node.
Code below only works for 2 layers. Would appreciate if you can guide me how to make it three. There are much information on treeview but most of them seems irrelevant =/ Will be great if you can show me a good guide on treeview control.
Private Sub TreeView1_AfterCheck(ByVal sender As Object, ByVal e As TreeViewEventArgs) Handles TreeView1.AfterCheck
RemoveHandler TreeView1.AfterCheck, AddressOf TreeView1_AfterCheck
For Each node As TreeNode In e.Node.Nodes
node.Checked = e.Node.Checked
[code]....
I am developing a simple database with typed datasets. My employer wants to put two security layers in my database for a verifier and administrator. Anyone can change the database. But later it will be rechecked and marked as verified! and once every record has been verified, the administrator will append those verified records to the actual database. Can any bro devise me a proper method to do that? Right now what i have in my mind is that i put a verified and authenticate boolean in my database. For each edded/edited record, i mark/unmark that verified/authenticated entity as being set or unset. This approach is easy to implement and gives an option to undo any record changes but i'am afraid will compromise the database in space and time.
View 2 RepliesI was wondering if there is any way to manipulate layers of a psd from within a VB program. I would Ideally like to inserts just the psd file in and then once a command is clicked turn one of the layers on or off.
I know I can accomplish this inserting a jpg/gif for each layer and have that image be turned on or off by a button click, but I figured using the psd would save room and if something needs to be aligned differently I can just make a change in photoshop. Opposed to trying to realign the coordinates in VB
Can We control Speed of Gif Images layers / Frams using VB
View 11 RepliesHow would I go about doing multiple layers on a form?Say the first layer contains a command button that when its click, it changes to the second layer hiding the command button and showing the controls on the second layer?
View 6 RepliesBack in Visual Basic 6.0 and prior I could have a picturebox control and then have multiple images on that and using a gif file; then I'd have some images transparent. For example, I am trying to make a map where each country has it's own layer and the void is transparent so the underlying picturebox contains all the water.
However, in visual studio I've noticed the image control is now gone. I tried using a panel and a picturebox on top of that and it works but I can't use another picturebox on top of that picturebox, nor can I stack multiple panels with the same affect.
I want to create a game using visual basic 2010. I'm a specialist in VBA and Excel but not VB 2010.I want to display and hide a whole group of objects. In Acces I used for such cases the TabControl. For example in Tab1 the Game, in Tab2 the highscore and in Tab3 the options. Then I made it transparent, so that the Tabs (Buttons) are not visible, only the objects in Tab1 Tab2 and Tab3. With VBA I select the Tabs controlled by my own buttons (jpg). I tried the same in VB 2010. Without success.What can I do to switch between game, highscore and options without using popups. I want to display them at the same positions. So game objects and option objects should hide and highscore objects should be shown. And the other way round. Like the handling is with different layers in photoshop!
View 2 RepliesI'm adding multi-threading facilities for the first time. I have a function that is wrapped to be run in a separated thread. This function retrieves data (text) from a combobox and it works for sure without multi-threading.
When I call it as multi-threaded, I get the following error when I try to retrieve the data from the cmobobox: Cross-thread operation not valid: Control 'cmb1stBL' accessed from a thread other than the thread it was created on.
It looks like a restriction of thread-safety... I assume that the child thread cannot read from his parent, to make sure that he doesn't change his parent data. So how can I read the data from the combobox? Should I read the comoboxbox data before calling the child thread?
I have a need to build an app that will access about 10 websites and pass data to them, etc.I've read about something called multi-threading when searching Google. I've also seen people say that they use multiple browsers.Which route is better to use? I figure if you have to do some sort of multi-threading that you would access a single browser?
View 2 RepliesI need to get the DataGridView to perform the way it should perform. I'm new to the .NET environment, but I learn fairly quickly. However, I find it difficult to decipher themassive black box of the DataGridView control enough to make it do anything other than what it already does--Draw very slowly.
View 3 Repliesi have one project with multiples web services so i created various singleton class thinking in
performance. now i think create one singleton class and that have the instances of my webservices
[code...]
I have a need to build an app that will access about 10 websites and pass data to them, etc.I've read about something called multi-threading when searching Google. I've also seen people say that they use multiple browsers.Which route is better to use? I figure if you have to do some sort of multi-threading that you would access a single browser?Not sure which way I should approach this app.
View 2 RepliesWe have a great book written for Visual Basic 2005 that we type code that is prepared in advance. We are using Visual Basic Express 2008 and normally this works really great; type the code run the program and it works, however I am running into a snag.
The textbook shows the following code: IN THE(General) (Declarations)AREA we are told to type the following:
' Create a Graphic object to use with the game's bitmap
Dim myGraphicObject As Graphics = Me.CreateGraphics
' Create an empty Bitmap Object
[Code].....
is there a difference between VB 2005 and VB 2008 that would be causing the errors? or am I missing something subtle maybe mistyped?
I would like to know how to use the graphic methods:
-DrawString
-DrawLine
-FillRectangle
I am meant to use these in a method called Drawgraph in order to draw a grid and bar chart. How can I go about this? What parameters do I need to send? What variables do I need to declare?
I have just started to try learning how to use Visual Basic (im running the 2008 express free version). The example im trying to get working right now looks like follows[code]...
View 2 RepliesI am programming a design surface where I add Image objects to the surface when an image is added it calls the draw objects command. It works fine I would like to figure out how to covert the object to an image to save it? Below is the draw sub used to draw objects onto the surface:
Public Sub DrawObjects(ByVal g As Graphics, ByVal Scale As Single)
Dim drawObj As GraphicObject
Dim i As Integer
[code]....
I am working with a graphics program in VB to move an image around the Form. I'm trying to create barriers that cannot be crossed. At first, I tried to represent this with a 2D array, but this proved too complicated. For now, I'm trying to create a series of rectangles. What I want to happen is when the point the image is anchored at intercepts one of these rectangles, it will either be prevented from moving or sent back to where it was directly before the image moved. I know there is an intercept command, but I've been unable to figure out how to use it in this content. The code I have is below.
Public Class Form1
Dim PlayerSprite As Image
Dim BGImage As Image
[code]....
As I said, this is to create a graphic barrier. However, I expect to make a number of these Rectangles?
i would like to be able to erase a graphic that was created.I would like to not have to redraw the graphics minus the graphic thats unwanted.Is there a way to delete a graphic?
View 1 Repliesanyone have experience doing this? when i say imaginary i mean the square root of negative one. how would i graph this?
View 2 RepliesI want to make a form to schedule the on and off time of equipment. & rows for seven days. 96 columns for 24 hours divided by 15 minutes. Each cell will be red for on and green for off. Click the cell to toggle the color. I know what I want it to look like. But I dont think using 500 buttons is a good idea. I am looking for better ideas on which direction to go. I am using visual studio express.
View 1 RepliesI'm developing a scanning application in VB.NET 2005 using TWAIN. The scanner returns to me a handle to a DIB. I need to save this to a file, but I've been searching everywhere and can't find any information.
View 3 Replieshow do I set up a timer to load a graphic from the web to a picturebox
heres a sample graphic
[URL]
its real small so it will load fast. the link will be different but this is good enough to test with
I need it to be on a timer event to load this graphic every .... seconds, that part of the code I can do, timer events are easy. getting this graphic into a picturebox is a pain though.
You Know Your Addicted To Computers When - Your main computer is a 7 terabyte, Core2Quad 3 Ghz +, with 4 or more gigs ram, over 200 programs installed, and you would rather sit with it programming than go to the movies!
I have a converted VB6 App that would draw irregular shapes on a PictureBox when I click on a button, and these irregular shapes would persist until I either close the App or erased the PictureBox to start the display anew.I converted my App to VB.Net to do the same, i.e. draw on a PictureBox again, but the drawn lines appear briefly and then, at the end of the drawing process, when my App returns control to the Operating System in wait for another event, the graphics disappear as if erased by the App (which I don't do of course).I have created a Graphics Object associated to my Picture Box as:
Dim CurrGraphics as System.Drawing.Graphics
CurrGraphics = PictureOut.CreateGraphics
I then use the DrawPolygon and DrawLine methods to add the irregular shapes I want:
CurrGraphics.DrawPolygon(CurrPen, Pts)
CurrGraphics.DrawLine(CurrPen, Pts(I).X, Pts(I).Y, Pts(I+1).X, Pts(I+1).Y)
where CurrPen is a defined Pen, and Pts is the Points() array with the coordinates of the displayed shape. Several dozens irregular shapes are drawn and then the subroutine stops, and returns to waiting for another request from the user.What could be the prime reason why graphics do not persist in a PictureBox, and are erased immediately after they are created ?
PS: I do not use the PainEvent of the PictureBox PictureOut, as in the example given in the VB documentation (below), as the display process is initiated by clicking on a button, and I cannot relate how to transfer control to the PaintEvent as below:
Private Sub Form1_Paint(sender As Object, pe As PaintEventArgs) Handles _
MyBase.Paint
' Declares the Graphics object and sets it to the Graphics object
[code]....