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:
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:
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?
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())?
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.
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.
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?
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.
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.
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
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.
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.
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?
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)?
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( _
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.
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.
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
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()
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
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.
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?
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: