IDE :: Use The Immediate Screen To Test Code?
Feb 2, 2012In VB2010, is there a way to use the Immediate Screen to test code such as:
? InStr("AString","ring")
This was convenient in VB6 which would have printed to the screen a "4".
In VB2010, is there a way to use the Immediate Screen to test code such as:
? InStr("AString","ring")
This was convenient in VB6 which would have printed to the screen a "4".
Is there any code to test the webcam if it's on or off ?. i mean, i need a code that telling me if my webcam is on.
View 2 Replieshow to test vb code for null values. I tried this but it does not seem to work:[CODE...]
View 5 RepliesI'm struggling with unit testing in my website.So far I have the NUnit framework imported with;[code]How do I call in objects from the other class with all my code to test?If anyone could give me an example of how to test textbox validation,
View 1 Repliesso that I can sort Arrays of Structures? What I'm asking is how do I convert a String.Substring(index = 0, length = 1) to a Number that is ASCII integer 0 - 127 ASCII will this module work?
Public Function IsInteger(ByVal strValue1 As String, ByVal strValue2 As String) As Boolean
' A Sort Function
If strValue1 >= strValue2 Then
Return True
[code]....
how do I convert the string to Binary 0 - 127 ASCII code...
I have a simple unit test which tests that a validation function picks up a specific validation issue. The validation item returns a simple object with Item & Message properties. I've written a unit test for this function but this always fails even though I know the function works as expected.
<TestMethod()> Public Sub ContractNote_ValidateForManualInputTest_TradeOrderValueComparison()
'Can't get this test to work even though validation works!
Dim CN As ContractNote = New ContractNote
Dim Trade As New TradeOrder
[code].....
I've implemented IComparable on ValidationItem (I have a separate unit test which confirms this works). Am I Using CollectionAssert correctly?
I have written a program and have used it (in debug mode) multiple times to test it out sometimes adding code and/or changing it. After a while any code I wrote or new buttons or features I added to the form would not appear while debugging. I don't know what circumstances led to this.
The only solution I found was to rewrite my code from scratch, however, the problem came back after a while. I don't know what is going on and I can't move on without starting all over again.
I have an application that contains both test code and production code. The test code points to the test files on the local machine while production is located on the server. I comment out the production code when testing. To save some time I figured I would create a Global Variable integer called pTest and encase the test and production code in a Case statement so that if I set pTest=1 then the test code will run and if pTest=0 then production code will run.
[code]...
I don't understand the error, Argument not specified for parameter 'test' of 'Public Shared Function TestThis(test As String)'.
Partial Public Class Form1
Shared Sub ReceiveCallback(ByVal ar As IAsyncResult)
Form1.Invoke(TestThis, New Object(){"test"}) 'error
[code].....
BTW this issue occurs in any MS office program when the VB.Net (or even VBA) is processing information.Example: In Excel, a worksheet is displayed on the screen. I start either, a VB.Net or VBA procedure and within 30 seconds the Excel worksheet (previously displayed) blanks out. In both VB.Net and VBA,ScreenUpdating = False. My expectation is that the previously displayed screen would stay static as if I left my desk to get a cup of coffee; came back and the same ole Excel worksheet was still there?Of course, setting VBA Screen Updating = False accomplishes two goals: 1) speeds up processing and 2) saves the user from seeing unnecessary "garbage-processing" steps.Why does VBA or VB.Net ScreenUpdating = False not freeze the screen at the time of its invoking?
View 11 RepliesLOGIN SCREEN
code:
I am trying to add buttons on the form using code; i need this for a program I want to makeHow can i do this? I am new with .net guys. Sorry for my stupid questions. Will be lots of them.
View 3 RepliesI'm trying to accomplish something fairly simple in VB that I do everyday in JavaScript.I need to parse text between two strings (HTML tags mainly) that have multiple occurrences.
Sample Data:
<tag>test</tag>
<tag>test2</tag>
<tag>test3</tag>
If I wanted to grab the data in the 2nd <tag> in JavaScript I would simply do this:
var result = string.split('<tag>')[2].split('</tag>')[0];
And the only way I seem to get that to work in VB looks like this...
Dim from = string.IndexOf("<tag>")
Dim [to] = string.IndexOf("</tag>", from)
Dim result = string.Substring(from + "<tag>".Length, [to] - from - "<tag>".Length)
I have a VB.NET application with Enable application framework checked, and Splash screen set. At the same time, I need to run some code before the splash screen is loadedMyApplication_Startup seems to go later, so it's not suitable. I understand it's possible with custom splash screen, but would prefer any other way to make it without more complex customization.
View 15 RepliesI have notice that when a module is running the screen does not update properly.For example if I change a label to read "Please Wait..." The second half of the label does not display until the program is idle.Can I get the screen to update while its running.
View 2 Repliesthe code for making a tabed web browser(using tabcontrol) fullscreen
View 1 RepliesI've been looking all over the internet and can't find a decent code for an on screen keyboard, that writes letter into another application for example Microsoft word or Notepad.If someone has a code or could point in the right direction that would be awesome.
View 7 RepliesI've inherited a project in VB6.NET 2008. There is a Panel control where graphs are drawn along with titles, axes, legends etc. What is drawn on the panel is also printed WYSIWYG (on a print command, of course) The problem I have is that the code for printing is entirely separate to the code for drawing. I want to merge the two so that common code is used. I'd like to work in the same units for both, which means setting either the pixels per inch for the Graphics object for the printing (so I can work in pixels) or doing the equivalent of the opposite so I can work in inches (printed inches, not screen inches).
View 2 RepliesI put my standard About Box and Splash Screen into a code library along with a number of other stadard things I use. The about box works fine in that I can instantiate a local version and then show.
My question is how can I select the splash screen out of the dll? The drop down box on the Properties page only shows forms in this project.
In C# I can instantiate the splash screen manually before the intialization process and then hide afterword. Is there a similar way in VB?
write a code on Microsift Visual Basic 2008 that uses Screen SDK 7.1 .dll and shows you text in coordinates 10,10 to 20,20.
View 2 RepliesI want to make the GUI code listing easy to read. I want to inlarge the font. not any control; the listing of the code; not the form window layout; the code listing behind the form and modual listings.
View 2 RepliesHow do i find the cursor coordinates on the screen in VB 2005 code?
"label1.Text = e.Location.X" Only gives you the coordinates in the program window itself, i want it to be displayed in a label/textbox in relation to the whole screen.
Using visual basic 2008 express enition How do you make multiple pictureboxs center on screen the code i got from a book is this
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
PictureBox1.Left = ((Me.Width / 2) - (PictureBox1.Width))
PictureBox1.Top = ((Me.Height / 2) - (PictureBox1.Height))
PictureBox2.Left = ((Me.Width / 2) + (PictureBox2.Width))
PictureBox2.Top = ((Me.Height / 2) - (PictureBox2.Height))
[Code]...
I am using 2010 express, and when I try to use it to open a program that I had made with 2008, it will open and it will allow me to debug the program, but neither the designer nor the code will show. It is just an empty space in the middle of the screen.
View 8 RepliesI am working on a simple NES gaming reprogramming project (who doesn't try to program video games when they start out?) and am coming up with a goofy little error in my battle screen code. The Battle Screen is supposed to trigger and draw this form, but the thing redraws itself three or four times, creating an obvious and obnoxious triple-blink. Basically, the OnPaint event is still a bit of a mystery to me. Is there a way to reduce the amount of redraws so that it doesn't blink like it does?
Public Class Form1
Dim provider, dataFile, connString As String
Dim enemyTop, enemyLeft, enemyWidth, enemyHeight As Integer
[CODE]...
[code]...
and from VB6 project I reference to Test.dll but an error messege was appear A reference to Test.dll file could not be added (If I create VB NET project and reference to file Test.dll it OK )
Is it possible to create a code that when a button is clicked it Print Screens part of the form (For example, location 3,4 to location 30,40) and then saves the image?
View 3 RepliesIt seems when I change some code while working with practice files I get green veritcal lines in the left margin of the code page I am writing. What does it mean?
View 1 RepliesI need the code for saving the link your on while browsing, and a code for a button, so when you click on it it shows the html code of the website in notepad or something (source code).I also need a code for Full Screen.
View 1 RepliesI need to execute some code after the form is loaded and shown on the screen, how can I do that?
View 2 Replies