Visual Basic Language,194
Recent update: 2008-3-21

Just a few questions

1240 byte By Kedhri at 2008-3-7
Hello there,My name is Kedhrin, I'm new to VB and i've only been using it for one day now. I'm making a simple application in Visual Basic 2005 Express Edition that will let me edit XML Files... visually!They are only one specific XML file, and there is 9 fields where the values can change.I ...

Saving XML Files - XML Editing PLEASE HELP

1240 byte By Kedhri at 2008-3-6
Hello there,My name is Kedhrin, I'm new to VB and i've only been using it for one day now. I'm making a simple application in Visual Basic 2005 Express Edition that will let me edit XML Files... visually!They are only one specific XML file, and there is 9 fields where the values can change.I ...

Windows APIs

480 byte By VijaySena at 2008-3-5
Hi, I want to know what are APIs and if they can be used in my programs.I want my application to show the preview of the different color schemes like the appperance tab of display properties in windows.Should i use any dlls?If so can you please tell me which one and how.I also want to be able ...

Screensavers in forms..

256 byte By VijaySena at 2008-3-3
Hi everyone, I want to know how to show screensavers in a windows form & also want to change the the windows color schemes and themes from my application.Please help me I need this (quickly) for my academic project. Thank you.

Non-Local Data in VB2005Exp

522 byte By haleyweb2005 at 2008-3-1
I know that the ability to use non-local data in the Express versions has been removed, but i also know that it is possible to connect to a non-local database using code. is there anyone outthere that could help me, i cant figure out what that code is, i am trying to connect to my SQL2000 DB, ...

2 questions about Sql Data Adapter

1142 byte By Gosovic at 2008-2-28
1. When we use Data Adapter Configuration Wizard to make Data Adapter, there is a checkbox option:"Refresh the dataset: Indicates whether you want the wizard to generate code that re-reads a record from the database after updating it. The Select statement is added to the corresponding command ...

Singleton Pattern - Shared/Synclock confusion...

8590 byte By BradHehe at 2008-2-27
Given the code below, I am trying to implement a "double-checked" constructor for a singleton pattern essentially....What has me confused is how I should handle my locking. In examples I found it often showed the simple "SyncLock Me" approach to lock a section of code. When I try to use this in ...

replace listbox item

168 byte By garmhappy at 2008-2-26
Help, I can't figure out how to replace an item a listbox. I can delete the selected item and add the nw item but there has to be a better way Thanks

Solution

425 byte By Gosovic at 2008-2-25
How to find row position after table sort? Datagrid is binded to ds1.sometable. I have DataRow object or DataRowView from cm.Current and position before sort (cm.position or dg.CurrentRowIndex) but how to find where is its position to navigate DataGrid to select row after I re-sort datagrid? I ...

Installation of visual studio .net 2003 has slowed down my machine

821 byte By mgmian at 2008-2-24
Hi ThereI have got a project that was developed visual studion .net 2002 version, every thing was fine. I moved to Visual Studio .net 2003 version. Every thing is working fine except that for some reason, the whole solution is slow under the development enviornment. It takes so long to load, ...

Is it possible..

416 byte By VijaySena at 2008-2-23
Is it possible to get the product ID of windows os so that my application shall not run on pirated copies of the windows os.Something like the windowsxpservice pack 2 Because i believe that a guy who is not paying for an os will also not pay for my application. (which i guess will be ...

real time database updation

1095 byte By Shwnew at 2008-2-22
HiI’m stuck while making this project; I have to import the filename, file size it’s all wave files from particular folder in a Ms Access database. The database has to be updated automatically real time updation which will be shown in datagrid of vb Can anyone tell me where to find some ...

Row position after table sort

425 byte By Gosovic at 2008-2-22
How to find row position after table sort? Datagrid is binded to ds1.sometable. I have DataRow object or DataRowView from cm.Current and position before sort (cm.position or dg.CurrentRowIndex) but how to find where is its position to navigate DataGrid to select row after I re-sort datagrid? I ...

Need Help with Combo Box at Page Render

2034 byte By DarshanPandit at 2008-2-21
Hi, I have combo box inside a data grid.At page render event I want to have additional entry as "Select One..." with value -1 but display the existing old value as default value in drop down list.To get this result first I create a object of ListItemCollection, I add entry as "Select One..." ...

Generics, Inheritance and Directcast

1799 byte By MarkusSch. at 2008-2-20
Hello,why can't i cast a generic instance to another variable in which the type paramters in the of clause inherit from the type parameters in the source variable?I think there is an inheritance relationship?MarkusExample:Public MustInherit Class clsBase Public Overridable ReadOnly Property ...

Convert 4-byte VB6 Date to VB.net datetime type

154 byte By dcoscio at 2008-2-20
Hi, i have a file generated by vb6 wich store some records with a 4-byte date field. i want to know how to read it from vb.net thanks diego

Compiler doesn't accept correct syntax

502 byte By GerhardZehetbauer at 2008-2-20
When I was writing code which should convert an icon into a bitmap, I discovered the following bug:IT's not possible to compile the following line:New Icon("MyIcon.ICO", 16, 16).ToBitmap().Save("MyIcon.bmp", Imaging.ImageFormat.Bmp)must be a bug, doesn't it?PS: it works with the ...

Programmatically getting same list of programs listed in Explorer's "Open With.." opt

262 byte By bcw at 2008-2-19
Hello, Was wondering if there is a VB control that can bring up a list of programs identical to the list of programs displayed on the "Open With" dialog box when you open Windows Explorer, right click on a file, and select "Open With.." Thanks BW

Input/Output Textboxs

1324 byte By flipside at 2008-2-19
Hi all, this is my first VB program ever. I'm trying to make a program that you input values into a textbox, then press a button to set those values to the variable. http://img409.imageshack.us/img409/7881/screeniekh0.jpglooks something like this..I'm a complete noobie at this so try to go ea...

Could not read state file

352 byte By PeterToye at 2008-2-18
My projects keep coming up with this error:Warning 1 Could not read state file "obj\Debug\ResolveAssemblyReference.cache". Exception has been thrown by the target of an invocation. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\Microsoft.Common.targets 0 0 The help file doesn't exist for ...

How Do I initialize INET?

338 byte By BenIsLost at 2008-2-17
Hi. I'm trying to use an applicationn that logs into a website. To do this, I'm using Inet. However, when I try to use any of the functions (or are they called subs I guess) from the Inet class, it says that I did not declare them. Do I need to initialize Inet in some way, rather than just ...

.NET 2005 Express Not Functioning Properly

345 byte By bud1024 at 2008-2-16
I downloaded vb.net 2005 express beta 2 on two computers. On one computer, the intellisense correctly finds the Size structure/class when I try to dim a variable as new size. However, the other one, which has .net 2002 installed already, cannot find size structure/class. The intellisense forces ...

Finding the Computer Id number

191 byte By MizzouTiger at 2008-2-15
How can I access the computer Id number from the Computer? Is it even possible? I want the Number Displayed in the System Control Panel under the User name and computer name. thanks

How to remove items from a sorted list in ListBox

1005 byte By Senefelder at 2008-2-15
In an application in Visual Basic 6, I add items (which include dates) one at a time by using AddItem, and display them in a ListBox. Works great. Turn on Sorted property in list box and they display chronologically listed by date - even greater. BUT, when one item is selected from the list and ...

Welcome to the Visual Studio General Discussion Forum

774 byte By chrom at 2008-2-15
hi..i've been using vb6.0 to develop applications. we just switched to visual studio 2003 .net..i have the following code in vb6.0Do While Not RSDetail.EOF If RSDetail.Fields("itemno") = vItem Then vQty = vQty + RSDetail.Fields("Qty") RSDetail.MoveNext Else vSearcher = "ActCode = '" + vItem + ...

Microsoft World MRU Lists and VB

573 byte By OnlyOneTom at 2008-2-15
Hi,I am trying to load Microsoft words MRU list into VB and display it on a pop up menu for a client. My client wants to be able to click a system tray icon and have the option to open a document and automatically print it. I have done this ok. My problem is however is that he also wants to be ...

WriteLine is producing quotes

1735 byte By JoshuaWise at 2008-2-15
Hi all,Ok, so I'm trying to output some text into a standard .txt file. However, when I do this, I am getting quotes around all of the text I'm writing. I have tried Writeline and Write and I'm getting it with both.Here is a sample of my code: Dim s As string s = ...

DataAdapter Select Statement

489 byte By DavidDavis at 2008-2-14
To allI'm VS2003, when I try and create a dataadapter with more than 100 fields (either through drag-n-drop or manually) I received "There were errors configuring the dataadapter".Since the table is in SQL 2000, I tried using: "Select * From inmast" which returns 143 columns and all rows from ...

VB6 To VB.NET Code Conversion

774 byte By chrom at 2008-2-14
hi..i've been using vb6.0 to develop applications. we just switched to visual studio 2003 .net..i have the following code in vb6.0Do While Not RSDetail.EOF If RSDetail.Fields("itemno") = vItem Then vQty = vQty + RSDetail.Fields("Qty") RSDetail.MoveNext Else vSearcher = "ActCode = '" + vItem + ...

Root Namespace

229 byte By AlexReg at 2008-2-13
Hi, My questions is: how do I get the root namespace of an assembly (loaded by Reflection)? I hope this is a simple enough question... I do need it for accessing types within the assembly. Thanks in advance, Alex

Remove the 5 first lines in a text file

96 byte By Coroebus at 2008-2-13
Hello, How can i do to remove the 5 first lines in a text or excel file with vb.net ? thanks

Howto: Return data from one form to another

200 byte By Zeeshan at 2008-2-12
Hi! I want to return data to calling point of the form, but i can't return data when the called form closes. Please tell me how can i return data from one from to another. Shani! <u></u>

ListView Problem

852 byte By Ragh at 2008-2-11
Hi,Iam using ListView Control in VB.NET, i want to do something like this... please help me.1. I receive data from RS232 Port.2. I will Save the data into a table.(Call Data) and mark a flag field as NO.3. I must populate the data into listview control.4. Sometime later i will receive a data ...

Combobox.SelectedValue

540 byte By NileshGambhava at 2008-2-10
dim cmb as comboboxcmb.SelectedValue=1This means that it will select item whose value member is 1. Am I right?If yes then In my datatable, i have following dataID NAme-1 None 1 India 2 USAThen I bind it to combobox and it worksthen if i do like this,cmb.SelectedValue=-1 then it should select ...

New to 2005 need help with loading files into program

216 byte By BlokHead at 2008-2-10
Hi i just recently got 2005 and i need help with loading a text file into my program. I tried to use: open "C:\My Portfolio\Resources\AboutMe.txt" for input as #3 but this does not work. What should i do?

i wnat to import data from a csv file to sdf database using vb.net 2005 plz help

239 byte By som at 2008-2-10
i am using vb.net 2005 and sql server ce 2.0 for my pocket pc application. i need to import data from csv file to a sdf table. but bulk insert in not working on sql server ce 2.0. if any of you can help me with the code. it is very urgent.

Why 'Events cannot be declared with a delegate type that has a return type'?

246 byte By Neo at 2008-2-8
I am just surprised at the fact that VB.NET does not support event that has a returning type. In C#, delegate can be any function prototype (in the old C/C++ days) and C# keeps this advantage. I hope it will be better in the final release.

Visual Basic SQL queries

386 byte By KrystianS. at 2008-2-8
HiI want to access my SQL database [i've got it configured in datasource], within the code. I want to do it this way:user selects few options in program, i build a query in the code, send it to sql database, recieve the answer and put it in two places [one will be datagrid, second the ...

how to automatically increment value in label using asp.net code?

129 byte By zoey at 2008-2-8
i need the application to read values from database and increment automatically without pressing or entering anything on run time

Combo box entry

2706 byte By LittleShell at 2008-2-7
I placed a combobox on my windows form to present a list of strings that can be selected, however, I would like the user to have the ability to enter any string they may choose.The attached code takes whatever is chosen and prints it in a messagebox. It works great except for the -1 index. How ...

Sharing classes across projects

771 byte By AlexReg at 2008-2-7
Hi,Here's my problem: I create one project that uses two classes and another project in another solution that uses the same two classes (as links from the *one* version of the source in the other solution). Now, I am trying to set variables via properties in an interface that is referenced ...

Why don't answer: Showing Form as Field Lookup

346 byte By Zeeshan at 2008-2-7
Hi! I made a form with only one combo box which loads data from database. well problem is that i want to show that form as a lookup control for the datagrid, i can show that form on another form but i can't align that form just under/over the active cell of datagrid on another form. please ...

Cannot use odbc .net data provider in Visual basic 2005 Express Beta 2

350 byte By RajeshPKumar at 2008-2-7
i have downloaded Visual basic 2005 Express Beta 2 and odbc .net data provider but i am not able to use odbc data provider in data source configuration wizard. i tried to change data source but there are only 2 data provider list 1. .net framework data provider for sql server and 2. .net ...

Missing dependencies .?

721 byte By Gretzky99 at 2008-2-6
Hihaving just applied some Crystal Reports patches my app has suddenly developed the following build errors. The dependency 'CrystalDecisions.VSShell' could not be found. The dependency 'Microsoft.VisualStudio' could not be found.This could be a coincidence but cannot see any other reason ...

Error Type 'MarshalAs' is not defined

2776 byte By csann at 2008-2-6
I recently converted a project from VB2003 to VB2005. I am getting this error and I can't figure out why...Type 'MarshalAs' is not definedHere is an example of the code that is causing the error: <StructLayout(LayoutKind.Sequential)> Friend Structure VersionInfoDef Dim ...

VB.NET and DirectX Surfaces

2755 byte By Clodaus at 2008-2-5
Couldn't find a better place to post this, so I suppose here will do.I'm trying to create an application using VB.NET and DirectX 9 (Microsoft.DirectX). I'm having a problem with the surfaces (Microsoft.DirectX.DirectDraw.Surface).After I create one surface, DirectDraw raises an error when I ...

BSTR type in VB

976 byte By jan_hk at 2008-2-5
I received a DLL which uses BSTR as string type:example : given in the include file DLLEXPORT BSTR WINAPI I2cGetInterfaceTypeStr (BSTR Interface);how do i access this function in vb. This doesn't work.Declare Function I2cGetInterfaceTypeStr Lib "I2CAPI32.DLL" (ByVal InterfaceType As String) As ...

how to delete record with multiple checkbox in windows based application

83 byte By Hari Babu at 2008-2-5
i want to delete record in DataGridView with multiple checkbox please help me.

Help writing a Generic Dictionary Collection

2778 byte By vbjunkie at 2008-2-4
In vb.net 2003 I would probably write a dictionary Collection like this.What is the proper way to write in vb.2005?Do I need to implement the enumerator?What extra function would be useful to add? Can you help converting the below to a more generic type? '/ <summary> '/ A dictionary ...

Detect Local IP Address in Visual Basic 2005 Express Edition (Beta 2)

1403 byte By ollertoncj at 2008-2-4
I'm trying to write a simple program in my newly downloaded copy of Visual Basic 2005 Express Edition (Beta 2).I want to display the IP address of the local machine (i.e. the machine the program is being run on).I would previously have used something like this: Imports System.NetImports ...