VB 2010 Re-use Of Code?

May 15, 2012

wasnt sure here or games but code applies to vb 2010 more than a game so...Right, this is the second time i've typed this so i'll keep it brief( didnt post last time )im making an rpg game for the hell of making an rpg game and to display the players health im using a case select code which selects one of 20 jpg images depending on the percentage of the chars health (health / max health * 100)

Here is the code :
Select Case monsterhealth / monsterhealthmax * 100
Case 96 To 100

[code].....

View 2 Replies


ADVERTISEMENT

VS 2010 Convert VB6 Code To VB2010 Code From "The Most Amazing VB6 Code Ever" Thread?

Jul 19, 2011

This code was posted in Chit Chat and everyone is saying how great it is. I just have Visual Studio 2010 and no familiarity with VB6 so I thought it would be good to convert the code to Visual Basic 2010.

[Code]...

View 39 Replies

VS 2010 Bar-code Font With A Library That Converts Text To Proper Format For Bar-code Readers

Jan 18, 2012

I had a weird series of errors involving e.Graphics.DrawString() when painting a panel.I am using a barcode font [Code 128] with a library that converts text to the proper format for Barcode readers.That's fine, however, when I draw it to the panel, that's where things stop being fine:But, here's where things get funky. When I put it into a TextBox instead of drawing it via Graphics.DrawString(), everything is peachy:In fact, the TextBox one looks much better than the Graphics.DrawString() one! Am I doing something wrong?[code]

View 2 Replies

VS 2010 Code Commonality - All Files Share Common Code ?

Jan 22, 2012

Wondering if it is possible. It works on the idea that all files share common code. The program would ideally analyse the source file and compare it to the reference files. It would then find common parts of the code and write it to a rebuild file. At the end the rebuild file and the reference files would then be able to rebuild the source file without it being present.

For Example.

source file code = xxyyzyzyxw
ref file 1 = xyxxzyzxwyy
ref file 2 = zxxwyzzywxx

The program would then analyse these files and make a rebuild file like the following

source(0,1) = ref1(2,3)
source(2,3) = ref1(10,11)
source(4,7) = ref2(5,6) + ref2(5,6)
source(8,9) = ref2(2,3)

Thus you would be able to build the source file using these instructions and the reference files.

View 1 Replies

VB 2010 - Code Editor Not Deleting Code

Dec 6, 2011

when i put, for example, a picturebox in form and code some events. then i want delete that picturebox. well the code stills there. imagine that i use another picturebox i use the same name. now if i double click on these picturebox, the code editor recreates a new subs. can i disable these situation?

View 6 Replies

VS 2010 - Pause Code Until Code Above Is Completed

Mar 8, 2011

Ok i have this code on a button click hook

[Code]...

but if the checkbox is not checked then i want it to wait until it has copied the file before deleting it because at the moment it deletes it quicker than it copies it and the file could be different size everytime so i cant just put a simple timer of say for example 5 seconds in.

View 2 Replies

VS 2010 Copy / Paste Code From A PDF To VB 2010 Express

Oct 7, 2010

I am learning VB for the moment. I want to copy/paste code from a PDF to Visual Basic 2010 Exppress, but if i paste the (structured in PDF) code to VB, i get 1 long string of code and need to restructure it by entering after each line. Otherwise VB gives me a lot of errors. This is a time consuming work. Isn't there a way, VB puts the code in the right format?

View 4 Replies

VS 2010 How To Use C# Code

Sep 11, 2011

I am trying to obtain the content of a web page displayed in an iframe in a Web Browser Control in Vb2010- While searching for this I came across the following C# code to obtain content of iframe. The person who has posted the code suggested that I can use the C# code in a VB.net application. I want to know, how to do this (ie how to use the C# code in a vb.net application)? [code]

View 1 Replies

Change The Following Vb.6 Code To .net 2010?

Dec 22, 2011

Option Explicit
Private Const NULLPTR = 0&
' Constants for DEVMODE
Private Const CCHDEVICENAME = 32

[code]....

View 10 Replies

Debugging VB 2010 & VB6 Code?

Jun 25, 2010

Prior to VS 2010 I was able to debug VB6 client code from the .Net IDE by setting "Start External Program" to vb6.exe (full path), or attaching to the running vb6 executable via "Tools->Attach to Process" and have execution stop at the required breakpoints in my .Net code.

Now with VS 2010 I seem to be only able to accomplish the same by setting the target framework to 4.

Is this a bug in VS 2010, or is there a switch/option that controls this?

View 5 Replies

Find Code Example For VB 2010?

Feb 16, 2011

At my old job we used batchscripts to start macro's in another application. These batch scripts would also write data about the status of the macro as loglines to a log file using VB.

I have saved the batchscripts when I moved to another job because I always thought they might come in handy. However I forgot to save the visual basic script needed to create and fill the logfile.

The batchscript would look like this:
SET SP=C: est
SET LOGFILE=C: est est.log
cscript //nologo %SP%logging.vbs "Script executed by admin" >%LOGFILE%
cscript //nologo %SP%logging.vbs "Starting Loading Data" >>%LOGFILE%

View 1 Replies

Use Code Of 2008 In VB 2010?

Jul 15, 2010

Can i use the code of vb2008 in vb 2010?

View 4 Replies

VB 2010 - Code For Each Of The Boxes ?

Oct 22, 2010

On my form i have 4 text boxes which need to show one of each of the following.

box1 the amount of years since 25/6/09
box2 the amount of months since 25/6/09
box3 the amount of weeks since 25/6/09
box4 the amount of days since 25/6/09

What would be the code for each of the boxes?

View 10 Replies

VB 2010 Code Tables Together With The Row?

Jan 30, 2011

I made a simple VB application has a database created by SSMS and attached to it.Here is my form

Imports System.Data.SqlClient
Public Class Form1
Private cs As New SqlConnection("Data Source=STARMAX-PC;Initial

[code].....

View 2 Replies

VS 2010 Code Cleanup?

Sep 13, 2010

I have the following code, I was wondering if anyone could show me a way to clean it up abit, it's a bit bulky and repetitive and I am just looking to slim it down.

Public Sub RefreshList()
Dim Button As New ListViewGroup("Button")
CodeKeeper.lvCodeList.Groups.Add(Button)

[code].....

View 3 Replies

VS 2010 Code Disappearing?

Apr 25, 2012

Ok, getting a little frustrated. I'm a new VB programmer (just a few months). Let me show you the start of my code so you can see what I'm trying to do:

Public Class Form1
Dim crude1 As Double = 0
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs)

[code]....

View 4 Replies

VS 2010 Code Does Not Function?

Oct 20, 2010

i use this code many times on all my applications.but now i'm on windows 7 and changed the framework to 3.5 and the code does not do what it supose to do.If File.Exists(Application.StartupPath & "downloaded" & ListViewEx1.SelectedItems.Item(0).Text & "ar.exe") Then

[Code]...

View 3 Replies

VS 2010 Code For Several Datasets?

Apr 13, 2012

I have 4 ComboBoxen and 1 DatagridView into one Form. I make a code, for binding with 5 tables, each is own dataSet and dataAdaptor Is it possible to use one DataSet and one DataAdaptor for 5 Tables, so my code become shorter.

I think the solution is a SQL SELECT query, but i dont no for sure.If it is a SELECT query, ore something else, cane anybody help with make the code i need.

[Code]...

View 4 Replies

VS 2010 Code Is Not Working?

Jun 16, 2010

but i used this to check if its true

Dim returnValue As String = html
Label4.Text = html
If Label4.Text = "true" Then

[code].....

View 14 Replies

VS 2010 Code Profiler?

Feb 24, 2012

I was searching for code profiler and found Very Sleepy code profile

View 1 Replies

VS 2010 Code Tables Together With The Row?

Jan 31, 2011

I made a simple VB application has a database created by SSMS and attached to it.Here is my form code:

Imports System.Data.SqlClient
Public Class Form1
Private cs As New SqlConnection("Data Source=STARMAX-PC;Initial Catalog=PRACTICE;Integrated

[code].....

View 5 Replies

VS 2010 Picture Box Code?

Sep 19, 2009

I just have a quick question, I have tried to get my code to work for a little while now and have run out of ideas, here is the codeHTML

If picturebox1.image = programname.my.resources.picturename then beep()
Well the problem with that is
Error3Operator '=' is not defined for types 'System.Drawing.Image' and

[code]....

View 6 Replies

VS 2010 Translating Code From C# To .net?

Apr 16, 2012

Just a quick question, what will this code be in vb.net? if this is the wrong place for this request.

[Code]...

View 1 Replies

VS 2010 Using .bat Code Inside .net?

Jan 17, 2011

How to make this 1 Button : when its pressed to run this

@echo off
:end
GameServer.exe 127.0.0.1 55970 127.0.0.1 55960 55901
echo .

[code]....

But to has .ini file that they can change this things (thats are in red)When they change it, then when its pressed the button to open the file with the perifrences that are added in the ini any ideas ?

View 7 Replies

VB - Get VS 2010 To Stop Recommending VB6 Code

Oct 20, 2011

whenever I have to convert something to a value (for example,lets say I have to convert something to

a boolean) visual studios will give you their advice of CBool, which works, but that's VB6 and I do

not want that. If you know of a plugin that does it, I'm open to that as well.

View 1 Replies

Add Outlook 2010 Reference With Code?

Jun 22, 2012

i have Office 2003 on my developer computer, but my client have Offie 2010. i handle the error on access adding the reference of outlook.exe programatically, but when i have to fix the VB.Net solution, i can't find a way to programatically add the reference of Office 2010 when i don't have that version installed on my computer.

View 5 Replies

Button Code Does Not Work In 2010

Jan 13, 2011

I have a form in visual basic 2010 in design view. And when i debug the form. the button i have put on the form does nothing. i want the button that i added, to do what the add new item does on the toolbar at the top of the form the code i have now is

Public
Class
Form1
Private

[code]....

View 6 Replies

Can WSSF 2010 Be Used For Code Generation

Jul 19, 2011

I am new to WSSF and am wondering if it would work for solution with VB as the programming language if so how to achieve it. I have seen samples which generates C# code but my project requirement is VB .Net.

View 1 Replies

Code For 2008 And 2010 Versions Of .Net?

Sep 3, 2009

<edit> On 27th January, 2011.If you are using VB.Net 2005 or earlier then please see my 14th post in this thread.</edit>I saw a post earlier on which reminded me about Extension Methods.This led me to create the following code which acts on the base class

[Code]...

View 1 Replies

Code For Ascending Order In Vb 2010

Mar 29, 2012

I am currently trying to work out the code for ascending order in vb 2010. I have 12 textboxes with values in that i want to use to sort into ascending order but what ive tried so far isnt working.

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved