VS 2010 Converting Hex Functions From VB6

Jan 9, 2011

I came about these two functions (ReadHEX and WriteHEX) that, obviously, read a hex offset or write a hex offset of a file. However, these functions were written in VB6. The main thing I'm not understanding is how to open a file (in a filestream I presume) and then to either read or write a certain offset from the file. I'd also need to convert the string I'm writing to hex before I actually right it, but I've got that under control. Here's the current functions as they were written:

[Code]...

View 12 Replies


ADVERTISEMENT

Where To Write The Functions Of ApplicationEvents.vb When Converting Project To C#

Feb 1, 2012

I am trying to convert a VB.NET project to C#. I am conveting all the forms and classes as required, but I don't know where I need to write the events from ApplicationEvents.vb (I believe its autoGenerated from Properties) Here is the code in my ApplicationEvent.vb file:

[Code]....

View 4 Replies

VS 2008 : Have A Class Where The Functions Of The Same Name Are Both Instance Functions And Shared Functions?

Dec 6, 2010

What I am trying to do is have a class where the functions of the same name are both instance functions and shared functions.

Public Shared Function Get...(byval xx as xx)

and

Public Function Get...

The Public Function uses a Property xx created in the constructor, whereas the Shared Function has the parameters (byval xx as xx).

View 1 Replies

VS 2010 Add Subs / Functions To Subs / Functions?

Oct 26, 2009

When you refrence a Function like this one:[code]You may want to be able to get more out of that, like this.[code]So how would I be able to add subs or functions onto a sub or function like that?

View 4 Replies

VS 2010 Alternatives For The Old Functions?

Sep 21, 2010

When I try to code in VB2010, I usually unmark the reference to Microsoft.VisualBasic. Because I do not want to use the legacy functions of VB6. I want to complete walk in .Net path. And I have found some alternatives for the old VB6 functions. But the rest not. Where can I find the list of those methods or classes (alternatives for the VB6 functions) ?(For eg: when I tried to find the difference of 2 dates, I couldn't find any other alternatives. So, I came back and used the Microsoft.VisualBasic reference for using DateDiff())?

View 24 Replies

VS 2010 Using Functions From Reflection Var?

Dec 13, 2011

how to use a function from an assembly reference.when using:

Dim __asm As System.Reflection.Assembly
__asm = System.Reflection.Assembly.LoadFrom("c: estsomedll.dll")

this dll should have a few public methods, lets say it has a helloworld() with no args and a hellowworld2(byval x as string). How to call them?

View 4 Replies

VB Express 2010 Time Functions?

Jul 4, 2011

I am having a really hard time with the hour(TimeOfDay) VB Express 2010 command, is there any one reading this that could enlighten me on this problem please.My local machine time is in standard time, but the VB hour(TimeOfDay) command sent to a text box on my form is in Military time, is this a bug or do I need to use another command that I am not aware of, or can I use the format command to force it to
standard time and if so how do I accomplish this task please as I have battled with this for few weeks now and I am all out of ideas as to the nature of the problem.

I know about the following:-format(TimeOfDay,"h:mm:ss") 'displays time in standard time with out a padded zero format(TimeOfDay,"hh:mm:ss") 'displays time in standard time including a padded zero!

format(TimeOfDay,"H:mm:ss") 'displays time in military time with out the padded zero!
format(TimeOfDay, "HH:mm:ss) 'displays time in military time including the padded zero!

how could I do the same with the format(Hour(TimeOfDay),"?") function I also notice that the minutes and seconds can include or exclude the padded zero, I would also like to have control over these two commands please.

View 7 Replies

VS 2010 Adding Functions To An ArrayList?

Jul 15, 2011

I'm wondering if this is possible, I want to be able to call functions from within the program itself by means of an ArrayList? I want to be able to do something such as:

FunctionsList.Add(SomeFunction)
FunctionsList.Add(SomeSub)
For Each Function in FunctionsList
Call Function
Next

Would this be possible? It's important for a project I am working on.

View 11 Replies

Excel Maths Functions And Calls To All DLL Functions Documentation?

Jan 29, 2007

1) Is it possible to access the Excel mathematical functions without actually opening Excel?

I was thinking of through a DLL WinAPI call or maybe a delegate function or smaller program?

2) Does anyone know of a MS link or area that gives instruction on "how to" use every function of every Windows DLL at all?

Or for all those that Microsoft have chosen to document online at least.

View 1 Replies

VS 2010 - DLL - Import Functions Directly Into Application

Jan 23, 2012

I have a dll. Instead of referencing it, I would like to be able to import its functions directly into my application. Anyone have a code to get started?

View 7 Replies

VS 2010 - How To Track Duration Of Functions Calls

Feb 15, 2012

In our VB6 applications, we added a few utility functions for tracking the amount of time spent in a function. We did this to track performance bottlenecks. Basically, how it worked was there were two utility functions:
StartTickCount() and EndTickCount().

You would pass the name of the function in each, and the functions would use a dictionary to get the tick count when StartTickCount() was called, and then subtract the tick count when EndTickCount() was called. This wasn't perfect because it didn't of course take into consideration that calls to get tick count takes time, etc, but basically it worked for our purposes. How to make sure to call StartTickCount() at the beginning of each function and EndTickCount() at each exit point:

Private Function SomeFuction() as String
' indicate the function started
StartTickCount("MyClass.SomeFunction")
' some logic that causes the function to end
[Code] .....

Anyway, is there any functionality built in, either through the VS 2010 debugger or in the System.Reflection namespace, to do something similar in VB.NET? Basically, what I want is to log the number of times each function is called, the total amount to time spent in that function, the average number of seconds spent in that function, and the maximum amount of time spent in a single call in that function.

View 2 Replies

VS 2010 - Referencing Shared Functions And Subs

Feb 1, 2011

I am porting an app from VB6 and I run into problems with references to functions and subs. Basically, let's say I have 2 classes added to the project, like this.

Public Class OOOOO
Public Shared Sub BBBBBBB(ByVal FileName As String)
...
Call CCCCCC()
Call DDDDDD()
etc.
...
End Sub
[Code] .....

I had to make the BBBB() shared to be able to call it from another function AAAAAA() from another class PPPPP. However, I get error on the references in the BBBBB(), that CCCC() and DDDD() have to be made also shared (so instead of 1 error I got number of errors).
When I tried to make them shared as well, I got tens and tens of errors due to other references of both variables and functions.

View 4 Replies

VS 2010 Queries With Access Functions Not Displayed?

Jun 6, 2010

I use an access database and some queries return calculated fields resulting from
functions in the code module of the database These queries are not listed in the "Views" tab of the query designer when adding a tableadapter in the data source designer

View 2 Replies

VS 2010 Using API Functions - Understand Data Types?

Sep 29, 2010

I freely admit that I tend to avoid using API calls as much as possible I wish to use this API call

[Code]...

View 8 Replies

Way To Calculate BesselI Functions In 2010 Professional

Apr 14, 2011

Is there a way to calculate BesselI functions in VB 2010 Professional. I have calculated this in Excel but do not want to have to open Excel to do this because my clients use Excel 2000 up to Excel 2010 and the syntax is different. Plus it is slow and inelegant. [code] where CM and NTU are floating point variables.

View 2 Replies

Use The CryptProtectData And CryptUnProtectData Functions Of Crypt32.dll In A VB 2010 Application?

Dec 1, 2009

how to use the CryptProtectData and CryptUnProtectData functions of crypt32.dll in a VB 2010 application?

View 2 Replies

VS 2010 - How Does The API Functions Read / Write Process Works

Jul 18, 2010

need to know exactly how does the API functions Read/Whrite Process works. I'm so confused while working. I know that I have to work using something like sectors. But I don't know how. Can someone give me an example. I dont know hoe to do it. for an example, for you to give me. Create a basic programa with a button and a textbox the button searchs what is in the textbox in a process memory. Search the title of a program for example.

View 2 Replies

VS 2010 - Public Variables, Functions Are Not Visible In Form2

Jun 26, 2011

I've got a program that runs from one Windows form, Form1, with stuff declared all in that class: public variables, public functions, subs, etc. I decided that the form was getting cluttered, so I added one button to bring up a new form, Form2, and I put some of the buttons & check boxes for testing over there, so that Form1 can be more visually clean. Problem: when I go to put the code for the tests into the buttons on Form2, none of the public variables or subs or functions that reside in Form1 are visible in Form2. What statement/s do I need to add (and where) so that the public "stuff" that's declared in the class for Form1 is visible within Form2, please?

View 6 Replies

VS 2010 Automating Web Browser Functions (captcha Show)?

Oct 21, 2010

The program I am trying to make is to automatically create a World of Warcraft Trial account to make the proccess a little bit quicker.The first problem I am having is getting the captcha to show up in the form.(The captcha will only show up on the site if you make one account and then try to make another one)?

View 24 Replies

VS 2010 Like To Make A Module For Common Multithreading Functions?

Feb 24, 2012

I've got 4 projects all running very similar multi-threading HTTPListener stuff.I wanted to make these functions common - in some module - but I'm having a hard time getting the AddressOf the "callback" passed in.This was the code in one of the 4 projects

Private Sub StartRequests(ByVal prefixes() As String)
If Not System.Net.HttpListener.IsSupported Then
DisplayInfo( _

[code].....

View 1 Replies

Converting An Old Program From VB 5 To Run In VB 2010

Jul 20, 2011

I have been given the task of converting an old program from Vb 5 that needs to be able to run in VB2010. I have read a few forums on the subject but whatever I try doesn't work. The .bas files convert over fine and the code from the forms comes over, but the forms do not appear. Instead there is a bunch of gibberish. How can I convert this? I tried going to version 6, which the forms worked in, and then to 2010, but I couldn't get the vbp file to show up or the forms.

View 1 Replies

Converting From .NET 2003 To 2010?

Jul 6, 2010

I created a VB.NET winforms project using Visual Studio 2003, including reports done with CRystal Reports. I need to upgrade the system to the latest VB.NET using Visual Studio 2010. What kind of problems can I expect? How difficult will it be to convert the reports to Business Objects (which I believe is now th default in V Studio).

It's not a huge system about 6-8 screens and a similar number of reports using an Access 2000 Database. Most of the screens were coded directly in VB and not done with the automated processes at the time.

View 6 Replies

VS 2010 : Converting Vbscript To .net?

Sep 21, 2010

lI think I almost have this done but I get and error "'Public ReadOnly Property Right As Integer' has no parameters and its return type cannot be indexed."here is the line causing the error:

If UCase(StrKey) = ".DEFAULT" Or UCase(Right(StrKey, 8)) = "_CLASSES" Then

whole code

Const HKEY_USERS = &H80000003
Const ForAppending = 8
Const OverwriteExisting = True

[code]....

View 7 Replies

Differences Between VB Functions And Convert.To* Functions?

Feb 19, 2009

While converting types, I have found myself using both VB functions and BCL Convert.To* methods.
E.g.)

Cstr() vs. Convert.ToString()
CInt() vs. Convert.ToInt32()
CDbl() vs. Convert.ToInt64()
etc...

Are there any subtle differences that should be noted?

View 1 Replies

[2005] MembershipUser Functions - See Exactly What The Functions Are Doing?

Mar 4, 2009

Is there a way to see exactly what the functions are doing. What i mean is there a way to see the class? I know what it does, i just want to know the code.
For example the function: Membership.FindUsersByName()

View 1 Replies

Converting VBscript To VB 2010 Express?

Mar 27, 2011

I want to convert the following VBscript into Visual Basic 2010 express so I make a graphical interface for it.is script basically runs through excel workbooks in a folder and prints out worksheet 3 of each workbook.

'~~> Folder where the Excel Files are.
Const strSourcePath = "C:\test"
'~~> Path for the log File

[code]....

View 14 Replies

Error Converting Code From 6.0 To 2010

Jun 10, 2011

i was used to be vb 6.0. but now im starting with vb 2010 because 6.0 is old. but now i have a few problems with converting some things for my game that im making.

in 6.0 it was

modPlayer (module)
Public Player(1 To MAX_PLAYERS) as PlayerRec
Private Type PlayerRec
Name as string
Level as string
End Type

but this code gives in 2010 some errors; it says it should be structures right now?

Module modPlayerRec
Public Player(0 To 100) As PlayerRec
Structure PlayerRec
Public Name As String
End Structure
End Module

what should be the right code for vb 2010? this is not working what i have right now.

View 5 Replies

Visual Studio 2010 Converting?

Jul 26, 2010

I have installed visual studio 2010 ultimate version but it doesn't convert my 2008 visual basic projects so it can not open projects. What should I do to activate converting options?

View 5 Replies

VS 2010 - Converting Base36 To Decimal?

Jan 2, 2012

What code should I write to convert a Base36 to decimal?

View 6 Replies

VS 2010 Converting A Text File To XML?

Feb 28, 2012

Currently I am trying to convert a tab file to an xml but I seem to be running into some issues when trying to do the conversion.Example of the text file this I need to convert:

View 8 Replies







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