Structure Declaration And Placement?
May 17, 2012
I'm working on my final assignment for my Visual Basic class, and the last assignment is to create a program which stores CD collection information. It works fine, but the task is to create a structure for the input information and use it in the Add buttons click event code.I'm not asking to have my homework done for me, but i'd like some advice on where I should declare the structure and how. Everywhere I try and declare it, it ends up closing that particular sub procedure or section. I've tried looking up plenty of help sites to learn about structures, but sadly they and the book are both very vague. The instructor also mentioned padding each entry, but that I'm pretty sure I know how to do
[Code]...
View 1 Replies
ADVERTISEMENT
Feb 15, 2012
Is there any way of adding a control to a container within a structure declaration in VB .NET?
What I would really like to do is:
[Code]...
But this doesn't work in VB .NET. Is there anyway of achieving the same thing?
View 2 Replies
Oct 5, 2010
I'm looking at the following in the Data Types docs for the Windows API:
#if defined(_WIN64)
typedef __int64 LONG_PTR;
#else
[code]....
View 1 Replies
Jun 21, 2011
I got problem regarding declaration of dynamic runtime array declaration Here is my code
[Code]...
View 5 Replies
Jun 13, 2010
I have a program written in vb.net 2003 which has text boxes for integer input. When the boxes appear, they are filled with the default value of zero. When the program is run on a computer running Windows XP the cursor appears in front (to the left) of the zero, but when run on Windows 7, the cursor appears behind (to the right) the zero.
In xp, if the user enters 1 (one) a 10 is diplayed and the user must delete the zero. In Windows 7, if the user enters 1, there is a leading zero which disappears once they have exited the text box. Is there a way to force one presentation or the other?
View 3 Replies
Sep 12, 2008
Suddenly whenever I build my applications, although I get a "build succeeded" result - the executables are either not updated or updated in the "wrong" place.So for example if after succesfully building I press <F8> to step through the code I get a message saying the "source is different from when the module was built"I have no idea how to begin tracking this down - how .net determines the placement of files and so forth.
View 2 Replies
Feb 12, 2011
I'm new with VB and a time program I'm trying to complete is incorporating a tick event. I have the code I need to use, and have the timer placed within the VB Designer but when I start the debugging process, 12:00:00 pops up in the text box. I would like to have it start incrementing after I set the hour, minute and second and initiate the Set Time click event. The code I have for the timer is
[Code]...
View 5 Replies
Oct 8, 2009
Im working on a program that is about to drive me nuts figuring out how to round and show only 3 or 4 numbers past the decimal placement and also show the scientific notation.
Here is an example of the code.[code...]
The problem here is that most of these calulations turn up so long that my text boxes just show a small portion of the answer. I have really investigated rounding and decimal placement but nothing seems to work...does anyone have a solution?
View 5 Replies
Sep 4, 2009
I would like to have a header text above the row header.... Is that possible? "here " is the place where I want to have the text in ...
| here | Column 1 | Column 2
| | data 1
|-----------------
| > |
View 1 Replies
May 7, 2008
I have a VB6 program in which all graphics are drawn with lines that are plotted to specific points in the controls (forms, picture box, etc.).
[Code]...
View 4 Replies
Jan 26, 2009
I'm trying to do two things. I have a Richtextbox which i'm continously adding text to from a standard text box. I want that new text to appear at the beginning of the existing text, not at the end of the existing text.I've got the following code but it's not working. The new text keeps going to the end of the existing text.
Dim newtext As String
newtext = TextBox1.Text
RichTextBox1.AppendText(newtext)
[code]......
View 7 Replies
Jan 3, 2010
I am trying to put an unbound button in the last column in a DataGridView control and it appears way, way off to the right when I run the app. I have to scroll all the way to the right to get to the buttons and then manually resize them to show up the way I want them to. I am using the Edit Columns feature found in the Smart Tag of the control. It works ok when I place them anywhere else in the columns! It only messes up when I try to place them at the end of the columns.
View 1 Replies
Jan 5, 2012
Module Module1
Public Structure structure1
Public TRANS() As structure2
End Structure
Public Structure structure2
Public X() As Integer
End Structure
End Module
View 17 Replies
Jan 5, 2010
I'm new to VB 2008 after having spent a long time with VB6, so I apologize if this is a stupid question. But I'd really like to have this straightened out.
Let's say I have a pretty large structure that has lots of properties.
Code:
Now say that I want an internal database with about 10 instances of this structure total, describing, say, 10 different products that a store sells. When these values are loaded from a database, they remain totally static. (However, they can be different each time a program loads)
Now say that I have a class. Each instance of this class is a type of that BaseProduct structure. Meaning, each instance of the class pertains to one of the 10 types of products that the store sells. However, this class has additional properties that pertain specifically to each instance, which are not static.
Code:
Now, the problem here is... If I have 200 different transactions, each one contains an instance of BaseProduct. BaseProduct is HUGE, and is largely redundant (only 10 types possible), so I think it's a little silly to include a whole copy of it with EVERY transaction. However, the Transaction class really needs information regarding the base product it pertains to. Is there a way to, instead of declaring a New BaseProduct in the Transaction class, to simply make one of the properties of the Transaction class a pointer to a BaseProduct variable?
In VB6, I would accomplish this by making a BaseProduct(10) array, and then giving each Transaction an ID number referring to an entry in that array. But in VB 2008, using class structure, this is impossible. I can't define the BaseProduct(10) array outside of a class in a namespace, and if I define it in the actual application's form, then the class loses modularity since it relies on the application that's using it.
View 11 Replies
Aug 29, 2009
I am trying to communicate with an external device and i am trying to send a byte array to the external device via sockets but i am always getting a response the message size is too small so i am not sure what i have done wrong. Between the data type there should be no alignment present and all numbers are represented in little endian format. The char array is not null terminated as mentioned in the protocol specifications.
I have to send data based on a struct that embeds 2 other struct. So here's my vb.net code for the struct used to convert to byte array and the sending part.
Public Structure MESSAGETYPE_OIP_Login
Dim Header() As COMMANDHEADER
Dim UserName() As PSTRING
[Code]....
View 2 Replies
Apr 14, 2012
I'm experiencing a problem with the following c-structure:
typedef struct tagTEXTUREPROP
{
DWORD dwSize;
[Code].....
The Marshal.SizeOf obviously calculates a size of 76 and it works with the DLL function, but it leaves me with some bad feelings.
View 1 Replies
Apr 25, 2010
I'm having a problem that's driving me crazy; I can't understand how to convert the XML structure into a class structure (that I want to use to hydrate a XML document).
The XML document looks like this:
xml
<?xml version="1.0" encoding="utf-8"?>
<artists xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns="http://www.spotify.com/ns/music/1">
[code]....
View 2 Replies
May 23, 2010
I want to make a structure within a structure. Basically it will appear like this:
Structure ID
dim CardType as string
im CardCode as string
[code]......
View 13 Replies
Oct 12, 2010
In Vb.net I am trying to assign an array of structure to another array of same structure[code]...
View 2 Replies
Nov 4, 2011
Dim hmm As String
hmm = "HELLO"
Console.WriteLine(hmm)[code].....
The Output of this Code is HELLO But how should i get it in double Quotes as"HELLO" This has to be my output in double quotes.
View 4 Replies
Sep 12, 2011
I have two structrures
Public Structure PhoneScheduleEntries
Dim Count As UInteger
Dim PhoneSchedule() As PhoneScheduleEntry
End Structure
View 3 Replies
Feb 26, 2009
How can rightfully declare these in VB.net , in my coding it's highligted errors on these declaration.
Dim excel As New Microsoft.Office.Interop.Excel.ApplicationClass
Dim wBook As Microsoft.Office.Interop.Excel.Workbook
Dim wSheet As Microsoft.Office.Interop.Excel.Worksheet
View 1 Replies
Jan 19, 2011
I am currently working on VB. I am using Visual Studio 2008.
The piece of code below is a console application which builds without any error.
Imports System.Net
Module Module1
Public Sub Main()
[Code]....
View 1 Replies
Aug 6, 2009
I was told to use this to specify a folder that I want my node to go to.
(Declaration)
<ComVisibleAttribute(True)>
Public Enumeration SpecialFolder
(Usage)
Dim instance As Environment.SpecialFolder
View 2 Replies
Mar 8, 2010
In this
Dim [end] As Point = e.Location
what is the significance of the [] 's?
View 4 Replies
Dec 16, 2009
What is the appropriate declaration such as "ValueChanged" or "Click" for a NumericUpDown that will execute the code when I press enter. I already know that setting the "AcceptButton" property of the main form to a default button will not work, especially if I want a different button to be selected depending on which control I give focus.
PS: Is the syntax any different from Visual Basic 2010 Express than it is on Visual Studio 2012 RC (running in Visual Basic Mode)?
View 1 Replies
Apr 22, 2010
This is some homework material[code]...
View 9 Replies
Sep 15, 2010
Question: How to shorten this array creation ? I need to create an array of type ReportingService2005_WebService.Property with one property.
Something like:
Dim PropertyArray() as new ReportingService2005_WebService.Property(1)
I have to do this:
Dim PropertyArray As ReportingService2005_WebService.Property() = New ReportingService2005_WebService.Property(0) {}
PropertyArray(0) = New ReportingService2005_WebService.Property
[Code].....
View 1 Replies
Jan 5, 2009
For some reason when i declare an array and set it to a certain amount of elements then under it specify the elements it works in VB 2005 but when i do it in VB 2008 it get : "declaration expected " and i get words underlined.
Public Class Form1
Dim words(20) As String
words(1)="Computer"
End Class
Let me know how to do this in 2008!
View 8 Replies
Aug 30, 2011
Currency Declaration in vb2008.
View 2 Replies