So I made this neat little clock program in smallbasic and i downloaded visual studio 2008/visual basic 2010 yada yada.I clicked on graduate, made a folder under my documents to dump the stuff, finished installing, and then opened the project in VB.The SmallBasicLibrary couldn't be found
Such components as the GraphicsWindow wasn't converted to VB or something (probably because the library wasn't found).I followed Microsoft's instructions but I don't know what happened.
I am trying to convert "-10,00" from a string into a currency using the Swedish culture. Here is my code: ByVal ci As System.Globalization.CultureInfo("sv-SE") Convert.ToDecimal("-10,00").ToString("C", ci) The output from the above code is: -1.000,00 kr, which is wrong. It should be -10,00 kr. Is there anything wrong with my approach?
The solution is to pass the cultureInfo into the ToDecimal function as a second parameter. ByVal ci As System.Globalization.CultureInfo("sv-SE") Convert.ToDecimal("-10,00", ci).ToString("C", ci)
I was trying to make a program which displays two chars A and B on the screen. Using the WASD keys, it lets you move the A char around and using the arrow keys it lets you move the B char around.
I wrote the following:
Module Module1 Dim Box_A(1), Box_B(1) As Byte Dim Allow_Draw As Boolean
[Code].....
When I run the program, if I press any of the WASD or arrow keys the corresponding char doesn't move. To make it move, I have to hold down any of its keys for a bit after which I can move the char just by pressing its keys. But then, I have to do the same for the other char.
So, if I want to move B I have to hold any of the arrow keys for a bit. Then I can easily move B just by pressing any arrow key once. Then to move A I have to hold any of the WASD keys for a bit and then I can move A just by pressing any WASD key once.
Is there any way I make make each of the char move just by pressing its ket once?
While running an application in the IDE, the program properly handles Try/Catch/End Try blocks. This works fine for the most part, but is it possible to have errors generated in these blocks stop execution at the line with an error on encountering an error?
I am building a windows program that I need to link to add and pull information from an access 2007 database. I really so not want to use SQL if at all possible.
I am making a program that takes pictures of the webbrowser control on a set timer and save them in a picturebox.. I then use backgroundworkers to check the images against others stored in the program. My issue is, the backgroundworkers do not properly check the images against the ones I have stored in the program.Could this be because the images and picturebox are stored on the main thread, and no in a background worker?In other words, I am taking picture from my webbrowser and putting them in my picturebox. Then, I am comparing them with images already in the images. The only problem is, the workers are unable to properly compare the images.
I am looking for a code snippet which opens a image, creates a clone of this bitmap in memory disposes this opened image so that all handles are closed.
Usually we can open a bitmap using this[code...]
the following code however keeps the Image File locked until the application is running, any suggestions how to dispose it properly. (So that no handle is left open )
Things i already tried: use dispose method of bitmap <= doesnt work (need to write implementation) Using Block also doesnt work.
I'm trying to make a program of mine into a multithreaded application, but I've hit a pair of snags that I documented in the following code. I can expand this stub into a more efficient version of my existing application.
End A statement which as far as i know doesn't close you program properly and hides errors. Right now i'm being forced to use end because i don't know how else to close my program properly. I'm not sure where my problem is but some of you should be able to fix it. I'm trying to make a game using directx with a game loop. This code is the skeleton of what i'm making.
Public Class Form1 Private ProgRunning As Boolean = True
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load Me.Show() 'Make the form appear Me.Focus() 'Give the form focus
[CODE]...
This code runs alright because end is being used but if you rem end out the error which it's hiding comes out. The error is "Object reference not set to an instance of an object." I'm not totally sure but i'm guessing that the error is refering to the form.
I started this tutorial on sub procedures and am having trouble trying to get this program to execute properly. The problem lies with the total. I am trying to figure out the math part of it. When I hit F5 I can see this
Item Quantity Price.
Pizza Slices Fries Soft Drinks
Total
But I can't get them to add up and display the quantity and price. I tried the ByVal and ByRef code but am not sure if I did it right
Here is the code that I have so far:
Public Class Form1
Private Sub btnCompute_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCompute.Click
This is going to be a lot to ask, but I'd like to convert my old GW-BASIC program to a command line program with arguments. I'd like it to operate as follows:
elapse [drive:][path]filename This is my old code.
5 CLS 10 OPEN "G:Calc.txt" FOR INPUT AS #1 20 WHILE NOT EOF(1): INPUT #1, A$, B$ 30 IF MID$(A$,3,1)=":" THEN C$="DOUBLE DIGIT":GOTO 50 40 IF MID$(A$,2,1)=":" THEN C$="SINGLE DIGIT":GOTO 120
I have a few questions reguarding converting a Access program to a sql/vb.net program. I know these are vague questions, so feel free to give vague answers.
NOTES: I have a solid unstranding of SQL and VB.net. i have little Access experience, but i would be working with the individual who created the access program. I also don't have alot of experience in converting on program from one language to another. Most of my experience is in new programing.
[Q1] Is their a general rule of thumb when converting/recodeing on how long it should take? i.e. if this project would take me 40 hours to write my self from scratch it would take me 30 hours to recode into another language?
[Q2] What type of problems do i need to look out for when working on projects of this nature and being inexperinced?
I have developed some programs for processing and issue-coding electronic documents. I am teaching myself how to work with SQL Server because I want these programs to work with electronic documents imported into SQL Server as opposed to messing around in a folder stuck on the desktop, for example. From there I want to expand on the program so that it is a network enabled program.
I'm trying to convert a program from VB6 to DOT NET. In my original program I have a menu array which was simple to create.I simply named each menu element the same name and assigned each a different Index property.In DOT NET, there is no Index property and trying to create a second menu item with the same name generates an error. I have been unable to find any info that helps me transfer the functionality to DOT NET.
Can someone help with my struggle to make the leap to DOT NET?I'm also trying to convert use of the MSHFlexGrid in VB6 to the DataGridView tool in DOT NET and this is driving my to distraction. I've figured out some things already with lots of web searches but selecting a column to sort and sorting it still eludes me.
I have this code that gets the hostname,IP and MAC address of computers under a certain domain name. but it is in C#. i am required to run the code under vb.net.[code]...
I've been trying to convert a little code snippet from C# to VB, but it s too hard for me.The problem is that it�s using Delegate and event handling[code]...
I tried the code below to convert it to c#. But i am getting many errors when i use it.Like error related to || and && symbols using in c# version.[code]...
Can anyone can convert this SQL script in to a visual basic source code?..I know how can i do that in executing a stored procedure without parameter.But I have a hard time doing it with stored procedure with parameter.[code]....
Am converting a VB6 project to VB.Net and need help with "AS ANY" type declaration in a function declaration.
Example:Declare Function BtrCall Lib "wbtrv32.dll" Alias "BTRCALL" (ByVal op%, ByVal PB$, db As Any) as integer
I know As Any is invalid in VB.Net
Most of the calls to this function will pass a String for the 3rd parameter however, there are two instances in my code where a User Defined Type /Structure is passed rather than string value.
I have managed to take a screenshot of my computing using VB and I have stored it as a bitmap. I want to convert this bitmap (quickly!) to an array of rgb values.[code]...