|
There really isn't much you can do. If the O/S is still starting up, which is entirely possible even though the user has a desktop showing, you have to wait for the O/S to completely start all of its services adn the same time you're waiting for it to load and start the .NET CLR with your application. You can get some benefit from NGen when you install your application on these machines, but the benefit will be small.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi
Where do I find Sub New of a form in VS2005. Since the 'Windows Generated Code' is no longer visible.
Richard
|
|
|
|
|
Yes it is, it's in a seperate class. But, I think VB.NET (hideously) generates it for you magically. I think you just need to add it manually and it will use the one you provide, but I could be wrong.
|
|
|
|
|
no it hasn't this procedure cause it dosen't need it, cause
1. the class is marked as "Partial" and not as "Public"
2. the class-procedure is called mostly from the new procedure from it's owner-class..
|
|
|
|
|
All you have to do is type Private Sub New() , and hit Enter in your code file and you'll get a new contructor pasted in for you.
The Designed generated code IS visible if you go to the Solution Explorerand click on the icon "Show All Files...". You'll get a little "plus" next to each "file". Click the plus next your form and you'll see your forms Designer generated code file and the resource file. Modifying the Designer code is NOT recommended, unless you know precisely why your doing it and the the concequences are. You can easily end up getting your code in this file rewritten for you, or removed entirely, if you don't know what you're doing.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks so much!!! Appreciated
|
|
|
|
|
Hi ALl
I am trying to convert some code from C++ to VB.NET 2005.
The data type in C++ is an "index", in Pascal it is a "record".
What is it in VB.NET?
Regards
Instamatix
|
|
|
|
|
There is NO 'index' datatype in C++.
|
|
|
|
|
Hi Christian
Thanks for that.
No wonder I was having so much trouble trying to find it.
I will have to search through the rest of the code.
It must have been setup as a user defined data type somewhere.
Regards
Instamatix
|
|
|
|
|
Hi
I want to email someone my app, and have created a standard Setup.exe from VS2005. I also included that the setup check the Framwork (Prereqisites) and includes Dotnetfx.exe (Which is 22MB). I want to include this so since I'm not sure they wil be able to update to Dot Net Framework 2 from the web. Is there a way of splitting the installation files into smaller sets of files so that I can mail them (*.cab files??)
Cheers
Richard
|
|
|
|
|
You can put all your files into a ZIP file. Then Google for "file splitter[^]" and you'll find a bunch of utilities to split the file into any size chunks you want. You'll have to send both the splitter utility, so the client can put the file back together!, and the individual file segments.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks Dave - I take it then that there is no way to create a set of install files from VS2005 (i.e. like in the old days when applications were installed from a set of stiffies (such fun...)
|
|
|
|
|
There's still a Setup and Deployment project, but only if your using the Professional version or above.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi
1) How does a try catch block function? Could you relate it in any way to the following:
If (exception occurs while doing something) then
Goto Catch
else
Contine executing
Endif
2) What is good practice with respect to the amount of code inside a Try .. Catch Block. Is it bad to have a lot of code (why?) and is is bad to call another procedure from withing a Try Catch Block
Cheers
Richard
|
|
|
|
|
Hi dear
I think u r trying to catch errors in VB inside some procedure
If it is so then use following code
Option Explicit<br />
Private Sub Form_Load()<br />
On Error GoTo catch<br />
Dim x As Integer<br />
x = "abc"<br />
Exit Sub<br />
catch:<br />
MsgBox "Caught U! Integer cant take String value"<br />
End Sub
If it isnt so ignore the reply
Bye
pitchu
|
|
|
|
|
RichardBerry wrote: 1) How does a try catch block function? Could you relate it in any way to the following:
If (exception occurs while doing something) then
Goto Catch
else
Contine executing
Endif
Well, have a you look at a Try...Catch with multiple catches and a Finaly block:
Try
... do something that might fail
Catch IOException ex
... handle the specific exception
Catch Exception ex
... handle all other .NET exceptions
Catch
... handle any other exception
Finally
... always runs
End Try
If any exception is raised in the Try block, execution immediately goes to the first Catch block where the type of the exception matches. An IOException would be handled by the Catch IOException block, but an ArgumentNullException would be handled by the Catch Exception block (as ArgumentNullException inherits from Exception ). If you are calling an external library it might throw non-.NET exceptions, they would go to the Catch block.
The Finally block is used to make sure that anything used in the Try block is closed and disposed properly. The Finally block always runs, regardless if there was an exception or not.
RichardBerry wrote: 2) What is good practice with respect to the amount of code inside a Try .. Catch Block. Is it bad to have a lot of code (why?) and is is bad to call another procedure from withing a Try Catch Block
There are two uses for Try...Catch blocks; wide and narrow. A wide block can be used to handle any exceptions from an entire application, or from a section of an application. A narrow block should be used to handle the specific exceptions that you anticipate might occur, and they should surround as little code as possible.
You can't write code to specifically handle any exception that possibly can occur, so use narrow blocks to catch the ones that you anticipate, and wide block to catch anything unexpected.
---
b { font-weight: normal; }
|
|
|
|
|
|
Hi All
Please healp me
I want to creat a automatic or in button click new folder at run time
i have using VB 6.0
Thank you!!!!!!!!
|
|
|
|
|
Hi
Suppose u wanna create folder namely wasim in c:\ directory paster this code in click event
Private Sub Command1_Click()<br />
MkDir ("c:\wasim")<br />
End Sub
Hope answer to the question
bye
pitchu
|
|
|
|
|
Hi
Cant get diffrence between chr()and chr$()in VB6
Similar is case with other flavours like
left and left$, etc
hope to get some reply soon
bye
pitchu
|
|
|
|
|
That's because there is no difference! The $ functions are identical to the non-$ versions. The $ are preserved for backwards compatibility to previous versions of VB and older BASIC language standards.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave,
My understanding of the $ sign is telling VB that you know that want a string returned. If you leave the $ sign off, VB has to evaluate what datatype it needs to convert it to when placing it in the variable(or whatever) that will hold the value. If your wrong and the variable is not type of string VB will convert it appropriately for you(if possible) but if your right it doesn't have to do an implicit conversion.
Nathan
|
|
|
|
|
Not quite. Chr returns a string, period. There is no evaluation of the return value or implicit conversions by the function There is no difference between Chr and Chr$ . The dollar sign is just a hold over form the old days of BASIC.
Wanna see? Chr docs[^]...Left docs[^]
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thnks Dave
I do have studied BBC BASIC Language and was somewhat sure that it might be used for compatibility
Once more Thnks
bye
pitchu
|
|
|
|
|
After converting VS2003 created sample to VS2005.we try to debug the application It gives the debugger error.
For example download this sample and try to run
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexcl2k2/html/odc_xlrtdvbnet.asp
This application open's an Excel.In Excel formula bar paste the following formula
=RTD("Stock.Quote", , "MSFT", "Open")
=RTD("Stock.Quote", , "MSFT", "Last")
formula will return some random value in Excel.For this sample I was able to debug and run in VS2003 but in VS2005 Iam getting debugger error.
Thanks,
Prakash
|
|
|
|