Replicating IsNullable(of T) Value Accessing?
Apr 13, 2012
When using Nullable(Of T) you can access its value by either calling Nullable(Of T).Value property directly, or by just accessing the object directly eg:
Dim myValue As Nullable(Of Integer) = 10
Debug.WriteLine(myValue.Value)
Debug.WriteLine(myValue)
How would I replicate the second example in my own class?
View 2 Replies
ADVERTISEMENT
Jun 4, 2011
I am trying to improve the graphics of my application by adding a nicer feel of the glow in it. By default when you enter the button, it has the slight blue glow. What I am trying to aim for on the calculator part of my application is to make it "look" as close as possible to the Windows 7 Calculator.
This is the Windows 7 Calculator normally. This next picture shows the "glow" on mouse enter.I don't know where I should start on this. I'm trying to get the yellow glow that shows on there, I can just make a "image" replacement for the mouse enter property but I want it to be animated like the Windows 7 Calculator.
View 6 Replies
Nov 3, 2010
I pull a report from SQL Server being not a fan of cursors I process that table server side in my code behind file. So I pull this report that is an address label report and my client wants there to be X number of labels per person. So I coded this function:
Private Function ProcessX(ByVal dt As DataTable, ByVal X As Integer) As DataTable
Dim dtProcessed As DataTable = dt.Copy
dtProcessed.Clear()
[code].....
View 1 Replies
Jun 30, 2010
Basically in visual basic 6 I could access word tables in existing templates with the code owordactivedoc.tables(1).select() where owordactivedoc refers to the active word document and tables(1) refers to the first table in the template.Trying the same code in VB 2003 just leads to errors. Secondly how do I access bookmarks or alternatively word variables.Furthermore how do one deploy web.services. For example the current program I am building is for another computer. Simply copying the web service to Inetpubwwwroot dont work because it is not picked up by the Internet Information Services program. I have to create the web service in vb2003 on the other computer change msconfig manually. Copy and paste the existing service vb file in the created folder replacing the empty vb file.
View 3 Replies
Jul 2, 2009
I am having a .net dll. Now i want to access it in my VB6 project. SO i don't know how to register it and also I am not sure whether the dll has comattribute specified in it or not.
View 1 Replies
Mar 15, 2012
I have a VB.NET console application that must write a message onto a queue (resides on the mainframe). We have all the clustering and everything set-up by our admin. We already have an existing windows service that successfully listens to messages and also writes messages to various queues.I have basically re-used most of my code from the windows service project.But when I try to access the queue manager, I hit the exception "MQRC_HOST_NOT_AVAILABLE". The error log from the Websphere MQ folder says
AMQ9213: A communications error for occurred.
EXPLANATION:An unexpected error occurred in communications.
ACTION:The return code from the call was 0 (X'0'). Record these values and tell the systems administrator.
Here is the complete exception stack.
IBM.WMQ.MQException was unhandled
Message="MQRC_HOST_NOT_AVAILABLE"
Source="amqmdnet"
StackTrace:
[code]....
View 2 Replies
Feb 23, 2009
I have an ASP.NET (C# Code-behind) code. I need the very same functionality in one of my VB 6.0 program. As the code is too complex, I don't want to replicate it in VB once again.
Now, is there any way to access my .NET code from VB?
View 5 Replies
Apr 14, 2011
myObject.rect.X = 100
myObject has a property called rect (which is a Rectangle). During runtime I will want to chage the X position of such rectangle, but I am given this error:
Expression is a value and therefore cannot be the target of an assignment.
Then, how am I supposed to change such values?
View 1 Replies
Mar 24, 2010
How do I access the sContents variable in loadBoard() sub to LoadTable() sub
Sub loadBoard()
Dim oFile As FileStream
Dim oReader As StreamReader = Nothing
Dim sContents As String
[code]....
View 2 Replies
Jul 27, 2011
I have a windows service on a server which accesses a folder and database which is on different server.i was told to create an .ini file and add the settings here. so i have to add the path to the folder and database in .ini file, correct?is there anything else which i should add in .ini file?is it compulsory to give the [section] in the .ini file?
How can i access this .ini file from my vb.net program?can i store this .ini file anywhere on the machine or it should be stored in a particular folder?
View 7 Replies
Aug 14, 2009
i m preparing a project in vs 2008 i m unable to add new row to my database. i have created database in Microsoft SQL Server Compact 3.5 (.NET Framework Data Provider for Microsoft SQL Server Compact 3.5)my problem is the data is updated in dataset but database is not updated.please help me out as i have to submit my project on 20 of aug 2009.
View 6 Replies
Feb 6, 2010
How do I access the new value that a user has entered into a DataGridView cell? I've tried using the "e" parameter in several event types including CellLeave and each time I can only reference the old value.
View 4 Replies
Nov 12, 2009
I am trying to access a remote 2003 server using WMI. I can connect but when I try things like listing the services for that server I get the following: Access is denied. (Exception from HRESULT: 0x80070005(E_ACESSDENIED). Using the same code, I can connect and get a list of services a remote 2008 server. Here is the code to connect to the server (which gets me connected):
[Code]...
View 1 Replies
Sep 19, 2009
what is the quickest/neatest way of accessing the end of a list ? I have been using myvar=me]ylist(mylist.count-1)VB2008 user
View 7 Replies
Jun 17, 2008
I am new to this forum as will as to VB. I am using VB6. I want to access the USB port in order to read the data at the USB port comming from my Data acquisition card.Or as a matter of fact can I also access the data from my mouse, because it also transmits the signal when ever the mouse is moving.
View 3 Replies
Mar 9, 2012
I have this,
Public Class posData
Public Property strLabel As String
Public Property strX As String
[Code]....
then i want to loop through all the objects within my list so i have a for each position in posList, inside this is where the problem occurs, i want to be able to write something like this, a1.blnavail, this is not happening however, i know i can use position.blnavail but i need to hardcode the position for my logic to work correctly
View 1 Replies
Mar 4, 2009
I have two variables, X and Y (this is just figurative)
X = 123
Y = X
How can I get that X out of the Y to be able to get the contents of X from the Y? I just want to be able to do something like tell a textbox to display the contents of the variable within the Y variable (thus, the contents of X).
View 4 Replies
Jan 21, 2009
What I want to do is have my vb .net program open ms word and put an address into the envelope wizard this way the user can go from there adjusting the envelope size etc. In ms word 2007 I have found that if you hit alt, then 'm' then 'e' it will open the wizard and put the cursor in the right place to type the 'to:' address.Current I can open word and put the address directly into the new document.Here is what I have so far:
Dim oWord As Word.Application
Dim oDoc As Word.Document
Dim address As String
oWord = CreateObject("Word.Application")
[code]....
View 3 Replies
Dec 30, 2010
Here's what my Project looks like
[URL]
Yes, the Build Action is Embedded Resource. I also added this in the AssemblyInfo
Assembly: WebResource("WFL.WebResource.EXT.XXX.png", "image/png")
So now, in the default.aspx i say
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim cs As ClientScriptManager = Page.ClientScript
Dim strReturn As String = cs.GetWebResourceUrl(Me.GetType(), "WFL.WebResource.EXT.XXX.png")
[Code].....
But when accessing the returned URL, i get The resource cannot be found.
View 1 Replies
Jan 10, 2010
so, i am writing a program in VB.net that will access a usb fm radio device using a dll. the dll is written in c++. when i call the function to get the current station in the dll:
USBRADIO_API long __stdcall GetCurrStation ()
{
RDSData rds_data;
[code].....
View 8 Replies
Aug 3, 2010
I read a an array of bytes from a file I pass this to a class that then assigns various bytes from that array to various members of varying sizes.
Ideally i would like to do something like this
memberThatIsAUShort = bitconverter.ToUShort(tempArray.subArray(3,5))
memberThatIsAShort = bitconverter.ToShort(tempArray.subArray(6,8))
Instead of looping through the array, copying the bytes to new shorter array and passing them in.
View 2 Replies
Nov 4, 2009
I've an application that's uploading data to a server. Occasionally the server returns a 403 response from a call to HttpWebRequest.GetRequestStream(). The response contains more data than simply the response code, but I can't figure out how to access it. Is there a way to do this?
View 2 Replies
Feb 1, 2010
I need to show a grid of saved projects (compare "orders") in a datagrid, where the projects are saved in an Access 2000 database with a similar schema as follows:
ID Name Country_ID Plant_Type
1 'Test' 1 1
2 'Second' 2 2
Let's call the file "Projects.mdb". This is then showed in the datagrid as:
ID Name Country Plant Type
1 'Test' 'Germany' 'Free Range'
2 'Second' 'France' 'Inclined Roof'
where the countries and "Plant Types" are fetched from a different table in a different .mdb file (also Access 2000, call it "Language.mdb", although there is a lot of different background data in it), depending on the current user's language preference. It is unfortunately not an alternative to merge these .mdb's into one file.
To be able to show the datagrid I have so far linked the tables from "Language.mdb" into "Projects.mdb", but this screws up when the project is being installed on another computer with the .msi file i created (we'd like to have this easily packaged and installed), as the "Language.mdb" doesn't exist on the linked path on the target computer (Basically the problem here).
I can come up with the following solutions:
Force all users to install on the same path, so that the links will work (undesirable)Use connection strings in the query as shown here on MSDN (still trying this out, but I need to work on the details)make a post-install script that relinks the tables according to the correct path.
View 3 Replies
Nov 29, 2010
According to this post the code below should compile, while it is not.
class Base
protected m_x as integer
end class
[code].....
View 3 Replies
Apr 19, 2011
I have a sqlDataSource that runs a stored procedure that returns a table of the days of the month that was passed in as a parameter, arranged as they would in a calendar. It also returns a second table which contains the event details associated with certain days of the month.Basically, how would I go about accessing the values contained in the 2nd table that is returned by my query?I have tried putting the result of the .select in a dataset, unfortunately I get a cast error. If I try to put it in a dataview, I only get the first table.[code]
View 3 Replies
Mar 18, 2010
I am currently working on a project for school. I have the project all laid out in my mind and everything but there is one thing that stops me. I can not access the data from the database itself ...
(detailed info)
I am using an AMD Athlon x64 bit processor with a windows vista 64 bit operating system. I am writing the program on visual basic 2008 express edition. When I open up the visual basic 2008 express edition and create a new project the first thing I do is go to the view menu and activate my database explorer. I connect to the database in question through the database explorer. The database I am connecting to is an access 2007 database (ive opened up the access 2007 files and they do open and display information properly, in otherwords, they do work) I then put in a listbox and use the following lines of code in a form load event to both A) create the datatable and B) automatically fill the listbox with the database info.
Dim dt As New DataTable()
Dim connStr As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=MEGACITIES.MDB"
[Code]....
When I test the program the listbox does not fill up with any information from the MEGACITIES access 2007 database. Ive tried connecting to the database by establishing a connection through the datasources window. Ive tried establishing a connection to the database through both the database explorer and data sources window. No matter what I try I can not get that information accessed.
Im almost confident that this has to do with my processor being 64 bit.
View 5 Replies
Nov 30, 2011
how to access a form in a different project but within the same solution? Say I click a button on one form to display another form which is a part of the same solution but resides in a different project.
View 11 Replies
Mar 13, 2012
DataContext db = new DataContext(MyProject.Properties.Settings.Default.MyString)I am trying to convert this app to VB.NET but VB.NET does not seem to have a .Properties on the project. I am probably confused about what that C# is actually doing. I assumed it was trying to get the string out of the app.config (both
View 6 Replies
May 3, 2012
I have a table called Cashiers. In that table are three columns: the primary key, badge and pin.
The user inputs the badge number into, let's say, textbox1.
I want to locate that row and store the corresponding pin number into a variable called pinVar.
This way I can compare it to the input received when it's time for them to enter their pin.
View 2 Replies
Apr 24, 2010
Is somebody having problems accessing a sql database in windows 7 64 bit?
View 5 Replies