I'm trying to code an 'increase' button to prompt a user to input a rate by which to increase select prices in an array.It should request the increased rate, then request a number from one to five, representing which price in the array to increase.Then, if 'increase' button is selected again and another number from one to five is chosen, then that element should be increased.It's working, but all the numbers in the array are changed. And, when I hit the increase button again, the array is repopulated below the first price increases instead of only replacing the designated price.
'declare 5 element array of prices Dim prices() As Double = {12.2, 8.5, 12, 50, 2.4} Dim rateIncrease As Decimal Dim isConverted As Boolean
I have a dataset with around 15 table adapters. Everytime I make a change, such as add a column, change a type, or just anything, it takes around 3-4 minutes before studio responds again. The processor and ram are in good shape, but there is a spike in network usage by devenv during this time. In fact, devenv has the higheset network usage all together, even with with IE open and browsing. Why would this be and is there any remedy?[code]...
I have completed a simple database for a project. Only 6tables. Of the 6, one is a "lookup" table.There is one "master" table that is the driver for the system. It is referenced as a foreign key by the other four tables.Give that this step is completed. What is the FASTEST, EASIEST way to create POCOs/BizObjects that can load load the data and the child data.Here are my CAVEATS.
I don't want to spend more than 30-60 minutes learning how? There is very little biz logic needed in the POCOs. They will pretty much load data. Don't even really need to write back data.I already know CSLA (up to version 3) but I feel that is overkill for this little project.Nevertheless, I would love it if it ROOT objects could have collection classes that contain the CHILD objects as in CSLA...but again, without using CSLA.
This morning I opened up my project The Bible Study Tool and got a pop up warning box that says the following: There is no editor available for 'G:VisualStudio ProjectsThe Bible Study ToolThe Bible Study ToolBSTMain.vb'. Make sure the application for the file type (.vb) is installed. I do not know how to 'make sure the application for the file type (.vb) is installed. I get same error no matter what solution (program) I try to open. I can see the forms code window, but when I double-click the form in the solution explorer I get the above warning.
I have looked all over for a solution to this problem and have tried a bunch of different things, but nothing seems to work.I have a sub procedure that does the following:
1) adds two columns to a data table (table1)
2) fills a dataset with several tables in order to make calculations (this determines the data that will be stored in the two new columns of table1)
3) updates ONLY table1, and ONLY the two columns that have just been added (these columns are thus empty for every row before the update begins)
As it is now, the da.Update takes about 3 hours to populate the entire table (it updates about 300 records per MINUTE if I'm lucky). There are approximately 40000 records in table1 for this test subset, but there will eventually be up to 1.5-2 million (in other words, this is a small table currently). I have tried using executenonquery() along with a sql UPDATE command instead of da.Update, as well as many other things, but none of them has improved performance at all. I've also tested it on two PCs, one running Vista and one XP, and there were no differences. I'm using Access 2003. I know Access is not ideal, but for now it is the only option.
I know that the root of this is the line of code with the da.Update, because the giant loop before it that I previously thought was causing the slowdown executes in 30 seconds, leaving only the update before the subroutine is complete. I don't know how exactly the da.Update works, but I've suspected that maybe it has something to do with that? Code is below:
I've got an MDI form with a menustrip that already detects all .dll files in a folder and adds them to the menu to show the user which plugins are available. The thing is that I don't know what to do from here on out...
I'd like to be able to update my program without having to stifle through all my code (it's a very big program) and be able to create basic new features through external DLLs. It's extremely useful for users to make their own features too
Anyway, what a plugin would look like is most likely just a form with controls on it that the user makes themselves in VB. I'd like the plugin to activate through an init() sub within the plugin by clicking on the menu item shown in my MDI form.
I kind of started with my own code but it didn't really get anywhere:
ListFilesInMenuStrip(PluginsToolStripMenuItem, App_Path() & "Plugins") For Each c As Control In Me.Controls If TypeOf c Is MenuStrip Then
[Code]....
...Where ListFilesInMenuStrip() is my function to add all the DLLs to the menu and App_Path is just a shortcut function which serves the same purpose as VB6's App.Path() class.
I've also done research but only came across all their weird complex CodeDom and other weird things...This seems so simple but I just can't wrap my mind around it :I
For example, to calculate this:(22 ^ 29) Mod 57Supposedly there is a way to get around overflows and do these calculations, but I can't find much online. Now, the person who said this was doing VBA in Excel and said that there was about 4 lines of code which could handle the overflow so it wouldn't happen.
We have an automatic process that opens a template excel file, writes rows of data, and returns the file to the user. This process is usually fast, however I was recently asked to add a summary page with some Excel formulas to one of the templates, and now the process takes forever.
It successfully runs with about 5 records after a few minutes, however this week's record set is almost 400 rows and the longest I've let it run is about half an hour before cancelling it. Without the formulas, it only takes a few seconds to run.
Is there any known issues with writing rows to an Excel file that contains formulas? Or is there a way to tell Excel not to evaluate formulas until the file is opened by a user?
The formulas on the summary Sheet are these:
' Returns count of cells in column where data = Y =COUNTIF(Sheet1!J15:Sheet1!J10000, "Y") =COUNTIF(Sheet1!F15:Sheet1!F10000, "Y")
I am an experienced programmer but mainly in 4GLs and assembly. Relatively new to VB programming, especially GUI applications. On a form I need to create an area that will be used to display *extremely* large TIFF images. typical image size would be 2000 pixels by 100,000 pixels. Typically I will NOT want to display the entire image at once, so the area will need to have scroll bars and/or other methods to scroll/pan around the image.
I have read about and tinkered with the bitmap and picturebox objects, including some threads about several different ways to implement scrollbars. However, I see that the picturebox size is limited to 32K pixels in both dimensions. I suppose that I might be able to copy various portions of the bitmap to the picturebox depending on scroll position, but that seems potentially quite slow and cumbersome. Can an expert developer who is experienced with these types of issues regarding the following:
1. Can bitmap objects be used effectively with TIFF images of the size I am working with?
2. an approach that should produce reasonable scrolling performance for these extremely large images without excessive coding effort?
3. For an image that exceeds the picturebox size when displayed at 1:1 scale, is the picturebox capable of displaying a reduced size version of such an image without lots of code, and if so, how?
4. Many (most?) graphics display objects count on all of their display data being stored in memory rather than on disk. Would that be true of a TIFF image loaded into a bitmap object and displayed via a picturebox? If so, the amount of RAM required in order to buffer the entire image in memory could be a potential problem for images of this size. Is there an advisable way to have the picturebox or other display object only load portions of the image into memory on an as needed basis, and purge them once they are no longer required? Are there any built in objects/methods/properties or is there any sample code to show how to do this?
I'm trying to load this image file on a PictureBox but I get an "OutOfMemoryException was unhandled" error.
How do I allocate more memory for this? Or maybe use another container? My project's main feature is loading maps, unfortunately my boss wants to load the whole map and won't accept sliced version of the map.
I believe there wont be any diff if user clicks the button on the form and the click event is fired OR if we call the button click event / function in the code. Because in one my project, this does make diff. If I click the button on the form, the App works great but same button if I click it thru the form code, the whole process crashes. This happens in Vista / VB.net.
I have made an application in VB.NET.The Button click codes are working fine. I have made a small modification in the code. I have commented the line 'Me.Close'But still my form gets closed. I think the application is executing from elsewhere.
I'm wondering if it is possible to write the code for the button so that, when pressed by the user, it would add whatever text is in the text box to the list box and change the code of the form load to add that text to the pre-existing listbox.items.add's that are in the code of the form load.
I created button array as (4x4) and I showed these on panel and add handler after that I added 2 mines which button is 0. and 1. then i want to mix these buttons array, I try to mix but always the mines shown on button(0) and button(1)
Each of the numbers represents a different image slide (slide1.png, slide4.png, etc..). The problem i am having is trying to create a "previous" and "next" button to flip through them all. Trying to figure out what number the user is on and going from there and seeing what numbers are still left from the list above that was sent, etc.
here is the code..
Public Sub showWhat(ByVal theNumbers As String) Dim theNums As String() = theNumbers.Split(New Char() {","c}) Dim theCurNum As String
I have a modified button control with a string array in it. I am having trouble sending the string array to the form with the modified button on it. Anyone know what i can do? The form uses a arrayList to hold the buttons since they are made at runtime.
and so forth to 81. how can i get around it into a small loop so i loose alot of the redundant code?
2. i am also having difficulty with being able to change properties of buttons in regards with..for the butons like...button1, button3, button5, button6 etc...to all be changed to a different colour.i currently have something along the lines of
My button won't display the information my arrays are holding. why it won't show the information that is stored in the arrays... It shows only 'blanks' I don't understand!!!
Public Class frmMain Dim intCount As Integer Dim nmlStudents(49) As Namelist
I have a project where I am to enter a name and a test mark into two separate text boxes and then select the button to store the information into the arrays, one array for names and another for marks and then you can click the calculate adverage mark button and a label should calculate the adverage mark but I cannot get the marks to be added and then divided by the number of entered marks. Such as: you enter in a name and a mark of 75, and then another name and a mark of 50 and then another final name and mark of 25. I have been trying to get it to add up the marks of 75, 50, 25 and then divide it by 3 the number of marks in the array, but it wont and I cant get it to add the marks as a integer no matter what I seem to do.
Here is my code: Public Class frmAdverageTestMarkCalculator Dim ClosingMsg As String Dim Closingtitle As String Dim SureAboutClosing As MsgBoxStyle Dim Closingresponse As MsgBoxResult [Code] .....
I have created 3 arrays of buttons for a form which manipulates the value in a combo box or 2 by the name of the button ( buttons named 2 through to about 70 )
This works great but the problem is, now that the buttons are in, I want to be able to change the color of the buttons when another button is clicked
ie. The first bunch of buttons is a list of locations all with unique text.the second bunch of buttons is events that happen, sign on, sign off, beach open and beach closed.
What i want to be able to do is change the color of the button clicked "before" i click sign on, sign off, beach open or beach closed.
I do not know how to reference these buttons in my code as for starters, they are numbers, which is a big no no apparently. Also, even if i change the name from just a number to something like cmdBeach(i) when creating them, i still can't refer back to cmdBeach5 in my code as the button doesn't exist yet
I have an global array of points that i want to plot in VB. say X and Y points, and typically they have values of +/-12000. Now I've not done graphics work for a long time and when I did, I used OpenGL with C. Now I need a GUI i'm using VB 2008. Firstly, what's the best method of rendering the array of points? should I use some port of OpenGL? GDI? or what?
Secondly, can I simply print to perhaps a Panel on hit of a button? Thirdly, do I have to place any line drwing code in an "OnPaint" event handler? Finally (for now) if my array represents points in a space much larger than the painting surface, how would I scale and scroll the final image within the the proposed Panel? I look forward to your advice.
I need codes for array controls radio button. My program is to have auto-generated radio button, when i declare no. in numeric up down that will be the no. of set of the radio button. the program is an exam generated for true or false if you will think of it to have an radio button options for true or false. if i will click the generate button then the radio buttons will appear.
I had a form with over 40 command buttons on it. I indexed the buttons: Private Sub Command1_Click(Index As Integer) 'perform this End Sub How can I achieve the same basic thing in .net? What is it called? What to search for?
I am once again struggling with my weekly project. I am assigned to write a program that converts a predetermined english sentence to both french and german. The code is to contain an Array and a structure. Also we have not covered retrieving array data from a TXT file, so we are to hard code in the array data. I coded the structure and the array, I added the array data, but am confused how to access the data. The examples I have found all deal with retrieving data from a TXT file. Can someone give me a nudge in the right direction.[code]....