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.
Im 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.
I 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.
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?
I 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.
my 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.
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:
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
I 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
"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.
I 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.
'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'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?
I have created a query method for my tableAdapter in the dataset designer. I typed the command text manually, but tested it in the query builder after I got a Constraint Exception when debugging. When running in the query builder via 'Execute Query' I get exactly the results I expect. When running the application I get this exception: "Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints." I tried temporarily setting my dataset's EnforceConstraints property to FALSE but still get the same exception. I can't understand why the Query Builder would return the correct datatable but running the app would not. Is this a bug?
What is the best way to make a program that works with multiple versions of Microsoft office? I own office 2007, so my program uses the office 2007 com objects. When I try to use my application with office 2003, I get errors related to the com objects. Does Microsoft have com objects that are compatible with multiple versions of office?
[code]The two Location lines throw errors but the Text line works fine. I've played around with this until I'm blue in the face but can't get it to compile.
Error #1 Encrypt works but decrypt does not. This is b/c the file extensions in TextBox1.Text is .txt and it is looking for .enc Error #2 If I enter in the file.enc the file will be decrypted but it will have the file extensions .dec. How can I copy the extensions (.txt) and replace the .dec after it was decrypted.
This code was working consistently, but now...This code works on the first pass.Then second pass it just hangs on Code:Dim tcpClient As TcpClient = tcpListener.AcceptTcpClient() for about 2 minutesThen the code will fork for another pass, then fail.....