My VB code uses a timer with a slider, and uses AddSeconds. I am trying to use the slider with a min value of 0 and max value of 600, and set up ticks every 30 seconds between 0 and 600.At a beginner level coding VB,I am not sure how to set some of the correct values in the slider's property box.Min, Max and Value, I am guessing are 0, 600 and 0 (sets the slider thumb starting positionat the far left). But I am not sure what other values, like tick and small and large change, etc. need to be set and set to what value? I've read online, but so far cannot find how to configure this.
The code underneath works when I use WM_MOUSEMOVE but not when I use WM_NCMOUSEMOVE. Is WM_NCMOUSEMOVE not supported anymore?I use the correct values for the constants too.Protected Overrides Sub WndProc(ByRef m As Message)Dim MousePosition As Point
Select Case m.Msg Case WM_NCMOUSEMOVE MousePosition = New Point(m.LParam.ToInt32()) If MousePosition.Y < 50 Then CloseButtonState = ButtonState.Flat Else CloseButtonState = ButtonState.Normal
Ok simply my code doesnt want to output the correct number. I'm working on the project euler probems to expand my knowledge in VB.net and the current question I am working on is asking to work with triangle numbers. while researching I found that a triangle number can be calculated by using the formula:
I got 100+ textboxes that display record values. Most of the textboxes display correct values but several textboxes doesn't. These are the same textboxes. And they only display wrong values if I edit a record for the first time. After correcting the wrong values in the textboxes the first time, they display correct values in succeeding editing of records. Tried to compare their properties and all but they are the same with textboxes that worked...
Private Sub english_proficiency_answersheet_Form_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated Me.Text = "EPT Answer Sheet of " & gsLastName & ", " & gsFirstName & " " & gsMiddleName
EDIT: I am able to pass in the string perfectly when using Visual Studio 2005. But when using VS 2003 and a loiwer .net framework it will not let me, unless I hard code it in.
Could something be enabled/disabled on one of these instances of VS? Or could this just be an error with the older versions of .net? I think I am using 1.1??(will have to check) in 2003.
I've created a log in system using a database and query builder to return the correct values, however, once the users signed in I need to bring up the rest of their data from the same table in the database. How'd be the best way of going about this? I'm not sure whether the log in should be changed to use the primary key as well.
i'm working on a system that upgrades a basic version to a proversion but i have a payment gateway . it generates a code in an SQL DB.now i have a form in VB that has a textbox and a button how can i let VB connect to my SQL DB receive the code and then check if that code is correct and if its correct download silence the pro file. from an url.
I have created a basic query generator which allows a user to select the Select, WHERE and criteria attributes using a number of checkboxes.However i have got stuck. In the results form i have the following code
The program keeps on crashing if the user does not select the corresponding amount of display records from above for the amount of attributes they want for the SELECT part of the query in the intreface in form 1.
How would i go about making something where the number of SELECT attributes selected which are listed in a string create the correct number of textbox fields in the results form (form2)
My add handler is not correct for some reason. I don't know what I have incorrect. trying to add a row to the datatable upon formload. it says that NewM8_CustomersRow is not an event for BA_TruckingDataSet.M8_CustomersDatatable
I am doing homework, but i've done the work already. My Issue is, I cannot get my program to compile the calculations for the payments properly. Maybe I'm just too tired to see it, but It should be working from my view. Here is what i have so far...
Module MortageCalculatorWK5 'Loan Amount Input Dim LoanAmount As Decimal = 200000
I'm a bit confused at why this code does not trim "say" but instead only the first letter "s".
Public Class Form1 Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Integer) As Integer Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
I am new to VS 2010 and in my application I want to add an app.config to contain to variables.I have been adding the app.config through the solution explorer, add item, general tab, configuration file.However i have noticed each project creates a default app.config in the project folder but which doesnt show up in the solution explorer.
I am trying to get a handle on the correct way and easiest way to do things. By easiest I am not talking about being lazy just accessing and modifying later on. I have started using my own classes and such but I have a few questions. Sometimes I want to create a control on the fly through code instead of using the designer. Should I create this control in the main form file or in a separate class? If I make it in another class it seems harder to access later on. Then again if I dont know that the control is going to be created(user clicks a button to add a control) how can I access it? Also it seems alot harder to access certain things when it is in another class. For example if I create a new window in a class and then want to check if it is there or not it is alot harder to do.
I have this student table with these columns: ID and Name. I binded this table to a combobox to display student's names. My question is how would I get the right student Id (in vb 2010) when I selected a student's name so that I can assign the student ID as a foreign key to the Teacher table.
I want to be able to make a program that incorporates my spreadsheets so that I can get the the results of the spreadsheets without the look of spreadsheets, also everytime I let somebody loose with one of my spreadsheets it needs fixing within 24 hrs as they have totally screwed up the formulas. is Visual Basic 2008 the right program to do this?
I'm trying to download files and fill the progressbar correctly. The problem is that I'm missing something in the code below, because it doesn't work:
Dim streamer As MemoryStream = New MemoryStream Dim reader As StreamReader = New StreamReader(streamer) Using fs As New IO.FileStream(PathAndFile, IO.FileMode.Create, IO.FileAccess.Write)
I'm trying to build a tabbed a notepad, I was using the tutorial from DIC to guide me along.The problem is, when I go to click save, how do I tell it to save only the tab I have open?Also, It crashes at line 15 of the SaveAs function, Error message says "Object reference not set to an instance of an object"Here's my code:
Globals: #Region "Globals" Dim Tab As TabPage 'Holder for the currently selected tab page
I have a DEM file(Digital Elevattion Model File) and I am trying to open the file,where we have Latitude and Longitude values inside the DEM file.And, Now I have opened the file using Filestream and Read the file using BinaryReader.But, I am having a trobule in getting the values of Latitude and Longitude.I am getting Byte values randomly as 1,202,31,271 etc.But, we dont have latitude and longitude values more than 180,and also I am not getting 16 bit UInt values.For example, the values should be like Latitude 20.00416666666667 and Longitude 39.99583333333333.So,read the correct Byte values of the DEM file.The code I have used till now is:
Dim fs As FileStream = New FileStream("C:UsersadminDesktopHeader and DEM fileE020N40.DEM", FileMode.Open, FileAccess.Read) Dim rd As New BinaryReader(fs) Dim convertDB As UInt16 For i = 0 To rd.BaseStream.Length
lets say I have a form (form1) with lables a-z which are all designed with default text "0". So they all show 0 on program startup. which is fine. I also have a dialog with 2 TextBoxes; I want my program to update the default text/value on (only)form1 labels x, y and z to whatever was put into the textboxes when i press the OK button on the Dialog, so these specified labels show the 'new' value on next startup. Is it even possible or should I save the values to a file which loads the values in the specified labels on startup?
I have simple columns and their respective sums. However, I exclude 1 particular value from each sum, like so [code]...
Now I need to exclude another value ("Awaiting Progression") from a second column called "PROGRESSION".
Since I already exclude value based on 1 column called CATEGORY, how do I change my =Sum(Code.ExcludeOthers(Fields!CATEGORY.Value,Fields!ACTION_PLAN_NEW.Value)) to exclude a value from the PROGRESSION column if it's = ("Awaiting Progression") ?
i.e. How do I exclude multiple values, depending on values in 2 columns in SSRS 2005?
I want to be able to see if the values a user inputs into 2 textboxs equals the values assigned to a picture. I put these values in the picture's name and tag. Also the picturebox is getting the image from a random function correlating to an imagelist. How would i go about thisI thought of maybe using a checkbox and coding
If picturebox1.image.tag = ("12") _ and textbox1.text = 1 _ and textbox2.text = 2 Then checkbox1.checked = true
unfortunatly when i debug it says the picturebox1.image.tag = Nothing
I have a question about the property TotalVirtualMemory in the VB class ComputerInfo. I have checked this property from code on several different computers and the number is always 2047 MB. This is strange because I know for a fact that the virtual memory on these computers differ (~1GB, ~2GB and ~3.5GB). Does anyone know why it is like this and is there any other way to get the total and available virtual memory?
i am using this as my file path of my information Private strInformation As String = Application.StartupPath & "Information.dat" however, when i deploy the application and install it...i get an error when it tries to access the file, am i using the correct file path?
I use vb.net 2008 to create a desktop application.I have a form that is resized according to the size/location of the app bar (where the start button is)I have a toolbar at the top, a status bar at the bottom of the form and a grid in the middle of the form I want the size of the grid to be the maximum possible on my form.if and when the user resize his application bar (or move it from the bottom to one of the sides) my form size should change according to the new working area size:
H = My.Computer.Screen.WorkingArea.Height W = My.Computer.Screen.WorkingArea.Width
is there a single event that I can use ? currently I called my resize function in several form events: Activated, ClientSizeChanged, Load,Paint,LocationChanged,RegionChanged.And still it is not working correctly! Resize the app bar size or move it form does not change !
If I minimize it and then display it again or click it - it changes size
I am a bit confused on the correct way of opening a form. I generally practiced form1.show to open a form, but i came across the following code to open an form.[code]....