|
If you do designer hosting like I posted in your other question, you don't have to worry about this.
|
|
|
|
|
Hi, the way I see it, you don't need different variables to dynamically create Controls,
just create one and store a reference in some collection (ArrayList, List, whatever),
then create the next.
What would you use all the names for anyway, there will not be code present to deal with
them, except for the loop that will traverse your collection of run-time generated controls.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi
How do I make controls, such as textbox movabel and the ability to resize using a mouse at runtime.
Am trying to develop a interface for the end-user, using which the user can design his own enrty interfaces.
Thanks
Sankalp
|
|
|
|
|
|
Hi
Thanks for the reply, this seems to be a csharp example, would like to know how to do this in vb.net.
I anyway do not have csharp installed so cannot even look at the code, please help
|
|
|
|
|
there are many c# to vb.net converters on the net
you can open de .cs files in notepad and convert them using these online converters
granted it's a bit of work but it should give you the opertunity to convert the project to vb.net
c#sharp to vb.net converter:
http://labs.developerfusion.co.uk/convert/csharp-to-vb.aspx[^]
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
Him
I am converting a project from VB6 to .Net platform. In some classes I having problems with global variables,it seems like they are not recognized in those classes.
for the line below
Private m_sCallData As String
I get "Statement is not valid in a namespace." error
Like in one class I started like following:
Option Explicit On
Private m_sCallData As String
Private m_cCallData As Collection
Public Property Get Item(name As String) As String
Dim equ_posn As Integer
Dim s As String
s = ""
On Error GoTo NoItem
s = m_cCallData.Item(name)
equ_posn = InStr(1, s, "=")
If equ_posn = 0 Then
Item = m_cCallData.Item(name)
Else
Item = Mid$(s, equ_posn + 1, Len(s) - equ_posn)
End If
for even " Dim s As String" I get the "Statement is not valid in a namespace" error.
Any suggestions?
Thanks
|
|
|
|
|
You need to define a class and declare your variables within that class.
Paul Marfleet
|
|
|
|
|
I want sample code in asp.net 2003 with vb.net to dynamically(randomly) changing images with a given time interval?
|
|
|
|
|
The only way you're going to get that code is if you write it. We're not going to write it for you. You should be asking a more specific question about where you're getting stuck with this in the ASP.NET forum. So far, the implied question has little to nothing to do with VB.NET or C#, or any other lanugage for that matter.
|
|
|
|
|
I want, doesn't get. Didn't your mother ever teach you this?
Paul Marfleet
|
|
|
|
|
|
Background
I am writing a Crystal Report in VS.NET 2005 that links four tables together. Needless to say the report was blank. After doing some investigating and recreating the report (adding one table at a time and testing), I found the issue. One table links to another table using two fields and one of the fields (in both tables of course) is DBnull in most cases.
Here is a note on I found on the internet
Programmers should take special care when joining tables on columns that can contain NULL values, since NULL will never match any other value (or even NULL itself), unless the join condition uses explicitly the IS NULL or IS NOT NULL predicates.
Since I am retrieving 4 tables and filling them into a dataset. Isn't .Net doing the linking.
Any suggestions?
Thank you,
Chad
|
|
|
|
|
digicd1 wrote: Since I am retrieving 4 tables and filling them into a dataset. Isn't .Net doing the linking.
No, .NET doesn't do the JOIN work for you. AFAIK, it handles key constraints only inside the DataSet using DataRelation object.
The DataSet, DataTable, and DataView classes do not support an SQL query processor, so JOINs are out of the question. Normally, you'd build your SQL query, with all related JOINs and predecates, execute the query to return a recordset, and bind the report to that set. The database handles the JOINs and returns the correct records.
|
|
|
|
|
I have to download lots of web pages simultaneously, I'm able to queue all the discovered URLs and each is going to be downloaded in a new thread but I'm only able to download 20 to 25 web pages and for the remaining ones i get the Operation has Timed Out exception. I am using the HttpWebRequest/HttpWebResponse classes to communicate with the web server.
AliAmjad (MCP)
|
|
|
|
|
You cannot download any number of web pages you want at the same time. IE usually only allows 4 downloads to be going at once. Microsoft's implementation of TCP/IP on XP SP2 also only allows a limited number of connection attempts per second to occur. Any more than, I think, 10/second and the connection attempts fail.
Why?? It's there to limit the proliferation of viruses and reduce the impact of "denial of service" attacks.
Your queue should be popping off URLs to your threads at a throttled rate to stay under these limits.
|
|
|
|
|
Is there any other way to extend this limitation or we have to go with it actually I've to download a huge number of web pages and 4 simultaneous downloads will decrease the performance of this Web Crawler I want to at least download 100 web pages at once and for this I've generated 100 Worker threads using a custom Thread Pool and to prevent the denial of service attacks I've also implemented the Politeness Policy. So, What should i do should i change the operating system or is there any other way on windows...
AliAmjad(MCP)
|
|
|
|
|
AliAmjad wrote: Is there any other way to extend this limitation
Not that I'm going to suggest.
AliAmjad wrote: I've to download a huge number of web pages and 4 simultaneous downloads will decrease the performance of this Web Crawler I want to at least download 100 web pages at once and for this I've generated 100 Worker threads using a custom Thread Pool
Run it on either XP SP1, or, preferrably, on a Server edition of Windows.
AliAmjad wrote: and to prevent the denial of service attacks
This statement tells me you don't understand what a DOS, or DDOS, attack is.
|
|
|
|
|
Dave Kreskowiak wrote: This statement tells me you don't understand what a DOS, or DDOS, attack is.
Not exactly but I was thinking of it in terms of not overloading the web server. Did I say something incorrect. But thanks I'll run this web crawler under a server edition of Windows.
AliAmjad(MCP)
|
|
|
|
|
I am new to VB . NET and have been teaching myself with suprisingly significant success, however, I still have a lot to learn.
I've attempted to look this up on my own, but I am faced with a recurring question. Is there a method in "system.net.mail" that will return the VB Application User's e-mail provider information?
The reason I ask is that all the documentation I have read seems to imply that the programmer or user has to input the SMTP Server infromation manually. I was hoping to find a solution where the user's OS/.NET will be able to return this information automatically, eliminating interaction from the user.
It appears that Microsoft Excel has incorporated this functionality. It is demonstrated when a user creates an "E-mail HyperLink". You click on the HyperLink and the users E-Mail Client Pops up populated with the e-mail address of the recipient.
Any assistance is greatly appreciated.
Thank you in advance,
JM
|
|
|
|
|
Johnny Mar wrote: I've attempted to look this up on my own, but I am faced with a recurring question. Is there a method in "system.net.mail" that will return the VB Application User's e-mail provider information?
Nope. This is because that information can be stored in different places by different email apps.
Johnny Mar wrote: The reason I ask is that all the documentation I have read seems to imply that the programmer or user has to input the SMTP Server infromation manually.
True.
Johnny Mar wrote: I was hoping to find a solution where the user's OS/.NET will be able to return this information automatically, eliminating interaction from the user.
Not exactly possible considering the number of different places any email application can store settings like that.
Johnny Mar wrote: It appears that Microsoft Excel has incorporated this functionality. It is demonstrated when a user creates an "E-mail HyperLink". You click on the HyperLink and the users E-Mail Client Pops up populated with the e-mail address of the recipient.
This is NOT because Excel uses "standard" information. All Excel has to do to accomplish this is to shell launch a URL with the recipient address: "mailto:recipient@somewhere.com" You can try it yourself by typing this in the Start/Run box (without the quotes). Excel doesn't have to know anything about the registered default email client.
|
|
|
|
|
Dear All,
I am using access 2003 databas for my vb.net project (use vb.net 2003). My initial database size is 564KB (access file size). But when I run the program access file size is increasing. If I run the program 50 times the access file size will increase up to 6MB. I applied the "Compact on Close" feature also in Access application. But if i open and close the access file manually through MS Access it will decrease again to 564KB.
My database connection opens at the program start and closes at exit the program.
Pls help me to resolve this problem
Dimuthu
|
|
|
|
|
when accessing access thru vb the db isn't 'realy' there is only a connection to it so it will not compact.
depending on what you do in you'r programme this is normal behavior since access keeps track of everything that happens and never decreases its size unasked.
opening a access db as following wil automacticly compact and repair the db and close it again
"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" C:\DossierP.mdb /repair /compact
you can put it in a shortcut or in you'r code to be done on exiting the programme or so
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
The increasing size of the database is normal for Jet (Access) databases. The option you picked only works if the database is opened in Access. It has no effect on other applications using the database file.
You can add Compact functionality to your app. There's an example on MSDN, here[^]. And a bunch of Google results for "vb.net compact database access[^]".
|
|
|
|
|
I have a form in which I have a Binding navigator, a binding Source, a DataSet and a TableAdapter, several text boxes to display data. when I change the data in the textboxes and move to the next or previous record, I want to display a msg to ask whether to save changes or not. for this I declared a boolean variable and changed its state to true when the user changes any data on the form. Now when i move records only (without making any changes to the data also), the boolean variable gets its value changed to true because of this change in record. so in which procedure i should i change the boolean variable's value so that I can track the changes on the screen by the user.
I think it should be when the binding is complete by the application, but don't know in which procedure of which control I should check it.
Any Idea, Please Help.
Sekhar
|
|
|
|