VS 2010 Finding OLD Basic Function In .net?

Jul 16, 2011

in the old days i could so something like

GWBasic
10 A$="ReallyLongStringInSmallSpace": B$="tiny"
20 PRINT USING" ASDFASDFASDF ASDFASDF"; A$; B$

Output:

"Re ASDFASDFASDF tiny ASDFASDF"

it would automatically truncate large strings to fit in a small assigned space, and it would use empty spaces for strings too short. it made it VERY easy to print fixed front text tables in aligned columns by automatically truncating long lines and expanding using spaces (chr 32) where needed.i've already looked at .Format but it seems just for dates, times, currencies, and various byte/hex formats.

View 3 Replies


ADVERTISEMENT

Finding Basic Shared Function?

May 31, 2009

i am beginner about general programming. Please give me basic shared functions .

I only know few functions such as : Public Shared Function lon(ByVal a As Integer, ByVal c As Integer) As String Public Shared Sub trung()

View 1 Replies

C# - Function Or Interface Marked As Restricted Or The Function Uses An Automation Type Not Supported In Visual Basic?

Oct 19, 2010

What does this error mean in VB6? Function or interface marked as restricted, or the function uses an Automation type not supported in Visual Basic.

I keep getting it when i call a particular method of a dll that comes with windows xp and beyond (in system32 called upnp.dll)

View 2 Replies

Sleep Function Visual Basic?

May 31, 2011

Is there a simple sleep function in Visual Basic that doens't involve thread.

Something similiar like there exists in: C: sleep(1);

We also tried this code:Declare Sub Sleep Lib "kernel32" (ByVal milliseconds As Long)' pause for 5 seconds
Sleep 5000 but it didn't work. It gave me this error: PInvokeStackImbalance was detected

[Code]...

View 1 Replies

Get The Vb Random Function - Basic Winapp Application

May 13, 2010

I must say I don't get the vb Random function. Try making a basic winapp application, but a button named Button1 and a few (around 10) labels on the form. Then add the following to the forms codebehind:

Code:
Public Class Form1

Public Function RollDize(ByVal iDize As Integer) As Integer

Dim iRes As Integer

[CODE]...

Now, if you click the button, you will see that all the labels get the same number. However, if you step through the code in debug, the numbers are random.

View 6 Replies

Setup USB Function At Visual Basic 2008?

Mar 8, 2010

i want to create a GUI which content a button and when the button is clicked, a signal B'0000 0001' send out through USB port.

my pc already can detect my hardware through USB port.

So, i just want to know how visual basic 2008 setup USB port function.

View 1 Replies

Transferring A Matlab Function To Visual Basic?

May 10, 2012

I am trying to transfer a very complicated Matlab function into visual basic. It takes a matrix input and gives 4 outputs.

From my own research I found something called Matlab CODER, which can transfer matlab code into C/C++ code, however, this function is too complex for that. So I guess now my question is, it is possible to call my matlab function somehow within VB and store the outputs for use within my VB program?

The matlab function looks something like this:

function [f,x,s,c,l] = mytest(Y,varargin)
%Code here...
end % function

View 2 Replies

Use Point In Polygon Function In Visual Basic

May 18, 2009

I'm working on a small freeware application in Visual Studio 2008 Standard that will match geographic data to a geographic position. For this I need some mathemathical functions and one of them is how to detect if a point is inside a polygon. There's a great solution for this from the Microsoft team at: [URL]

but it is in a different programming language that I do not know anything about. How can I use these functions in my program? I'm afraid that if I try to rewrite them in Visual Basic I'll make mistakes that I can't detect. To be complete, I'm not using screen graphics so I really need a mathemathical solution.

View 4 Replies

Why Won't This Function Work For My Program. (Visual Basic)

Feb 24, 2011

I'm doing a baseball program for a class project. And I almost have it complete, but it's giving me a syntax error. I can't figure out what i'm doing wrong. I'm using two functions to return a value for different type of baseball tickets to the button that calculates them. Here are the instructions 1.)User selects whether to purchase season tickets or single-game tickets 2.) User enters the number of tickets needed and the type of seats based on whether they selected season single-game tickets.3.) User clicks the Compute Ticket Cost Button to display final cost4.) User clicks the Clear Form button to clear the responseI just can't figure out what I did wrong. I know it's something stupid that i'm doing.the errors are happening inside the btnCompute sub routine. with syntax erros on SingleGameCost() and SeasonalCost() line 114 and 118

Public Class Form1
'Global Variables
Dim intTicketChoice As Integer

[code]...

View 2 Replies

VS 2010 : Convert A DLL Function Call Which Has The Callback Function Routine Called Within The DLL Function Call?

May 25, 2012

I am trying to convert a DLL function call which has the Callback function routine called within the DLL function call.The DLL function call signature is like this:

typedef void *HANDLE;
typedef HANDLE HACQDESC;
DECLARE_HANDLE (HWND);

[code]....

how to convert this DLL call to VB.NET and also how to create the callback function and send it as parameter to this function
call.

View 15 Replies

Describe Keyboard Hit Event In Visual Basic [Escape_key_was_pressed] Function?

Oct 25, 2010

Maybe my questin was too impossible to unerstand, so I figured out how to ask it in more simple way. I suppose it can be best done in Visual Basic simplified code.

[Code]...

So question is how to describe in Visual Basic [Escape_key_was_pressed] function? When user don't hit Escape key, then program must NOT STOP for asking user keypress[Escape_key_press], it must go on with clicking on desktop to the end of program. SteelAce

View 2 Replies

VS 2010 Visual Basic 2010 And Crystal Reports 2010?

Oct 2, 2010

When trying to import CrystalDecisions.CrystalReports.Engine, and CrystalDecisions.Shared. I'm getting a green line. What might be the problem?

View 3 Replies

Function Call For Multiple Textboxes Using Visual Basic Studio 2008

Feb 17, 2010

I am working to make a function that will update the back color of a text box based on multiple variables values. I can write the code to do the calculation, but I am not sure how to make the function realize which text box to update (as I will have about 30 different boxes). Below is the code that I have for each box so far, but I will have quite a few more, and would rather use a function to reduce the amount of code, and also make it cleaner as well.

If sngPreviousPrimaryPropertyTotal >= sngPrimaryPropertyTotalCost Then
txtPreviousPrimaryPropertyTotal.BackColor = ColorProgramLightGreen
Else
txtPreviousPrimaryPropertyTotal.BackColor = ColorProgramLightRed
End If
[Code] .....

Or is there a way that I can tell the function that it's updating the text box that call the function in the first place? Say if txtBox1 has updated text and calls the function, then the function 'knows' to update txtBox1, but will update txtBox2 when it's called by txtBox2.

View 3 Replies

Sql Server - Call A Table Valued Function From Visual Basic.Net And How To Store The Result?

Nov 4, 2011

In my VB.net code i have:

cmd.CommandText = "SELECT * FROM [strfg].[dbo].[Myfunc] (@MyParam)"
Dim myparam As New SqlParameter("@MyParam", a)
cmd.Parameters.Add(myparam)

The function (runnig on SQL server) returns a table with four columns, one row.How do I call this function from Visual Basic? cmd.ExecuteScalar() is obviously not correct. In c++ I use a recordset. What is the equivalent in vb? Does anyone have a short example?

View 2 Replies

VS 2010 - Finding Tutorials For The HtmlAgilityPack?

Sep 6, 2010

Im having a hard time finding tutorials for the HtmlAgilityPack, all of them are for c#, so im having to use c# code and convert it to vb.Here is the my code, im still getting errors with the 3rd line:[code].......

View 4 Replies

VS 2010 : Finding And Storing A String?

Jan 8, 2010

I'm obtaining data from a StreamReader.My StreamReader is called "reader" and I'm reading the stream with "responseOutput" like this "responseOutput = reader.ReadToEnd()" And in that bunch of text that I receive I want to FIND and EXTRACT a piece of text and then STORE that extraction in a variable of String type.Here is part of the code I'm referring to:

Dim response = request.GetResponse
Dim responseOutput As String
Dim reader As StreamReader
reader = New StreamReader(response.GetResponseStream())
responseOutput = reader.ReadToEnd()

And here is the text or data that I'm receiving (what I'm about to show you is the result of a "MessageBox.Show(responseOutput)":

<TweetPhotoResponse xmlns="http://tweetphotoapi.com" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Large>http://cdn.cloudfiles.mosso.com/c54092/x2_7e143b</Large><MediaId>7e143b</MediaId><MediaUrl>http://tweetphoto.com/8262715</MediaUrl><Medium>http://cdn.cloudfiles.mosso.com/c54102/x2_7e143b</Medium><Original>http://cdn.cloudfiles.mosso.com/c61132/x2_7e143b</Original><PhotoId>8262715</PhotoId><SessionKeyResponse/><Status>OK</Status><Thumbnail>http://cdn.cloudfiles.mosso.com/c54112/x2_7e143b</Thumbnail><UserId>2268670</UserId></TweetPhotoResponse>

And all I want to do, is to extract a specific part of that text, which is the "PhotoId" value (I highlighted it in red), in this case the value is "8262715", and then store it in a variable (I know how to do that I just need the value).The text or data I'm receiving changes only the PhotoId everytime it's requested.

View 3 Replies

VS 2010 Finding A Line Of String?

Sep 18, 2010

I loaded a text file to a text box, and I want the program to find a certain line containing only the strings I specify. But the text file will likely contain many of them, so I want it to pause scanning at the first line I'm looking for until I tell it to continue, then the second line, and so on. So the questions are:

1. What's the method for finding the exact line I want in a text file?

2. How do you start, pause, and resume scanning a text file line by line?

View 5 Replies

VS 2010 Finding An Image's Coordinates

Dec 5, 2011

I have 2 images. One image is a large image and the second one is a small one. The small image has a copy of itself within the large image. I am wanting to find the coordinates of where the second image is located within the large image, a 'find feature' in other words. e.g, I might have an image with the word "Test" in it. And I want to find the coordinates of the letter 'e'...

View 8 Replies

VS 2010 Finding Built-In Classes?

Feb 24, 2011

What are the best ways you guys recommend to search the MSDN Code Library. I know there have been several instances in searching for ways to do something, doing a long workaround, and finding out later that there was a built in class that handled the problem that I was working on much simpler.

So what are some of the ways you guys use to find tools, classes, etc. when coding. Or are you just that awesome already.This is kindve just a general tips and tricks question. Sorry if Im in the wrong forum mods.

View 2 Replies

VS 2010 Finding Darkest Pixel?

Aug 16, 2010

I am downloading a JPEG image from a site and then I need to find the darkest pixel of that image. It also needs to be very fast since speed DOES count here, majorly. (probably has to use an API)

View 4 Replies

VS 2010 Finding Text In An Image?

Oct 25, 2011

I have a form, that when opened, displays the image from the webcam onto it.

It's a test, to ensure the webcam is working. A prompt appears that asks if the webcam is working. However, some testers are lying and I need to find a method to make sure they can't lie.

My team wants to use a large bar code that the tester has to hold in front of the camera.

So I need to figure out how to either read the bar code, or just read the text in the bar code, which reads, "* C A M *."

It looks like the image below, but much larger.

Does anyone know where I should begin? I was thinking about using GetPixel, but I'm not sure I could or if that would be reliable enough.

View 1 Replies

VS 2010 Finding Text Within WebBrowser?

Feb 2, 2012

I am loading a webpage within WebBrowser1 and trying to check the page for text. I just want it to find whether or not the text on the page says "No jobs are available at this time." and if those words are not found then I am going to have the program alert me. When I run this code..

[Code]...

View 21 Replies

VS 2010 Finding WebBrowser On The Selected Tab?

Jul 18, 2010

I need to have the webbrowser on the selected tab dimmed, so like Dim foundbrowser = TabControl1.SelectedTab.Controls.Find("WebBrowser", False)i know thats totally wrong but its just to show you what i kind of need, how do i do this? The only control on the selected tab is a webbrowser if that helps?

View 2 Replies

VS 2010 Basic Timer Animation - Error Check And Colour Scheme VB Express 2010

Mar 26, 2012

this is my very first posting and I must say I am desperate. I have a VB assignment due in 2 days and I am so lost. I have written a code to draw some graphic, just a basic house, tree, sun etc. I have also written a code to magnify said graphics which were all the specifications of my Assignment 1 part A. Now for Part B I am being asked to extend my program so that: A - My graphic can be drawn using different colour schemes designed by me but chosen by the user B - My graphic or an appropriate part of it can be animated around the picture box if the user chooses to do so. C - Error checking is included.

[Code]....

View 2 Replies

Finding Common Dialog Control In VS 2010?

Sep 1, 2011

I am working on a MSDN project from 2007 it calls for a Common Dialog Control but I can not find it. Has this been deprecated and/or is there something to replace it? If not how can I access this in VS 2010 for a VB project?

View 16 Replies

VS 2010 Coded UI Test Not Finding Window

Nov 10, 2010

I couldn't get the SO text editor to mark parts of the post correctly so if you can trick SO into properly formatting the exception text and the code

[Code]...

View 1 Replies

VS 2010 Finding Row Position Of A Data Table?

Feb 27, 2011

how to find the row position/index in a data table, using a value from another table. For example, I use the row position from Linkingtable1 to get my value for CustomerID, but i want to use the CustomerID to search the CustomerTable for its row position, in order to show the Customers Name in a text box, As currently when loading the textbox shows the customerID. I understand the code to get the names from the rows in the datatable, its just finding the row position of the customerID.

View 9 Replies

VS 2010 Finding Specific Text From Textfiles

May 27, 2012

I have an assignment due tomorrow, and I thought I had it all figured out but there is one question I don't know how to program. The assignment consists of a form with textboxes in which the user types info about a book (author, title, genre, etc.), which he can save to a textfile by clicking the save button. (At the moment it's not saving it to a textfile but just a 'file', which can be opened with notepad but is of no specific datatype, not sure how I do that, but is less important). There is also a button with which the user can display information from a different, earlier created textfile.[code]

View 1 Replies

VS 2010 - Calling A Function - BackOrdered Function Of Program

Mar 30, 2012

I am having a problem with the BackOrdered Function of my program. I can`t get it to say anything but 0 when I run the program. Another problem I am having is the input box pops up like 6 times and it`s only suppose to once. [Code]

View 9 Replies

VS 2010 Funniest Things Create In Visual Basic 2010?

Nov 6, 2011

Dont be afraid to spam the thread with things you can create.The more the better!

View 2 Replies







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