Error Functions Differently From Vb6

Oct 4, 2010

I've been working on learning VB.Net from VB6 and for some reason when I use On Error Goto handlers, or On Error Resume Next the program still procs an exception and ask to continue or close.I don't really understand what I am missing, everything I've read said it's the same as VB6 with a few extra options.

View 9 Replies


ADVERTISEMENT

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

String Functions Error With MSScriptControl Script?

May 1, 2009

I figured out my more recent issue, which took me 2 days all because my string functions are giving errors in VBScript using MSScriptControl, but any function that returns another datatype value is returning correctly.

[Code]...

View 3 Replies

Web Browser - Codes And Other Functions - Some Error In Project ?

Oct 2, 2011

I want to have my own web browser. instructions and code for this project. i try to make but there's some error in my project. codes and other functions?

View 5 Replies

Mouse Control Functions / Crashes With A PInvokeStackImbalance Error

Oct 5, 2011

he Just trying to figure out some mouse Control Functions, I got it sort of working.the program run's, and does what it's meant to do, but then it crashes with a PInvokeStackImbalance error. [code] I just shortened the Code because there were a lot of Sub's that were not part of the problem, now it's easier to read.and If you haven't seen my other post it's NET version 4.0 in VS 2010

View 3 Replies

VS 2008 - HTTPrequest Error: Cookie Functions Seem To Be Disabled

Sep 28, 2009

I use visual basic .net express edition 2008. I figured out how to do httprequests and how to login using them. [Code] But I get this error on the site: "Cookie functions seem to be disabled. Please change your browser settings!" How can I set a cookie container so I can login onto the site? I tried a lot of things, such as cookiecontainer.

View 2 Replies

Images Display Differently On Other PC's?

Jun 8, 2011

When I view images on my development PC they look fine, but when I view them on other PC's, the images are sized differently and often get cut off. I've tested this on multiple PC's and the images always get cut off.I've attached the images from my PC and another PC to this post, the image that is cut off if from a Windows XP PC.I'm using VS 2010 on Windows 7 64-bit.

View 7 Replies

.net - Control ID Rendering Differently Between Environments?

Jul 4, 2009

I have a web application that works in our stage/test environment fine but once we moved it to our production environment something weird happens. All the control ids change. a label went from ctl00_cphMainContent_lblPetName to _ctl0_cphMainContent_lblPetName. Why would this happen? What could cause something like this to happen. The only two differences I know of are the production environment has HTTPS and I've disabled debugging.

View 3 Replies

.net - PDF Controls Render Text Differently?

Apr 5, 2011

I'm working on a website that creates pdfs dynamically.I've been playing around with two different pdf controls- wpcubed and abcpdf, and was surprised to see that they both appear to render text differently.

wpCubed:
abcpdf:

They are both using arial 25pt bold, so I was expecting them to look identical. Can anyone explain why they don't. Here are the full files: wpCubed , abcpdf

View 1 Replies

C++ - Why Do C# And VB.NET Implicitly Marshal Char* Differently

May 22, 2010

What is the most timers you have used in an application? I think the most I have ever used is 2.In another forum this question was asked. "I have a Timer ... I have a situation where I want to run the code in the Tick event ONLY ONCE not on the interval i have the timer set too."

I responded with Timer1_Tick(New Object, New System.EventArgs) Which led to this "The 'sender' object is VERY important when you have more than one Timer being handled by the Tick event procedure. This is because in a multi-timer tick event procedure, the only way your program knows which timer just fired is by querying the 'sender' object.When you use code like this you are putting nothing into the 'sender' object, so that if you were ever going to query it a 'kaboom' is going to happen.""...this 9 timer Tick event handler job done. Remember, all that is required is the correct timer name gets put into the ListBox." "The need for multi-timers to be handled by a single Tick event handler happens all the time. How would a real life programmer handle this? "Oh, to test the "kaboom" theory I wrote this and ran it overnight successfully:

[code]...

View 33 Replies

GetHostEntry Works Differently In Win 7 And Winxp?

Sep 4, 2011

msgbox(System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName()).AddressList(0).ToString())

is showing Ip address in Win XP but in Windows 7 it is not showing.

View 7 Replies

Why Do The Division (/) Operators Behave Differently In .NET And C#

Dec 23, 2009

If you create new projects in C# and VB.NET, then go directly in the Immediate Window and type this:

? 567 / 1000

C# will return 0, while VB.NET will return 0.567.To get the same result in C#, you need to type

? 567 / 1000.0

Why is there this difference? Why does C# require the explicit decimal point after 1000?

View 5 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

Com Interop - Equal Strings Sometimes Behave Differently?

Dec 30, 2009

Example:

Dim Sh32 As Object = CreateObject("Shell.Application")
Dim path As String = "C: empcatalog.zip"
Dim sf As Object = Sh32.NameSpace(path)

-> does not work, sf = Nothing

Dim Sh32 As Object = CreateObject("Shell.Application")
Dim path As String = "C: empcatalog.zip"
Dim sf As Object = Sh32.NameSpace(path.ToString)

Clearly path = path.ToString, but they behave differently when used as COM parameters.

View 1 Replies

DataGridView - Formatting One Column Differently On Form

Feb 25, 2011

I have a datagridview I am displaying on a form and would like to format one of the columns differently then the available formats. I have a column that is a decimal(18,2) (in the table) named "MyDecimalField". In asp.net I could do this, in the "template field" of a datagrid.
math.round(MyDecimalField / 60 , 2)

In VB.net forms I cant figure out how to do that. Basically I need to divide the cell by 60 and round that to 2 decimal places.
IE
the Cell contains this: 1283.93
I want the user to see this: 21.40
1283.93 / 60 = 21.3988333 then round it to 21.40

View 1 Replies

Filling DataGridView Goes Differently On Subsequent Runs?

Jan 3, 2011

I have written some code in a form which is shown via ShowDialog from a different form. This code fills a DataGridView with data from two tables in a dataset, one through data binding, and one through more manual means. The latter part runs, or more accurately, fails to run in the same way if I call this form in the same way subsequently but without stopping debugging.

View 2 Replies

Printform Print Differently On Different Screen Sizes?

Jul 22, 2009

I am creating a program that I would like to distribute. I am using printform in VB 2008 to print my form. My form is the size of my computer screen...15 in. If the program is run on a different computer with a different screen size, will it affect the appearance of the form on the screen or the printing of the form? If the form is run on a laptop, for example, with a smaller screen, will it cut off my form and thus cut off the form during printing? Will a bigger screen increase the size of the form and not allow it to fit correctly when printed? I was just curious and wondering.

View 6 Replies

VS 2010 Webbrowser Returns Page Differently Than IE Alone?

Apr 3, 2011

When I use IE8, it displays the page fine, but when I use the web browser control in VS 2010, it shows the page differently (in a bad way).

View 12 Replies

Process.Start Acts Differently With Windows XP Or Vista?

Aug 12, 2009

I have a small VB. app in VS2008 that opens a windows folder in maximized view.I am using the following code:

Dim startInfo As New ProcessStartInfo("explorer.exe")
startInfo.WindowStyle = ProcessWindowStyle.Maximized
startInfo.Arguments = "C:\Program Files\123 Systems\ExcelFolders\TechTimeSheet"
Process.Start(startInfo)

When using my app with windows xp it works well. It opens a single folder as if going through the "my computer" to open it. Attached is a screen shot "folder" to show the desired way.However when using the same code with Vista it opens my folder as if I right clicked on the start menu and selected "explore", also a screen shot named "explore" is attached showing what I do NOT want. What should I change to get both vista and XP to work the same, that is opening a single folder.

View 1 Replies

Random Numbers Behave Differently In Debugging Mode?

Oct 15, 2011

I use some random number generators in a piece of VB.net code to simulate Gene reproduction. It works as followed:

- I generate a male chromosome that contains 46 random chromosomes which I put in the Arraylist: MaleChromosomes.

- I generate a female chromosome that contains 46 random chromosomes which I put in the Arraylist: FemaleChromosomes.

- Then I have a piece of code that randomly picks 23 chromosomes from the female arraylist and randomly picks 23 chromosomes from the male chromosomes ( Very simple simulation of reproduction ) and put these in the arraylist: Child

- I repeat this for the second child ( Arraylist: Child2.)

- Now I have piece of code that compares these arraylist to see how many chromosomes the two children share.

View 1 Replies

Shell Command Launches An App Differently Than Running The Executable

Sep 1, 2009

I have a legacy vb6 application that uses a shell command to launch a newer .net application. It's a very simple command, just launches an app. Here's the problem. When I run the .net app through the shell command, it tries to connect to a database that is not referenced in it. If I double-click the .net executable, it runs just fine and connects the way it is supposed to. Normal, no problems. Only when I run it from the shell command do I have problems. I have checked everything I can think of and simply can not come up with a reason why the app would behave differently when launched from a shell command.

View 3 Replies

Carriage Return Behaves Differently In RichTextbox - LineFeed VS 2008

Jul 8, 2009

I have project that communicates with an embedded device via Telnet and displays the data string in a RichTextbox. Here is the (weird) problem: every time I send a command, the device responds, at the end of the response there is a prompt on a NEW LINE. However, when I ASCII encode the bytes received and display the string, the prompt is on the same line as the response in the text box. So I looked at the bytes for several different commands and the response always starts with a 13,10,13 which is CR, LF, CR, that puts the response on a new line, also displayed on a new line in the text box.

However, at the end of the response, there is always a 13,13,10 (CR,CR,LF) followed by the prompt, but in the text box the prompt is NOT on a new line it is merely a couple of spaces after the response. The funny thing is that this behavior is absolutely not present in Hyper Terminal, or Tera Term applications, when I connect to the device using Tera Term, the prompt is always on a new line. Even the VS IDE shows this correctly in the Output window, every prompt is on a new line. I can not for the life of me figure out why this behaves differently in my RichTextbox. I have experimented with different settings for the textbox, but so far nothing worked.

View 7 Replies

.net - Label Control Behaves Differently At Design Time Versus Runtime?

Jul 8, 2009

I am creating a custom Label control (by simply Inheriting the standard Label control and re-painting the background and text) because I need a very specific background and border. In the constructor of the control, I set the AutoSize property to false so I can have a standard default size for the new label.

Public Sub New()
/*Set the default size of the control to 75x24*/
Me.Height = 24

[code]....

In my application that uses this control, if I create the new custom label at run time (in code), the AutoSize property stays False, and it works properly.If I try to add the new custom label to my form at design time, it comes in with the AutoSize property set to True, and I have to manually set it to False in the properties window. It's not a huge problem, but I don't understand why the behavior is different.

View 4 Replies

DataGridView's RowValidating Event Fires Differently When Closing A Modal Vs NonModal Form

Mar 24, 2011

Based on our tests primarily done in VB.NET in VS2010 it seems that when you close a WinForm the "RowValidating" event of the DataGridView on that form behaves differently depending on whether the form is MODAL or NON-MODAL. What we did was open the form (MODAL and NONMODAL) and changed a value of a cell and then immediately clicked the "X" to close the form. It looks like the "RowValidating" event DOESN'T fire if the grid is on a MODAL form but it DOES fire when the grid is on a NON-MODAL form. We can't figure out why that is... Is this a known bug in .NET?

[Code]...

View 3 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

Vb6 Declaring Functions - Error - "optional Parameters Must Specify A Default Value"

Oct 19, 2011

I just got upgraded from VB6.0 to VB2010. I'm trying to move some of my program functions over and I'm getting an error on the ones where I use optional... Public Function GetFolder(ByRef FTT As String, Optional InitFile As String)

I get the error at the end of the line, after the close par...the error is "optional parameters must specify a default value".

View 3 Replies

Create Functions In Functions

Jul 1, 2011

I'm redoing a program for my company and my boss wanted me to created the entire thing through functions...

For the task I wanted to know is it possible to have functions within functions?
Sort of like in C where we would have nested structures?

Its a FILE I/O, with robot commands, moves and verifications....

So I would find the line in an excel spreadsheet where it moves, the coordinate, put it into an array.

Take the actual results store them into a two dimensional array...etc, etc....

Another function would eventually compare the results with the moves, and within a tolerance.

View 9 Replies

.Net Software Behaves Differently From Machine To Machine?

Dec 21, 2010

I've inherited a lot of custom made software for an office, and, while managing it, I've found it performs differently from machine to machine.I mean, some controls get painted in weird ways in some machines but well in another, or just work differently, like in some machines clicking something selects it, and in the next machine clicking the same thing makes it editable.I suspect, o course, of the myriad of DLL the software loads

View 2 Replies

DIM A Variable In A Loop - How To Name Each New Variable Differently

Sep 7, 2011

here is some simple code:

0: dim varA = 0
thread.sleep(1000)
GoTo 0

I was wondering how do I name each new variable a different name each time through the loop (i.e. varA1, varA2, varA3)

View 8 Replies







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