VS 2008 : How A Module Works
Jul 8, 2009Im on Chaper 10 of Microsoft Visual Basic 2008 Step By Step, and I just dont understand how a module works. Ive the chaper over and over and i still don't get it.
View 12 RepliesIm on Chaper 10 of Microsoft Visual Basic 2008 Step By Step, and I just dont understand how a module works. Ive the chaper over and over and i still don't get it.
View 12 Replieshow we can declare a connectionstring in a module and call that module
View 1 Repliesdoes ADO works on VB 2008 ?i have this error when i tries to run this code
'Item' is 'ReadOnly'
and below is my code:
rs.AddNew()
rs!("pwd") = TextBox1.Text (it gives me the error here )
So my vb program works inside of vs 2008 with the code below but when i build it and put it in windows home server it crashes. The problem is with the if statement. If i take it out the program works just fine. the if statement searches the output from the shell.
schedule = "SCHTASKS /Create /SC " & Often & " /RU Administrator /RP " & password & " /ST " & TextTime.Text & ":00" & " /TN " & title & " /TR " & path & " > C:copypalslogs" & title & ".txt"
[Code]....
where can i get a treelistview written in vb.net that works on vs 2008 or vb express edition 2008?
View 2 RepliesI have written a pontoon game for a college project but i have a problem in which my loop only works when there is a breakpoint in it.The counter is incrementing as i have used a msgbox to display it. The procedure runs the loop and returns the same value in all locations in the array. With a breakpoint it displays correctly in the array.
here is the
Dim aryCardValue(0 To 10) As Short
Dim aryCount(0 To 10) As Short
Dim i As Short
[code]....
I have used the cards procedure in other programs and it worked fine.
my code doesn't seem to work on windows XP but does work on Windows Vista and 7.
Code
Imports Microsoft.Win32
Public Class Form1
Dim rValue, rsvalue As Int32
Dim Regkey, RegKey2 As RegistryKey
[code]....
I've been working on a project lately, where the user can click on an item in a listbox and then get a picture in the PictureBox1. My problem is that when I added a tab control so that I could have several pages with different listboxes and pictureboxes, it stopped working! When I click on an item in ListBox1, the picture doesn't show up in PictureBox1. Why did the tab control ruin everything?
View 3 RepliesI have browse the net and can not find any examples of code that i can use to see how the Mschart control works. Can someone please help me with some examples.
View 4 Repliesmy goal is to control the incoming and outgoing packets to a game server, to alert when a game round finishes the main code is this:
Private Buffer(65535) As Byte
Private RawSocket As Socket
Public Event PacketReceived(ByVal PacketBuffer() As Byte)
[code]....
this code works perfectly with XP (you can read both incoming and outgoing packets to the game server)... with Vista the same code displays ONLY the incoming packets....
When trying to get this program to filter appointments based on which doctor is selected, the code works fine with a sample database. When i try to use the database I have to, it doesn't show any appointments.
Imports C1.Win.C1Schedule
Imports C1.C1Schedule
Imports System.Data
[code].....
First of all I am not a really experienced programmer, sorry for that. I try to do my best.So far my application is succeeding: it can create a directory for itself download a file from the internet, rename it to the matching unique id for the user, replace the file and backup the old one.
THe problem I now have that the file to download is 22mb, with .rar it's only 3mb. Zo I tried to zip it (also worked) but now I need my application to decromress it. After a lot of search I found this method from MSDN:
[Code]...
I have made a little Hotkeys utility for Poker Tables. I hook the keys and, depending from the key, I simulate a mouse click over the related table button.The Sub that make the job is this:
Private Sub DoMouse(ByVal flags As NativeMethods.MOUSEEVENTF, ByVal Wheel As Integer)
'wheel = +-120 if wheel event, 0 in other cases
'added hoping to improve the code, but nothing changes, Hwnd is a global variable
[code].....
'Make a control array work around (it works) except for'PROBLEM txtBatterPos_Changed sub handler.[code]
View 2 RepliesI am having issues with my program. It should update every time i click the button, but it runs through perfectly on the first click, after the first click it does nothing.This is a UDP Program, where the client sends a packet with a sequence number and payload which are separate items in the packet. The server receives the packet, reads the sequence number, and then sends back the next sequence number the client should send.The client then receives that from the server with the same payload.. And then should change its sequence number to the one it recieved, and send that to the server..The client works up to where the client updates to the sequence number it receives from the server.. But both show no effect on any clicks after.
Heres my Client
Option Strict Off
Option Strict Off
Imports System.Net.Sockets
[code]....
"Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated".I have this message showing up that references this code in the keyup event:[code]I am just testing the trapping of keys right now. The code still works but I am uncomfortable with an unresolved warning.
View 3 RepliesI have a function that I use quite a bit that I wrote more than 2 years ago. It works fine but recently I saw how it can use up a good deal of time under certain condition. Here's some code that uses the function SelectValue The function works so that if you had N which you plug into the function rising continuously while SelectLimit was set to 255 then SelectValue would match N until N reached 256. SelectValue would start to descend to 0 until it reached 0 and then it would again ascend to 255 and the process would repeat. So SelectValue(255, 255) would return 255 and SelectValue(256, 255) would return 254. SelectValue(257, 255) would return 253.
Option Strict On
Public Class Form1
Dim sw As Stopwatch
[code]....
The function works exactly as I want it to but if one of you knows a way to write this so that it will process faster then you can let me know. I get a result for processing time of 6.11 seconds on my computer for the above code.
I have a spreadsheet with this code:
'insert link
sheet1.Hyperlinks.Add(sheet1.Range("P1"), "http://http://www.vbforums.com", "")
the code of the button (ribbon)
[CODE]...
When I press the button, it connects to the web site. when the sheet1 is selected, it works, but when the sheet2 is selected, not works, why? the path is sheet1,What's wrong?
I have a VB.Net interface that communicates with an Access 2k3 Database using this module:
Module MOD_ENGINE
'Declare Database connections controls
Dim con As New OleDb.OleDbConnection
Dim dbProvider, dbSource As String
[code]....
I want to call EngineConnect procedure from MOD_ENGINE module into popCboBox module so I can ignate the engine!
What I'd like to is get the name of the current Module running in a VB app. If I am in a Form, I can use "Me.Name", but in a Module that will not work. I tried: System.Reflection.Assembly.GetExecutingAssembly().GetModules()(0).Name But that gives the name of the app (like "WindowsApplication1.exe") rather than "Module1", which is what I'd be looking for.
View 2 RepliesI am using Visual Basic .NET 2008. I have a module in my project and couple of windows forms. Now in my module I wrote -
Structure Transport
Dim Veh as Vehicle ' pointing to enum below
Dim GoAhead as boolean
End Structure
[code]....
What I want is that another form should be able to call my sub Select (declared as public) and pass enum data declared in Transport structure. VB allows me to do that if my sub is private but not if my sub is public. To overcome this issue one solution is to declare the enum in the form class itself. But for this I will have to do it in each form.
There shouldn't be any problem whatsoever right?
VBScript_RegExp_55.RegExp
and
VBScript_RegExp_55.MatchCollection is gone
VBScript_RegExp_55 name space is still around but only contain interface globalObj and errObj.
I've created an SQL Query using the query builder. In the query builder, you can test the query by clicking the button "Execute Query", and entering the desired values in the parameter fields.
My query returns the correct results when I do this, but when I seemingly pass the same values at runtime, I get 0 records returned.The query is designed such that you can pass nulls if you don't wish to filter data by that particular parameter.
SQL Query:
SELECT ID, UPC, Quantity, Manufacturer, Style, Color, Size, Category, DateReceived, Cost, OriginalRetail, Retail, LocationID
FROM Inventory
WHERE (UPC = @UPC OR
[code]....
In the query builder "Execute Query" dialog, I enter a value I know that the db contains in the "Size" field, "1/1/1900" & "1/1/2199" in Dates A & B, respectively, and nulls for all other fields. This returns 1 record, which is just as I expected. It works correctly.But when I pass the same values into the method created by the designer, I get 0 records returned. I can't figure out where the problem lies. Even if I enter nulls for all fields other than the dates, it returns 0. This tells me that the dates are causing the problem, but I can't figure out why, because I'm passing strings equivalent to what I entered in the query builder.
I�m trying to create a sort of "slider" to select the start date and end date of a query. I need to convert the contents of two textboxes to dates, and then do a datediff calculation.
The thing is it works with one of the textboxes, whereas the other casts an error that an integer (which is not in the textbox) cannot be converted to a date. I don�t know where the integer comes from. I�m guessing it�s some sort of format problem, but the textboxes are the same and the actual dates comes from the same field in the same database table.
I downloaded HWID Which lets me create lock to pc for my app Original source works but when i try and add that to my app it dosent m i Missing something ?This is the code
Imports System.Net
Imports System.Management
Public Class Form1
[code]....
I coppyed original source as u see above to my form3 which will be loading screen but some reason I get errors above code is exacly the same?
passing values from the main form.
I've tried declaring the array globally in the module The array() is going to be used in other forms as well.
How to make backgroundworker work on the login module??My form have progressbar with Marquee style...
Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click
lblProgress.Visible = True
[code].....
I have the following statement and the function 'InitialiseOsTransform' is in a Module which is in the project.
If InitialiseOsTransform() = False Then But instead of the code going into this function it goes into the Paint function.
I have used the similar code in another project and it works correctly.
I'm making a simple window that bounces around the screen (no reason, just for fun). I can make it work when the moving code is in a Timer_Tick event in the form, but now that I try to move it out to a module, it won't work. Here's what I have:
[Code]....
I try to call it with Bounce(Me) but the form doesn't move. I added a Debug.WriteLine(form.Location) at the end of the sub, and it shows that the location is not changing.
can you suggest me a site(which works) for uploading a file using vb express edition 2008.it should be there on the site when i download it.
View 5 Replies