Keeping Track Of The Points Of .DrawEllipse?

Dec 16, 2009

I want to know if the user clicked on the Ellipse (just the line of nonfilled ellipse)? I don't care if the click inside of it,JUST the LINE. I made a copy of the orgianal rectangle info before drawing it. And then I tried .contains on the mouse click? and that allows me to click everywhere

View 10 Replies


ADVERTISEMENT

Keeping Track Of Choices?

May 24, 2011

I have two combo boxes, and four buttons. When the user clicks "Add" on the first combo box, it adds a new item to the combo box with "New" and then lets the user rename that item to something else. That "new" item has to have an array of "answers" that go along with that item in the list. What I'm having trouble figuring out is assigning "answers" to the second combobox for each item in the first combobox and changing the second combobox when selecting an item in the first combobox.

EXAMPLE:

Item 1 - Combobox1
- Item 1 - Combobox2
- Item 2 - Combobox2

[code]....

View 5 Replies

Keeping Track Of Values In Different Forms?

Feb 10, 2011

I am trying to create a quiz application in Visual Basic 2008. I need to be able to store a score value when the player gets a correct answer. When the value is stored a new question set appears. Once the score is calculated I want to be able to show this is in a new form so the value needs to be passed from one form to the other. I'm not entirely sure how to do this but I believe it will incorporate a module.

View 9 Replies

VS 2008 Keeping Track Of Ellipses?

Mar 8, 2010

Suppose i want to draw semi-random ellipses on my form.Is there any way i can check if they get clicked at a later stage?Is there any way of storing the location of individual ellipses and then comparing the mouse-click to my list of locations to see if one was clicked?

I can imagine how it could be done with squares or rectangles, but i dont know how to approach it with ellipses.

Im sure this has been asked before, but i've spent a good while searching around for something i can use and came up emptyhanded.

View 5 Replies

C# - Keeping Track Of Values With Dynamically Created Controls

Jun 14, 2011

I have a WPF application that allows users to create questions of all different types which depending on the type will use a textbox,combobox,checkboxes, or radio buttons to allow the user to answer the question after they build some sort of questionnaire. My question is what is the best way to keep track of the answers across all the different controls after the controls are created and the questionnaire is created on the fly. Right now, i'm looping through all the containers and getting the values based on the controlType.

View 1 Replies

Basic Calculation - Keeping Track Of Total Number Of Discounts

Sep 5, 2009

I am trying to keep track of the total number of discounts given (whole numbers) I keep getting .75 after the first discount, and it adds .75 for every trans action after that. I have tried to pick it apart but I just don't see it. You can follow by tracking the comments that relate to the summary. I know that is an Integer but the book has it declared as a decimal so I went with it.

Public Class BookSaleForm
'Declare module level variables
Private QuantitySumInteger, SaleCountInteger As Integer
Private DIscountSumDecimal, DiscountedPriceSumDecimal As Decimal
Const DISCOUNT_RATE_Decimal As Decimal = 0.15D
[Code] .....

View 2 Replies

Code - Add The Elements To The Stack With Keeping Track Of Adding And Deleting

Feb 15, 2012

I am trying (Push)add data into my stack (length of five) and (Pop)delete from the end of my stack.

I need to know how can:

- Add the elements to the stack with keeping track of adding and deleting from it (adding an element will increment until 5 and deleting would decrement until the stack is empty).

Private Sub Button1Push_Click(sender As System.Object, e As System.EventArgs) Handles Button1Push.Click
Dim Stack(4) As String

[CODE]....

View 4 Replies

VS 2010 Keeping Track Of 'Active' Tabpage With Multiple TabControls?

Aug 11, 2010

I am building a sort of 'lightweight' Visual Studio, and I'm trying to implement the feature where you can drag tabs to different 'tab groups', viewing multiple tabs side by side.

I got nearly everything working, I show a ContextMenuStrip when you rightclick the tab headers, with the option of creating a new (horizontal or vertical) Tab Group. When that happens, a new TabControl is added dynamically and the selected tab is moved there. You can drag the tabs around inside a TabControl and even from one to another.

The problem now is keeping track of the 'active' tab. Since I have multiple TabControls (not just two, there can be as many as you want theoretically), their SelectedTab properties are basically useless. How am I to determine which TabControl the user is currently working in? Obviously I will always have multiple selected tabs, but only one active tab, in which the user is currently typing, editing, whatever.I need to know the active tab for obvious reasons: many menu and toolbar items act on the active tab for example. A short explanation of my controls:I have one TabGroupContainer control, which inherits UserControl. I have a TabGroup control, which inherits TabControl.I have a Tab control, which inherits TabPage.

The TabGroupContainer holds a collection of TabGroups (to which I dynamically add/remove TabGroups when required). Now I want the TabGroupContainer control to have the ActiveTab property which returns the one and only active tab (out of possibly many selected tabs).The only logical way is to keep track of the tab that was selected last, for every TabGroup.

At the moment, I am doing this:

- In the TabGroup (TabControl) class, I shadow the SelectedTab property (and return a Tab instead of a TabPage). More importantly, in the property setter, I raise a SelectedTabChanged event:

vb.net
Public Shadows Property SelectedTab As Tab
Get
Return DirectCast(MyBase.SelectedTab, Tab)

[code]....

However, it still doesn't work. I soon figured out why: I am checking that the previously SelectedTab is not the same as the new value in the property setter of the (shadowed) SelectedTab property. I don't raise the event when they were the same, and in this case they were the same (as there is only one tab in the TabGroup!).So, I took that check out, and now it seems to work when I click in the text editor.

So one problem remains: the active tab is not changed when you click on the tab header (and not on the text editor). I am clueless as to how I should handle this... I am once again sure there is a simple fix, but I cannot see it. I can click the tab header, and I'm sure behind the hood it responds to this click, but it never raises it SelectedIndexChanged event because the index didn't change but was set to the same value it already had. I cannot override the SelectedIndex property (so I could skip this check and raise the event anyway even if the value didn't change), and the OnSelectedIndexChanged method is not called, so I cannot use that either...

View 6 Replies

VS 2010 : DrawEllipse As A New Layer?

Dec 20, 2010

i know drawing or fill shapes codes (creategraphic) ... but how i can to draw a shape like ellipse as a new layer that user can to move it after draw and also can to change colors and other property .

View 2 Replies

Spikes Appear Using DrawEllipse When Pen Thickness Goes High

Oct 21, 2011

I have a graphics program and in it I use DrawEllipse plenty and when the pen thickness gets high like around 12 pixels or above you start to see these spikes. I'm using a PictureBox so double buffering is being used. Is there anything I can do to get rid of the "spikes". In the screenshot at top the pen thickness is at 19 and is 28 in the lower.

View 10 Replies

Offset The Points In A Polygon Without Having To Change Each One Individually The Points Are In An Array?

Apr 20, 2010

is there a way to offset the points in a polygon without having to change each one individually the points are in an array

View 2 Replies

Get The Points Which Make A Polygon From A Region Which Was Derived From The Polygon's Points?

Jan 31, 2010

how can i get the points which make a polygon from a region which was derived from the polygon's points?

View 1 Replies

Combo Box Not Keeping Value On Tab Out

Dec 9, 2009

How can i get the combo box to keep the value that was partialy keyed in and completed with auto complete.Pressing enter doesn't select the value so when you tab out it keeps the entered auto completed value. The only way to keep the auto complete value is to click on the combo box with the mouse and then tab out of it. I would like some how of being able to tab out of the combo box and it keep the auto completed value that the user has entered so as to save time entering data so no mouse clicks are needed and the data grid view can be tabbed through and all data entered from keyboard.

View 3 Replies

Keeping A Record Of Who Logs In?

Mar 31, 2009

I have a program that requires login and I have that part working, but I'd like to be able to tell which user has logged in. There's a database with the user info (ID and password) but I'm not sure how I can have the program record which user has logged in.

View 5 Replies

Keeping An Application In Background

Jul 7, 2011

I have developed a very simple application that disables system keyboard commands (ctrl+alt+del, alt+tab, etc), hides the taskbar, hides the desktop, etc.Upon entering a password the user can 'unlock' these options.This is being used with a restaurant POS system so no accidents can happen. However there seems to be one minor issue:In a separate software package (the POS software), at specific times, any application that is running (my locking application) will get focus and end up on top of the POS software.I want my locking software to remain underneath all running applications. Anyway to keep my locking application from gaining focus? I was thinking of maybe adding some line of code to send my locking application into the background whenever it gets focus..

View 4 Replies

Keeping An Item In Scope?

Aug 31, 2010

I have been working on a VB app to edit an excel document. I want to keep my excel workbook in scope for the whole app.

For example here is how my program looks now

private sub
open workbook
end sub

private sub
reference workbook
end sub

I want a way to just call my workbook at the top and have all of my subs recognize it. I guess like a global variable or something.

[URL]

View 5 Replies

Keeping Counts Win Form App. Has Run?

Apr 23, 2010

using Vb net (2005) Wandering if it is possible to use AppSettings in this case: Keeping counts how many time my Win Form app. has run, could someone show me if this can be done

View 4 Replies

Keeping Dll And Exe In Separate Folder

Apr 1, 2012

I want to create SETUP for vb.net window application. My application uses multiple dll.so I want to keep dll in separate folder and exe in separate folder. When I create setup, dll and exe are in same (Application Folder of setup), then it works, but when I create 2 different folder in Application Folder of setup, one for dll and one for exe, then it desn't work. Please suggest how can I ?when I create set up then all goes to applciaton folder. when i installed then all are installed in same folder.but I need all dll goes to sperate and exe goes to sperate folder.

View 1 Replies

Keeping Form Above Fullscreen?

Nov 9, 2011

Basically i'm coding a application that can be used as a crosshair.How do I keep this above the game which runs in fullscreen. I've tried

View 5 Replies

Keeping MDIChild Within MDIParent?

May 11, 2012

I have a MDIParent form that has a bunch of child forms. When I open a child form, I can actually move the form outside the bounds of the Parent. How can I prevent this? I've set each of the Child Forms "IsMdiContainer" property to "False". What am I missing?

View 1 Replies

Keeping The Development Resolution?

May 26, 2011

I've been trying to find the answer to keeping an application from allowing "scaling" of controls and forms to the user's settings. I have set the autoscalemode to "none" on one form but it doesn't seem to work. I'm using Visual Studio 2008 Visual Basic. My users are on using either XP or Windows 7. I think we are all using Framework 3.5 but not really sure.

I knew this problem would eventually become an issue but ... Now the problem has become an issue. I have a user that has dual monitors and has the text setting on medium. Now the label controls overlap the input text fields.

View 1 Replies

Disabling A Button And Keeping It Disabled?

Jan 25, 2010

im wondering if it is possible at all to bisable a button after it being clicked because i have no idea on where to start on doing this. I only know how to get it to disable for the one session but when the program is run again it is enabled again. Is there any way to just keep it disabled because it nly ever needs to be clicked once.

View 20 Replies

Keeping Database Connection Alive?

Nov 22, 2010

I have an application that connects to an SQL Server, sometimes we have a networkinterruption of min 10secs during the openconnection , I get a General Network Error when I try to carry out any procedure that communicates with the database afterthe interruption. Even when the connection is closed and reopened, I still get General Network Error. The only way to get the application to function again is to close the Application and reopen it, is there any way I can keep the connection alive?

View 11 Replies

Keeping Original Index After Sorting?

May 8, 2009

I have been on a hiatus from VB for some time. I was coding in C++ and C# for quite some years and on my venture back to VB, decided to put my trusty VB 6.0 on the shelf and try out the new 'rave' VB.NET. I'd first like to say, I can't imagine how different it is from older versions. I'm using Visual Basic 2005 and I find myself sometimes pulling my hair out over things that were common practice before, yet have been totally revamped. But I'm getting by, barely, but getting by.

My problem is this: I am writing an application that loads the Title field of a DataGrid (after being loaded from a DataTable of course) into a ListBox then sorts them. The problem is, upon sorting, I lose the original index value that pertains to that entry in the DataGrid. In other words, if the first ListBox item is selected, it contains the index value of the first entry in the DataGrid, which stores the rest of the data to fill the labels and controls on the form. I have a semi-workaround for this by iterating through the DataGrid and comparing the Title field to the text of the selected item in the ListBox, but the downside to this is that you could never have the same named item or you would only get data for the last item entered. My question is... Is there a way to somehow retain or store the original index values of a ListBox before sorting? If so, this would make my code a lot smoother and allow for multiple entries of the same name in the Title field of my database.

P.S. If someone could go through how to access items from the DataTable itself, I could get rid of the DataGrid altogether, as I don't need it other than to access the DB data. I couldn't figure out how to get at it while it is in the DataTable, so I loaded it into a DataGrid control and made it invisinel.

View 6 Replies

Resize Image While Keeping Its Quality?

Nov 17, 2009

I got this code from this forum, it works perfectly but I have a problem where when you resize the images, the quality of the image becomes not as good, is there a way to keep it in the same quality as it is when resizing?[code]....

View 13 Replies

VS 2008 Keeping A Form In The Screen

Dec 27, 2009

I'm just doing a quick little application and was wondering how I can keep the user from moving the window outside of the working area I tried this

[Code]...

View 1 Replies

VS 2010 Keeping Text The Same After Case Changes?

Dec 14, 2011

What happens here is when I click on anyone of the radio buttons the text box score sets the value to either 0,1,2,3,4 but when I go the next case it goes back to 0 instead of keeping the value. I tried many different techniques while going about this none seem to work.

[Code]...

View 2 Replies

Changing And Keeping The BackColor For Multiple Buttons?

Dec 16, 2011

Using VB/VS 2010 and am trying to provide the user with a way to change the color of the control buttons on my main windows form. I'm starting with the button click event that then calls another sub-form (code shown respectively below).

I was testing with DirectCast as I need to deal with a multitude of button controls (i.e., will have more than the two shown below).

I would like to know how to deal with the following:

1. How do I save the BackColor so when the user opens the form for the first time (or any other time thereafter) the color set earlier appears (the default via properties is green).

2. When I click on the button for the first time and change the color it doesn't change until I click the button again.

[Code].....

View 1 Replies

Communications :: Keeping Messages Separate On A Connection?

Mar 16, 2011

I'm trying TCP communication using VB.NET and using the TcpClient method.All is working fine but I'm having trouble keeping my message seperate from each other.For example, my message have an header and footer and can range in size from very small (32 bytes) to quite large (64k). The problem I have is that when messages are being sent quickly they will arrive together. For example, if two 32 byte messages are sent they will arrive as 64 bytes. This is no good as I need to process them seperately.

So my question is:- Is there a way to easily separate my messages using a built in feature of the TcpClient so that the "reading" will give me the correct amount of bytes each time corresponding to the amount of bytes I have sent per message?

View 3 Replies

Custom User Cursor Not Keeping Shape?

Jun 16, 2011

I have a custom cursor for the user to allow them to position text in PDF files. For the most part there never seems to be a problem, but a choice few people are seeing massive problems with this.

One particular client loads the program, and then loads a PDF document into it. Once the program has loaded when the user clicks he either doesn't get a custom cursor or the signiture blank that is to show up is above the frame that is to surround the blank.

The user is using Windows XP on a laptop and the software re-renders the cursor and box every time. There is a signiture tablet that the user buys to connect to this software, and the user also has expressed problems with the Tablet not staying connected.

I can provide pictures of the changes and code if anyone would like to tackle this?

View 8 Replies







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