From Gustav at cactus.dk Wed Jul 2 10:54:58 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 02 Jul 2008 17:54:58 +0200 Subject: [dba-VB] C#: this.prefix Message-ID: Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav From wdhindman at dejpolsystems.com Wed Jul 2 11:12:45 2008 From: wdhindman at dejpolsystems.com (William Hindman) Date: Wed, 2 Jul 2008 12:12:45 -0400 Subject: [dba-VB] VB.Net 2005 copy a form References: Message-ID: <572DA58D1F8F4E1E865FA20E43C52CAA@jislaptopdev> Gustav ...I never "copy" a form outright ...I found it cited as a bad practice on a "best practices" list when I first got into vs5 ...it supposedly led to all kinds of problems down the line ...my practice is to first create a new form in VS and then to copy the contents of the original to the new leaving what vs created alone ...I've not had any problems with this (knock on wood) and its "almost" as easy as copying and renaming a form. ...I assumed ms would have fixed such an obvious problem in vs8 but then I've been assuming such in Access since A97 days ...and what do I have to show for such faith? ...a ribbon! :( William "My friends, we live in the greatest country in the world. Please join with me as we try to change it." Obama -------------------------------------------------- From: "Gustav Brock" Sent: Wednesday, June 25, 2008 3:34 AM To: Subject: Re: [dba-VB] VB.Net 2005 copy a form > Hi William > > I have done so. Same issue. Or am I missing something? > > /gustav > >>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > ...upgrade to vs2008 :) > > William > "Sen. McCain will bring a lifetime of experience to the campaign... Sen. > Obama will bring a speech that he gave." Hillary Clinton > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Tuesday, June 24, 2008 12:09 PM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi John >> >> You can copy and paste the .cs file in the Solution Explorer pane. The >> copy will be renamed and you can rename that to what you want. >> >> However, if you in the Properties pane later rename the copy of form to >> the new name, I've found that the refactoring mechanics will rename >> references to your form not only in the .Designer.cs file (correct) but >> also in the original .Designer.cs file (really nasty)! What do others do? >> >> /gustav >> >>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >> Hi All >> >> How do you copy a Form in VB.Net 2005? I have a form with 100+ >> controls. >> I need a very similar form and It seems a real drag to type that lot >> again. >> Any sugesstions? >> >> TIA >> >> johnc > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From Gustav at cactus.dk Wed Jul 2 11:30:42 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 02 Jul 2008 18:30:42 +0200 Subject: [dba-VB] VB.Net 2005 copy a form Message-ID: Hi William That brings some relief - I thought I was missing something obvious. I'll try your method next time. /gustav >>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> Gustav ...I never "copy" a form outright ...I found it cited as a bad practice on a "best practices" list when I first got into vs5 ...it supposedly led to all kinds of problems down the line ...my practice is to first create a new form in VS and then to copy the contents of the original to the new leaving what vs created alone ...I've not had any problems with this (knock on wood) and its "almost" as easy as copying and renaming a form. ...I assumed ms would have fixed such an obvious problem in vs8 but then I've been assuming such in Access since A97 days ...and what do I have to show for such faith? ...a ribbon! :( William "My friends, we live in the greatest country in the world. Please join with me as we try to change it." Obama -------------------------------------------------- From: "Gustav Brock" Sent: Wednesday, June 25, 2008 3:34 AM To: Subject: Re: [dba-VB] VB.Net 2005 copy a form > Hi William > > I have done so. Same issue. Or am I missing something? > > /gustav > >>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > ...upgrade to vs2008 :) > > William > "Sen. McCain will bring a lifetime of experience to the campaign... Sen. > Obama will bring a speech that he gave." Hillary Clinton > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Tuesday, June 24, 2008 12:09 PM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi John >> >> You can copy and paste the .cs file in the Solution Explorer pane. The >> copy will be renamed and you can rename that to what you want. >> >> However, if you in the Properties pane later rename the copy of form to >> the new name, I've found that the refactoring mechanics will rename >> references to your form not only in the .Designer.cs file (correct) but >> also in the original .Designer.cs file (really nasty)! What do others do? >> >> /gustav >> >>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >> Hi All >> >> How do you copy a Form in VB.Net 2005? I have a form with 100+ controls. >> I need a very similar form and It seems a real drag to type that lot again. >> Any sugesstions? >> >> TIA >> >> johnc From shamil at smsconsulting.spb.ru Wed Jul 2 11:57:06 2008 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 2 Jul 2008 20:57:06 +0400 Subject: [dba-VB] C#: this.prefix In-Reply-To: Message-ID: <09f701c8dc64$a87fb080$6401a8c0@nant> Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From davidmcafee at gmail.com Wed Jul 2 12:00:23 2008 From: davidmcafee at gmail.com (David McAfee) Date: Wed, 2 Jul 2008 10:00:23 -0700 Subject: [dba-VB] C#: this.prefix In-Reply-To: References: Message-ID: <8786a4c00807021000g7dfa4d50l79887245b8f41e37@mail.gmail.com> Same here, I use it out of (an old) habit from "Me." in VBA, on forms. On Wed, Jul 2, 2008 at 8:54 AM, Gustav Brock wrote: > Hi all > > How rigorously are you prefixing controls and variables with "this."? > > Is it a good or bad coding practice to use it when not strictly needed? > Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? > > I've found, that I use it a lot - old habit from "Me." in VBA, I guess. > > /gustav > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From wdhindman at dejpolsystems.com Wed Jul 2 15:46:51 2008 From: wdhindman at dejpolsystems.com (William Hindman) Date: Wed, 2 Jul 2008 16:46:51 -0400 Subject: [dba-VB] VB.Net 2005 copy a form References: Message-ID: <11A2F20AE0B143519C50E0A3E043028F@jislaptopdev> ...damn ...sorry about the sig :( William -------------------------------------------------- From: "Gustav Brock" Sent: Wednesday, July 02, 2008 12:30 PM To: Subject: Re: [dba-VB] VB.Net 2005 copy a form > Hi William > > That brings some relief - I thought I was missing something obvious. > > I'll try your method next time. > > /gustav > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > Gustav > > ...I never "copy" a form outright ...I found it cited as a bad practice on > a > "best practices" list when I first got into vs5 ...it supposedly led to > all > kinds of problems down the line ...my practice is to first create a new > form > in VS and then to copy the contents of the original to the new leaving > what > vs created alone ...I've not had any problems with this (knock on wood) > and > its "almost" as easy as copying and renaming a form. > > ...I assumed ms would have fixed such an obvious problem in vs8 but then > I've been assuming such in Access since A97 days ...and what do I have to > show for such faith? ...a ribbon! :( > > William > "My friends, we live in the greatest country in the world. Please join > with > me as we try to change it." Obama > > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Wednesday, June 25, 2008 3:34 AM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi William >> >> I have done so. Same issue. Or am I missing something? >> >> /gustav >> >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> >> ...upgrade to vs2008 :) >> >> William >> "Sen. McCain will bring a lifetime of experience to the campaign... Sen. >> Obama will bring a speech that he gave." Hillary Clinton >> >> -------------------------------------------------- >> From: "Gustav Brock" >> Sent: Tuesday, June 24, 2008 12:09 PM >> To: >> Subject: Re: [dba-VB] VB.Net 2005 copy a form >> >>> Hi John >>> >>> You can copy and paste the .cs file in the Solution Explorer pane. The >>> copy will be renamed and you can rename that to what you want. >>> >>> However, if you in the Properties pane later rename the copy of form to >>> the new name, I've found that the refactoring mechanics will rename >>> references to your form not only in the .Designer.cs file (correct) but >>> also in the original .Designer.cs file (really nasty)! What do others >>> do? >>> >>> /gustav >>> >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >>> Hi All >>> >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ >>> controls. >>> I need a very similar form and It seems a real drag to type that lot >>> again. >>> Any sugesstions? >>> >>> TIA >>> >>> johnc > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From cfoust at infostatsystems.com Wed Jul 2 18:34:39 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 2 Jul 2008 16:34:39 -0700 Subject: [dba-VB] VB.Net 2005 copy a form In-Reply-To: References: Message-ID: If you're really hot to copy a form (I've had a few that I didn't want to recreate by copy and paste for very complex reasons), you can simply copy the files for that form to someplace like a temp folder and rename it. Course, you have to go into the modules and make sure the rename gets propagated throughout the class and designer code. Then just use Add Existing Item from the menu and browse to the class for your renamed form. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 9:31 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] VB.Net 2005 copy a form Hi William That brings some relief - I thought I was missing something obvious. I'll try your method next time. /gustav >>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> Gustav ...I never "copy" a form outright ...I found it cited as a bad practice on a "best practices" list when I first got into vs5 ...it supposedly led to all kinds of problems down the line ...my practice is to first create a new form in VS and then to copy the contents of the original to the new leaving what vs created alone ...I've not had any problems with this (knock on wood) and its "almost" as easy as copying and renaming a form. ...I assumed ms would have fixed such an obvious problem in vs8 but then I've been assuming such in Access since A97 days ...and what do I have to show for such faith? ...a ribbon! :( William "My friends, we live in the greatest country in the world. Please join with me as we try to change it." Obama -------------------------------------------------- From: "Gustav Brock" Sent: Wednesday, June 25, 2008 3:34 AM To: Subject: Re: [dba-VB] VB.Net 2005 copy a form > Hi William > > I have done so. Same issue. Or am I missing something? > > /gustav > >>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > ...upgrade to vs2008 :) > > William > "Sen. McCain will bring a lifetime of experience to the campaign... Sen. > Obama will bring a speech that he gave." Hillary Clinton > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Tuesday, June 24, 2008 12:09 PM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi John >> >> You can copy and paste the .cs file in the Solution Explorer pane. The >> copy will be renamed and you can rename that to what you want. >> >> However, if you in the Properties pane later rename the copy of form to >> the new name, I've found that the refactoring mechanics will rename >> references to your form not only in the .Designer.cs file (correct) but >> also in the original .Designer.cs file (really nasty)! What do others do? >> >> /gustav >> >>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >> Hi All >> >> How do you copy a Form in VB.Net 2005? I have a form with 100+ controls. >> I need a very similar form and It seems a real drag to type that lot again. >> Any sugesstions? >> >> TIA >> >> johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Wed Jul 2 18:37:36 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 2 Jul 2008 16:37:36 -0700 Subject: [dba-VB] C#: this.prefix In-Reply-To: <09f701c8dc64$a87fb080$6401a8c0@nant> References: <09f701c8dc64$a87fb080$6401a8c0@nant> Message-ID: We use camcelcase postfix for objects and I still HATE it! We name things so they sort alpha but sometimes the names aren't very illuminating until you get to the tag end, which makes it wearing to search through the list for something you can't quite recall the name of. We use a variant of Hungarian within the code, although that has become hit or miss since .Net too. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Wednesday, July 02, 2008 9:57 AM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: Re: [dba-VB] C#: this.prefix Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From wdhindman at dejpolsystems.com Thu Jul 3 07:22:08 2008 From: wdhindman at dejpolsystems.com (William Hindman) Date: Thu, 3 Jul 2008 08:22:08 -0400 Subject: [dba-VB] VB.Net 2005 copy a form References: Message-ID: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> ...either way, its really annoying that ms can't get a simple copy/paste/rename right and propagate the name change throughout the module and forms ...if they can do intellisense, why not a very basic thing like this :( William -------------------------------------------------- From: "Charlotte Foust" Sent: Wednesday, July 02, 2008 7:34 PM To: "Discussion concerning Visual Basic and related programming issues." Subject: Re: [dba-VB] VB.Net 2005 copy a form > If you're really hot to copy a form (I've had a few that I didn't want > to recreate by copy and paste for very complex reasons), you can simply > copy the files for that form to someplace like a temp folder and rename > it. Course, you have to go into the modules and make sure the rename > gets propagated throughout the class and designer code. Then just use > Add Existing Item from the menu and browse to the class for your renamed > form. > > Charlotte Foust > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Wednesday, July 02, 2008 9:31 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > Hi William > > That brings some relief - I thought I was missing something obvious. > > I'll try your method next time. > > /gustav > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > Gustav > > ...I never "copy" a form outright ...I found it cited as a bad practice > on a "best practices" list when I first got into vs5 ...it supposedly > led to all kinds of problems down the line ...my practice is to first > create a new form in VS and then to copy the contents of the original to > the new leaving what vs created alone ...I've not had any problems with > this (knock on wood) and its "almost" as easy as copying and renaming a > form. > > ...I assumed ms would have fixed such an obvious problem in vs8 but then > I've been assuming such in Access since A97 days ...and what do I have > to show for such faith? ...a ribbon! :( > > William > "My friends, we live in the greatest country in the world. Please join > with me as we try to change it." Obama > > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Wednesday, June 25, 2008 3:34 AM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi William >> >> I have done so. Same issue. Or am I missing something? >> >> /gustav >> >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> >> ...upgrade to vs2008 :) >> >> William >> "Sen. McCain will bring a lifetime of experience to the campaign... > Sen. >> Obama will bring a speech that he gave." Hillary Clinton >> >> -------------------------------------------------- >> From: "Gustav Brock" >> Sent: Tuesday, June 24, 2008 12:09 PM >> To: >> Subject: Re: [dba-VB] VB.Net 2005 copy a form >> >>> Hi John >>> >>> You can copy and paste the .cs file in the Solution Explorer pane. > The >>> copy will be renamed and you can rename that to what you want. >>> >>> However, if you in the Properties pane later rename the copy of form > to >>> the new name, I've found that the refactoring mechanics will rename >>> references to your form not only in the .Designer.cs file (correct) > but >>> also in the original .Designer.cs file (really nasty)! What do others > do? >>> >>> /gustav >>> >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >>> Hi All >>> >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ > controls. >>> I need a very similar form and It seems a real drag to type that lot > again. >>> Any sugesstions? >>> >>> TIA >>> >>> johnc > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From max.wanadoo at gmail.com Thu Jul 3 08:51:06 2008 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Thu, 3 Jul 2008 14:51:06 +0100 Subject: [dba-VB] VB.Net 2005 copy a form In-Reply-To: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> References: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> Message-ID: Or ExportAs Text and then ImportAsText aka EATBloat. Max On Thu, Jul 3, 2008 at 1:22 PM, William Hindman wrote: > ...either way, its really annoying that ms can't get a simple > copy/paste/rename right and propagate the name change throughout the module > and forms ...if they can do intellisense, why not a very basic thing like > this :( > > William > > -------------------------------------------------- > From: "Charlotte Foust" > Sent: Wednesday, July 02, 2008 7:34 PM > To: "Discussion concerning Visual Basic and related programming issues." > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > If you're really hot to copy a form (I've had a few that I didn't want > > to recreate by copy and paste for very complex reasons), you can simply > > copy the files for that form to someplace like a temp folder and rename > > it. Course, you have to go into the modules and make sure the rename > > gets propagated throughout the class and designer code. Then just use > > Add Existing Item from the menu and browse to the class for your renamed > > form. > > > > Charlotte Foust > > > > -----Original Message----- > > From: dba-vb-bounces at databaseadvisors.com > > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > > Sent: Wednesday, July 02, 2008 9:31 AM > > To: dba-vb at databaseadvisors.com > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > Hi William > > > > That brings some relief - I thought I was missing something obvious. > > > > I'll try your method next time. > > > > /gustav > > > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > > Gustav > > > > ...I never "copy" a form outright ...I found it cited as a bad practice > > on a "best practices" list when I first got into vs5 ...it supposedly > > led to all kinds of problems down the line ...my practice is to first > > create a new form in VS and then to copy the contents of the original to > > the new leaving what vs created alone ...I've not had any problems with > > this (knock on wood) and its "almost" as easy as copying and renaming a > > form. > > > > ...I assumed ms would have fixed such an obvious problem in vs8 but then > > I've been assuming such in Access since A97 days ...and what do I have > > to show for such faith? ...a ribbon! :( > > > > William > > "My friends, we live in the greatest country in the world. Please join > > with me as we try to change it." Obama > > > > > > -------------------------------------------------- > > From: "Gustav Brock" > > Sent: Wednesday, June 25, 2008 3:34 AM > > To: > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > >> Hi William > >> > >> I have done so. Same issue. Or am I missing something? > >> > >> /gustav > >> > >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > >> ...upgrade to vs2008 :) > >> > >> William > >> "Sen. McCain will bring a lifetime of experience to the campaign... > > Sen. > >> Obama will bring a speech that he gave." Hillary Clinton > >> > >> -------------------------------------------------- > >> From: "Gustav Brock" > >> Sent: Tuesday, June 24, 2008 12:09 PM > >> To: > >> Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> > >>> Hi John > >>> > >>> You can copy and paste the .cs file in the Solution Explorer pane. > > The > >>> copy will be renamed and you can rename that to what you want. > >>> > >>> However, if you in the Properties pane later rename the copy of form > > to > >>> the new name, I've found that the refactoring mechanics will rename > >>> references to your form not only in the .Designer.cs file (correct) > > but > >>> also in the original .Designer.cs file (really nasty)! What do others > > do? > >>> > >>> /gustav > >>> > >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> > >>> Hi All > >>> > >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ > > controls. > >>> I need a very similar form and It seems a real drag to type that lot > > again. > >>> Any sugesstions? > >>> > >>> TIA > >>> > >>> johnc > > > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From michael at ddisolutions.com.au Fri Jul 4 02:05:48 2008 From: michael at ddisolutions.com.au (Michael Maddison) Date: Fri, 4 Jul 2008 17:05:48 +1000 Subject: [dba-VB] VB.Net 2005 copy a form References: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D013BFBCE@ddi-01.DDI.local> Wrong list I think Max... William, As to why its an issue I guess its because forms are partial classes, so it is legal and valid to have more then 1 cs file with the same class name. Refactor changes all names within the namespace, so change the namespace then rename then change the namespace back. You will need to change the namespace in the designer as well. cheers MM Or ExportAs Text and then ImportAsText aka EATBloat. Max On Thu, Jul 3, 2008 at 1:22 PM, William Hindman wrote: > ...either way, its really annoying that ms can't get a simple > copy/paste/rename right and propagate the name change throughout the > module and forms ...if they can do intellisense, why not a very basic > thing like this :( > > William > > -------------------------------------------------- > From: "Charlotte Foust" > Sent: Wednesday, July 02, 2008 7:34 PM > To: "Discussion concerning Visual Basic and related programming issues." > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > If you're really hot to copy a form (I've had a few that I didn't > > want to recreate by copy and paste for very complex reasons), you > > can simply copy the files for that form to someplace like a temp > > folder and rename it. Course, you have to go into the modules and > > make sure the rename gets propagated throughout the class and > > designer code. Then just use Add Existing Item from the menu and > > browse to the class for your renamed form. > > > > Charlotte Foust > > > > -----Original Message----- > > From: dba-vb-bounces at databaseadvisors.com > > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav > > Brock > > Sent: Wednesday, July 02, 2008 9:31 AM > > To: dba-vb at databaseadvisors.com > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > Hi William > > > > That brings some relief - I thought I was missing something obvious. > > > > I'll try your method next time. > > > > /gustav > > > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > > Gustav > > > > ...I never "copy" a form outright ...I found it cited as a bad > > practice on a "best practices" list when I first got into vs5 ...it > > supposedly led to all kinds of problems down the line ...my practice > > is to first create a new form in VS and then to copy the contents of > > the original to the new leaving what vs created alone ...I've not > > had any problems with this (knock on wood) and its "almost" as easy > > as copying and renaming a form. > > > > ...I assumed ms would have fixed such an obvious problem in vs8 but > > then I've been assuming such in Access since A97 days ...and what do > > I have to show for such faith? ...a ribbon! :( > > > > William > > "My friends, we live in the greatest country in the world. Please > > join with me as we try to change it." Obama > > > > > > -------------------------------------------------- > > From: "Gustav Brock" > > Sent: Wednesday, June 25, 2008 3:34 AM > > To: > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > >> Hi William > >> > >> I have done so. Same issue. Or am I missing something? > >> > >> /gustav > >> > >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > >> ...upgrade to vs2008 :) > >> > >> William > >> "Sen. McCain will bring a lifetime of experience to the campaign... > > Sen. > >> Obama will bring a speech that he gave." Hillary Clinton > >> > >> -------------------------------------------------- > >> From: "Gustav Brock" > >> Sent: Tuesday, June 24, 2008 12:09 PM > >> To: > >> Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> > >>> Hi John > >>> > >>> You can copy and paste the .cs file in the Solution Explorer pane. > > The > >>> copy will be renamed and you can rename that to what you want. > >>> > >>> However, if you in the Properties pane later rename the copy of > >>> form > > to > >>> the new name, I've found that the refactoring mechanics will > >>> rename references to your form not only in the .Designer.cs file > >>> (correct) > > but > >>> also in the original .Designer.cs file (really nasty)! What do > >>> others > > do? > >>> > >>> /gustav > >>> > >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> > >>> Hi All > >>> > >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ > > controls. > >>> I need a very similar form and It seems a real drag to type that > >>> lot > > again. > >>> Any sugesstions? > >>> > >>> TIA > >>> > >>> johnc > > > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From max.wanadoo at gmail.com Fri Jul 4 02:56:25 2008 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Fri, 4 Jul 2008 08:56:25 +0100 Subject: [dba-VB] VB.Net 2005 copy a form In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D013BFBCE@ddi-01.DDI.local> References: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> <59A61174B1F5B54B97FD4ADDE71E7D013BFBCE@ddi-01.DDI.local> Message-ID: Yes, sorry! Max On Fri, Jul 4, 2008 at 8:05 AM, Michael Maddison < michael at ddisolutions.com.au> wrote: > Wrong list I think Max... > > William, > As to why its an issue I guess its because forms are partial classes, so > it is legal and valid > to have more then 1 cs file with the same class name. Refactor changes > all names within the > namespace, so change the namespace then rename then change the namespace > back. You will > need to change the namespace in the designer as well. > > cheers > > MM > > > Or ExportAs Text and then ImportAsText aka EATBloat. > Max > > > On Thu, Jul 3, 2008 at 1:22 PM, William Hindman > > wrote: > > > ...either way, its really annoying that ms can't get a simple > > copy/paste/rename right and propagate the name change throughout the > > module and forms ...if they can do intellisense, why not a very basic > > > thing like this :( > > > > William > > > > -------------------------------------------------- > > From: "Charlotte Foust" > > Sent: Wednesday, July 02, 2008 7:34 PM > > To: "Discussion concerning Visual Basic and related programming > issues." > > > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > > If you're really hot to copy a form (I've had a few that I didn't > > > want to recreate by copy and paste for very complex reasons), you > > > can simply copy the files for that form to someplace like a temp > > > folder and rename it. Course, you have to go into the modules and > > > make sure the rename gets propagated throughout the class and > > > designer code. Then just use Add Existing Item from the menu and > > > browse to the class for your renamed form. > > > > > > Charlotte Foust > > > > > > -----Original Message----- > > > From: dba-vb-bounces at databaseadvisors.com > > > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav > > > Brock > > > Sent: Wednesday, July 02, 2008 9:31 AM > > > To: dba-vb at databaseadvisors.com > > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > > > Hi William > > > > > > That brings some relief - I thought I was missing something obvious. > > > > > > I'll try your method next time. > > > > > > /gustav > > > > > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > > > Gustav > > > > > > ...I never "copy" a form outright ...I found it cited as a bad > > > practice on a "best practices" list when I first got into vs5 ...it > > > supposedly led to all kinds of problems down the line ...my practice > > > > is to first create a new form in VS and then to copy the contents of > > > > the original to the new leaving what vs created alone ...I've not > > > had any problems with this (knock on wood) and its "almost" as easy > > > as copying and renaming a form. > > > > > > ...I assumed ms would have fixed such an obvious problem in vs8 but > > > then I've been assuming such in Access since A97 days ...and what do > > > > I have to show for such faith? ...a ribbon! :( > > > > > > William > > > "My friends, we live in the greatest country in the world. Please > > > join with me as we try to change it." Obama > > > > > > > > > -------------------------------------------------- > > > From: "Gustav Brock" > > > Sent: Wednesday, June 25, 2008 3:34 AM > > > To: > > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > > >> Hi William > > >> > > >> I have done so. Same issue. Or am I missing something? > > >> > > >> /gustav > > >> > > >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > > >> ...upgrade to vs2008 :) > > >> > > >> William > > >> "Sen. McCain will bring a lifetime of experience to the campaign... > > > Sen. > > >> Obama will bring a speech that he gave." Hillary Clinton > > >> > > >> -------------------------------------------------- > > >> From: "Gustav Brock" > > >> Sent: Tuesday, June 24, 2008 12:09 PM > > >> To: > > >> Subject: Re: [dba-VB] VB.Net 2005 copy a form > > >> > > >>> Hi John > > >>> > > >>> You can copy and paste the .cs file in the Solution Explorer pane. > > > The > > >>> copy will be renamed and you can rename that to what you want. > > >>> > > >>> However, if you in the Properties pane later rename the copy of > > >>> form > > > to > > >>> the new name, I've found that the refactoring mechanics will > > >>> rename references to your form not only in the .Designer.cs file > > >>> (correct) > > > but > > >>> also in the original .Designer.cs file (really nasty)! What do > > >>> others > > > do? > > >>> > > >>> /gustav > > >>> > > >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> > > >>> Hi All > > >>> > > >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ > > > controls. > > >>> I need a very similar form and It seems a real drag to type that > > >>> lot > > > again. > > >>> Any sugesstions? > > >>> > > >>> TIA > > >>> > > >>> johnc > > > > > > > > > > > > _______________________________________________ > > > dba-VB mailing list > > > dba-VB at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > > http://www.databaseadvisors.com > > > > > > > > > _______________________________________________ > > > dba-VB mailing list > > > dba-VB at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > > http://www.databaseadvisors.com > > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From Gustav at cactus.dk Mon Jul 7 09:48:09 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 07 Jul 2008 16:48:09 +0200 Subject: [dba-VB] Visual Studio: NumericUpDown control Message-ID: Hi all If I change the Minimum property of this, the ValueChanged event fires. Is this true? I would expect it to fire only at a change of the Value property of the control. Is there any way to distinguish between a change of Value and Minimum (and Maximum I guess, though I don't manipulate that property)? /gustav From paul.hartland at googlemail.com Thu Jul 10 05:58:31 2008 From: paul.hartland at googlemail.com (Paul Hartland) Date: Thu, 10 Jul 2008 11:58:31 +0100 Subject: [dba-VB] Trapping Errors When Trying To Get Distance Using MapPoint 2006 Message-ID: <38c884770807100358m68737a45rd9e67471d5aff979@mail.gmail.com> To all, I have just started a VB6 app that using MapPoint 2006 to calculate a few driving distances when required. The actual driving distance calculator is in a function, on which I have put some very simple error trapping. However when I pass a postcode (in one case B18 2PX) I get the error message (which bypasses my error trapping) as below: Run-time error '-2147181454 (80049c72)': The requested member of the collection does not exist. Use a valid name or index number. This is one of a few it errors on, all others work fine, but has anyone any idea why this isn't being picked up by my error trapping: Function GetDrivingDistance() On Error Goto MileageCalcError drivingdistancecode ResumeOnErrorHere savemap exitmappointapplication Exit Function MileageCalcError: Resume ResumeOnErrorHere End Function Thanks in advance for any help on this ..... -- Paul Hartland paul.hartland at googlemail.com From Johncliviger at aol.com Thu Jul 10 13:23:43 2008 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Thu, 10 Jul 2008 14:23:43 EDT Subject: [dba-VB] Datagridview in vb.net 2005 Message-ID: Hi All Is possible in datagridview to subtract a finish Date from a start Date and show the result in a unbound column on the same row by using the Expression property. If it is an example will be most useful TIA johnc From cfoust at infostatsystems.com Thu Jul 10 18:19:13 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Thu, 10 Jul 2008 16:19:13 -0700 Subject: [dba-VB] Datagridview in vb.net 2005 In-Reply-To: References: Message-ID: It should be possible. We do similar things with Infragistics grids, which are based on the vanilla Winforms variety. The expression/formula for the unbound column should probably be something like [FinishDate] - [StartDate]. However, that assumes all dates are populated. Are they? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Johncliviger at aol.com Sent: Thursday, July 10, 2008 11:24 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Datagridview in vb.net 2005 Hi All Is possible in datagridview to subtract a finish Date from a start Date and show the result in a unbound column on the same row by using the Expression property. If it is an example will be most useful TIA johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Johncliviger at aol.com Fri Jul 11 03:34:00 2008 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Fri, 11 Jul 2008 04:34:00 EDT Subject: [dba-VB] Datagridview in vb.net 2005 Message-ID: Hi Charlotte Yes all dates are populated. But what if there not? johnc From wdhindman at dejpolsystems.com Fri Jul 11 15:01:09 2008 From: wdhindman at dejpolsystems.com (William Hindman) Date: Fri, 11 Jul 2008 16:01:09 -0400 Subject: [dba-VB] Datagridview in vb.net 2005 References: Message-ID: <49ACF872F5124FC893FBDD608883980A@jislaptopdev> http://www.dreamincode.net/forums/showtopic41981.htm William -------------------------------------------------- From: Sent: Thursday, July 10, 2008 2:23 PM To: Subject: [dba-VB] Datagridview in vb.net 2005 > Hi All > Is possible in datagridview to subtract a finish Date from a start Date > and > show the result in a unbound column on the same row by using the > Expression > property. > > If it is an example will be most useful > > TIA > > johnc > > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From cfoust at infostatsystems.com Mon Jul 14 10:41:40 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 14 Jul 2008 08:41:40 -0700 Subject: [dba-VB] Datagridview in vb.net 2005 In-Reply-To: References: Message-ID: Then you'll probably get midnight and you can check for Date.MinValue to see whether you want to use it. I generally use a hidden expression column and then use code in the RowInitialize event to populate a visible unbound column appropriately. But we do some pretty exotic stuff with our grids. You can also use a typed dataset that includes an expression field in the dataset and then calculate based on that expression rather than doing it at the grid level. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Johncliviger at aol.com Sent: Friday, July 11, 2008 1:34 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Datagridview in vb.net 2005 Hi Charlotte Yes all dates are populated. But what if there not? johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Johncliviger at aol.com Tue Jul 15 04:01:41 2008 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Tue, 15 Jul 2008 05:01:41 EDT Subject: [dba-VB] Datagridview in vb.net 2005 Message-ID: Charlotte Thanks for the datagrid tips johnc From john at winhaven.net Tue Jul 15 16:39:40 2008 From: john at winhaven.net (John Bartow) Date: Tue, 15 Jul 2008 16:39:40 -0500 Subject: [dba-VB] Paging Chris Mackin Message-ID: <200807152139.m6FLdS9r022604@databaseadvisors.com> Does anyone know Chris new email address? John Bartow, President Database Advisors, Inc. Email: mailto:president at databaseadvisors.com Website: http://www.databaseadvisors.com From michael at ddisolutions.com.au Tue Jul 15 18:54:08 2008 From: michael at ddisolutions.com.au (Michael Maddison) Date: Wed, 16 Jul 2008 09:54:08 +1000 Subject: [dba-VB] Datagridview in vb.net 2005 References: Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D013BFCA8@ddi-01.DDI.local> FYI, There is a doc called DataGridView FAQ.doc floating about the www. Has lots of useful info for dealing with the DGV. cheers Michael M Charlotte Thanks for the datagrid tips johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Wed Jul 23 10:40:19 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 23 Jul 2008 17:40:19 +0200 Subject: [dba-VB] C#: this.prefix Message-ID: Hi Shamil et al Sorry to return to this perhaps pedantic question, but I noticed that the auto generated code in the .Designer.cs files are 100% flooded with either the this. prefix or the full namespace. Why would the generator do this if it was not necessary? Is it just being overcautious? /gustav >>> shamil at smsconsulting.spb.ru 02-07-2008 18:57 >>> Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav From shamil at smsconsulting.spb.ru Wed Jul 23 14:06:11 2008 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 23 Jul 2008 23:06:11 +0400 Subject: [dba-VB] C#: this.prefix In-Reply-To: Message-ID: <1c6301c8ecf7$2bf4a630$6401a8c0@nant> Hi Gustav, That's waste of HDD space for sure IMO. Probably somebody "paranoid" and overcautious with VB6/VBA programming experience background did write this code generator at MS. I'm serious :) FYI: I almost never use this. in my C# coding - I do use camelCase naming conventions and it works very well for me - never had any confusion with scope, as well as my VS2005/VS2008 C# compiler :) Here is the case when this. *is* necessary - but this (pun intended:)) is a bad coding style: public class ThatParent { public string Name = "Parent Name"; } public class ThisChild : ThatParent { public new string Name = "Child Name"; public void Test() { Console.WriteLine("Parent:" + base.Name); Console.WriteLine("Child:" + this.Name); Console.WriteLine("Whose name is this ?:" + Name); } } They (MS) do generate this. everywhere to prevent confusions like that one above as controls' names could be similar to the names of the properties and methods in WinForm class inheritance hierarchy: System..::.Object System..::.MarshalByRefObject System.ComponentModel..::.Component System.Windows.Forms..::.Control System.Windows.Forms..::.ScrollableControl System.Windows.Forms..::.ContainerControl System.Windows.Forms..::.Form Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 23, 2008 7:40 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] C#: this.prefix Hi Shamil et al Sorry to return to this perhaps pedantic question, but I noticed that the auto generated code in the .Designer.cs files are 100% flooded with either the this. prefix or the full namespace. Why would the generator do this if it was not necessary? Is it just being overcautious? /gustav >>> shamil at smsconsulting.spb.ru 02-07-2008 18:57 >>> Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Wed Jul 23 15:24:50 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 23 Jul 2008 22:24:50 +0200 Subject: [dba-VB] C#: this.prefix Message-ID: Hi Shamil Thanks. That explains. I guess MS has considered this and concluded that the cost in consumed disk space is well worth avoiding the possible confusion from name conflicts. /gustav >>> shamil at smsconsulting.spb.ru 23-07-2008 21:06 >>> Hi Gustav, That's waste of HDD space for sure IMO. Probably somebody "paranoid" and overcautious with VB6/VBA programming experience background did write this code generator at MS. I'm serious :) FYI: I almost never use this. in my C# coding - I do use camelCase naming conventions and it works very well for me - never had any confusion with scope, as well as my VS2005/VS2008 C# compiler :) Here is the case when this. *is* necessary - but this (pun intended:)) is a bad coding style: public class ThatParent { public string Name = "Parent Name"; } public class ThisChild : ThatParent { public new string Name = "Child Name"; public void Test() { Console.WriteLine("Parent:" + base.Name); Console.WriteLine("Child:" + this.Name); Console.WriteLine("Whose name is this ?:" + Name); } } They (MS) do generate this. everywhere to prevent confusions like that one above as controls' names could be similar to the names of the properties and methods in WinForm class inheritance hierarchy: System..::.Object System..::.MarshalByRefObject System.ComponentModel..::.Component System.Windows.Forms..::.Control System.Windows.Forms..::.ScrollableControl System.Windows.Forms..::.ContainerControl System.Windows.Forms..::.Form Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 23, 2008 7:40 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] C#: this.prefix Hi Shamil et al Sorry to return to this perhaps pedantic question, but I noticed that the auto generated code in the .Designer.cs files are 100% flooded with either the this. prefix or the full namespace. Why would the generator do this if it was not necessary? Is it just being overcautious? /gustav >>> shamil at smsconsulting.spb.ru 02-07-2008 18:57 >>> Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav From paul.hartland at googlemail.com Thu Jul 24 03:56:04 2008 From: paul.hartland at googlemail.com (Paul Hartland) Date: Thu, 24 Jul 2008 09:56:04 +0100 Subject: [dba-VB] OT - Cross Post Learning VB.Net Message-ID: <38c884770807240156t17f628bbw3dd7935cd80df20d@mail.gmail.com> To all, I want to start learning Visual Basic .Net, I did download VB 2005 Express, C++ 2005 Express, C# 2005 Express & SQL Server 2005 Express, but unfortunately didn't actually get around to playing with them. I have noticed that 2008 Express editions are now available, would it be worth using these instead of the 2005 Express editions ? Also, I would class myself as an intermediate to advanced VB6 developer, does anyone have any good suggestions on books, free web tutuorials that would get me started, I don't mind going right back to the beginning if I have to to learn this, as I am falling behind a long way. Oops another thought, does anyone know if there is anything like an ASP.Net Express edition or similar (or am I being thick lol) Thanks in advance for any help on this.... -- Paul Hartland paul.hartland at googlemail.com From robert at webedb.com Thu Jul 24 22:20:03 2008 From: robert at webedb.com (Robert L. Stewart) Date: Thu, 24 Jul 2008 22:20:03 -0500 Subject: [dba-VB] Cross Post Learning VB.Net In-Reply-To: References: Message-ID: <200807250320.m6P3KYtV028389@databaseadvisors.com> Paul, That would be the Visual Web Developer. Yes, I would go to the 2008 versions since you are starting out. I would go with the Step-By-Step books as a start. Robert At 12:00 PM 7/24/2008, you wrote: >Date: Thu, 24 Jul 2008 09:56:04 +0100 >From: "Paul Hartland" >Subject: [dba-VB] OT - Cross Post Learning VB.Net >To: VisualBasicList , "Access List" > >Message-ID: > <38c884770807240156t17f628bbw3dd7935cd80df20d at mail.gmail.com> >Content-Type: text/plain; charset=ISO-8859-1 > >To all, > >I want to start learning Visual Basic .Net, I did download VB 2005 Express, >C++ 2005 Express, C# 2005 Express & SQL Server 2005 Express, but >unfortunately didn't actually get around to playing with them. > >I have noticed that 2008 Express editions are now available, would it be >worth using these instead of the 2005 Express editions ? > >Also, I would class myself as an intermediate to advanced VB6 developer, >does anyone have any good suggestions on books, free web tutuorials that >would get me started, I don't mind going right back to the beginning if I >have to to learn this, as I am falling behind a long way. > >Oops another thought, does anyone know if there is anything like an ASP.Net >Express edition or similar (or am I being thick lol) > >Thanks in advance for any help on this.... > >-- >Paul Hartland >paul.hartland at googlemail.com From Johncliviger at aol.com Mon Jul 28 03:50:35 2008 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Mon, 28 Jul 2008 04:50:35 EDT Subject: [dba-VB] VB2005 DatagridView with unbound calculated fields Message-ID: Hi All I have a form with a parent and child grids. On the child grid I have 2 unbound calculated fields. And everything works fine. What I need to do is add a subtotal field for 1 of the calculated fields. And the subtotal to appear in a textbox on the form for each parent. Anyone seen this before? Any sites that may explain how to do it? TIA johnc From paul.hartland at googlemail.com Wed Jul 30 04:56:11 2008 From: paul.hartland at googlemail.com (Paul Hartland) Date: Wed, 30 Jul 2008 10:56:11 +0100 Subject: [dba-VB] Visual Basic 6.0 Control CardScan Scanner Message-ID: <38c884770807300256o5b4c26a8s347c2a461d31bba8@mail.gmail.com> To all, We have started scanning personnel photo's onto our employee database, I am using Visual Basic 6.0 and the business card scanner CardScan 800c. It works but is a bit clumsy i.e. when we scan a phto the user clicks a button which runs a macro to represent the keystrokes etc required by the CardScan software to process & save the employee's photo. The macro works by firing events/keystrokes depending on the name of the currently open CardScan window, however we now want our European divisions in Belgium & Netherlands to do this as well, the problem being that the macro will not recognise the window name as it will not be in English. Has anyone ever worked with CardScan scanning devices, so that perhaps I could use some sort of general driver to control the CardScan scanner and save the picture. The closest I have came is using GDTwain, which lets me tell the unit to scan and save the picture, but I don't seem to be able to control the resolution etc of the photos. Any help on this will be appreciated, and thank you in advance for any help on this.... -- Paul Hartland paul.hartland at googlemail.com From Gustav at cactus.dk Wed Jul 30 05:36:17 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 30 Jul 2008 12:36:17 +0200 Subject: [dba-VB] Visual Basic 6.0 Control CardScan Scanner Message-ID: Hi Paul Sounds like a job for csXImage which I have recommend several times: http://www.chestysoft.com/ximage/default.asp A fully functional trial is available for download. Scanners - not to say their buggy drivers - are nasty and unpredictable animals, and you will most likely - as I did - need the excellent support from Simon Chester. I believe he knows just about anything about scanners and their misbehaving. /gustav >>> paul.hartland at googlemail.com 30-07-2008 11:56 >>> To all, We have started scanning personnel photo's onto our employee database, I am using Visual Basic 6.0 and the business card scanner CardScan 800c. It works but is a bit clumsy i.e. when we scan a phto the user clicks a button which runs a macro to represent the keystrokes etc required by the CardScan software to process & save the employee's photo. The macro works by firing events/keystrokes depending on the name of the currently open CardScan window, however we now want our European divisions in Belgium & Netherlands to do this as well, the problem being that the macro will not recognise the window name as it will not be in English. Has anyone ever worked with CardScan scanning devices, so that perhaps I could use some sort of general driver to control the CardScan scanner and save the picture. The closest I have came is using GDTwain, which lets me tell the unit to scan and save the picture, but I don't seem to be able to control the resolution etc of the photos. Any help on this will be appreciated, and thank you in advance for any help on this.... -- Paul Hartland paul.hartland at googlemail.com From paul.hartland at googlemail.com Wed Jul 30 05:48:36 2008 From: paul.hartland at googlemail.com (Paul Hartland) Date: Wed, 30 Jul 2008 11:48:36 +0100 Subject: [dba-VB] Visual Basic 6.0 Control CardScan Scanner In-Reply-To: References: Message-ID: <38c884770807300348k718230a8s738e205140676a5@mail.gmail.com> Thank you Gustav, just downloaded it so will have a look.... 2008/7/30 Gustav Brock > Hi Paul > > Sounds like a job for csXImage which I have recommend several times: > > http://www.chestysoft.com/ximage/default.asp > > A fully functional trial is available for download. > > Scanners - not to say their buggy drivers - are nasty and unpredictable > animals, and you will most likely - as I did - need the excellent support > from Simon Chester. I believe he knows just about anything about scanners > and their misbehaving. > > /gustav > > >>> paul.hartland at googlemail.com 30-07-2008 11:56 >>> > To all, > > We have started scanning personnel photo's onto our employee database, I am > using Visual Basic 6.0 and the business card scanner CardScan 800c. It > works but is a bit clumsy i.e. when we scan a phto the user clicks a button > which runs a macro to represent the keystrokes etc required by the CardScan > software to process & save the employee's photo. The macro works by firing > events/keystrokes depending on the name of the currently open CardScan > window, however we now want our European divisions in Belgium & Netherlands > to do this as well, the problem being that the macro will not recognise the > window name as it will not be in English. > > Has anyone ever worked with CardScan scanning devices, so that perhaps I > could use some sort of general driver to control the CardScan scanner and > save the picture. The closest I have came is using GDTwain, which lets me > tell the unit to scan and save the picture, but I don't seem to be able to > control the resolution etc of the photos. > > Any help on this will be appreciated, and thank you in advance for any help > on this.... > > -- > Paul Hartland > paul.hartland at googlemail.com > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > -- Paul Hartland paul.hartland at googlemail.com From cfoust at infostatsystems.com Thu Jul 31 10:30:51 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Thu, 31 Jul 2008 08:30:51 -0700 Subject: [dba-VB] VB2005 DatagridView with unbound calculated fields In-Reply-To: References: Message-ID: I'm not sure I understand. You want the subtotal to appear on the parent form, not in the parent grid, right? That should only take creating a dataset (or reference the datasource of the child grid and cast it as the appropriate object type) and then doing a compute on it to sum the value of the column in the child. You'd raise an event from the child grid if the value changed and a handler in the parent form would then recalculate the subtotal. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Johncliviger at aol.com Sent: Monday, July 28, 2008 1:51 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB2005 DatagridView with unbound calculated fields Hi All I have a form with a parent and child grids. On the child grid I have 2 unbound calculated fields. And everything works fine. What I need to do is add a subtotal field for 1 of the calculated fields. And the subtotal to appear in a textbox on the form for each parent. Anyone seen this before? Any sites that may explain how to do it? TIA johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Wed Jul 2 10:54:58 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 02 Jul 2008 17:54:58 +0200 Subject: [dba-VB] C#: this.prefix Message-ID: Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav From wdhindman at dejpolsystems.com Wed Jul 2 11:12:45 2008 From: wdhindman at dejpolsystems.com (William Hindman) Date: Wed, 2 Jul 2008 12:12:45 -0400 Subject: [dba-VB] VB.Net 2005 copy a form References: Message-ID: <572DA58D1F8F4E1E865FA20E43C52CAA@jislaptopdev> Gustav ...I never "copy" a form outright ...I found it cited as a bad practice on a "best practices" list when I first got into vs5 ...it supposedly led to all kinds of problems down the line ...my practice is to first create a new form in VS and then to copy the contents of the original to the new leaving what vs created alone ...I've not had any problems with this (knock on wood) and its "almost" as easy as copying and renaming a form. ...I assumed ms would have fixed such an obvious problem in vs8 but then I've been assuming such in Access since A97 days ...and what do I have to show for such faith? ...a ribbon! :( William "My friends, we live in the greatest country in the world. Please join with me as we try to change it." Obama -------------------------------------------------- From: "Gustav Brock" Sent: Wednesday, June 25, 2008 3:34 AM To: Subject: Re: [dba-VB] VB.Net 2005 copy a form > Hi William > > I have done so. Same issue. Or am I missing something? > > /gustav > >>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > ...upgrade to vs2008 :) > > William > "Sen. McCain will bring a lifetime of experience to the campaign... Sen. > Obama will bring a speech that he gave." Hillary Clinton > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Tuesday, June 24, 2008 12:09 PM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi John >> >> You can copy and paste the .cs file in the Solution Explorer pane. The >> copy will be renamed and you can rename that to what you want. >> >> However, if you in the Properties pane later rename the copy of form to >> the new name, I've found that the refactoring mechanics will rename >> references to your form not only in the .Designer.cs file (correct) but >> also in the original .Designer.cs file (really nasty)! What do others do? >> >> /gustav >> >>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >> Hi All >> >> How do you copy a Form in VB.Net 2005? I have a form with 100+ >> controls. >> I need a very similar form and It seems a real drag to type that lot >> again. >> Any sugesstions? >> >> TIA >> >> johnc > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From Gustav at cactus.dk Wed Jul 2 11:30:42 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 02 Jul 2008 18:30:42 +0200 Subject: [dba-VB] VB.Net 2005 copy a form Message-ID: Hi William That brings some relief - I thought I was missing something obvious. I'll try your method next time. /gustav >>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> Gustav ...I never "copy" a form outright ...I found it cited as a bad practice on a "best practices" list when I first got into vs5 ...it supposedly led to all kinds of problems down the line ...my practice is to first create a new form in VS and then to copy the contents of the original to the new leaving what vs created alone ...I've not had any problems with this (knock on wood) and its "almost" as easy as copying and renaming a form. ...I assumed ms would have fixed such an obvious problem in vs8 but then I've been assuming such in Access since A97 days ...and what do I have to show for such faith? ...a ribbon! :( William "My friends, we live in the greatest country in the world. Please join with me as we try to change it." Obama -------------------------------------------------- From: "Gustav Brock" Sent: Wednesday, June 25, 2008 3:34 AM To: Subject: Re: [dba-VB] VB.Net 2005 copy a form > Hi William > > I have done so. Same issue. Or am I missing something? > > /gustav > >>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > ...upgrade to vs2008 :) > > William > "Sen. McCain will bring a lifetime of experience to the campaign... Sen. > Obama will bring a speech that he gave." Hillary Clinton > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Tuesday, June 24, 2008 12:09 PM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi John >> >> You can copy and paste the .cs file in the Solution Explorer pane. The >> copy will be renamed and you can rename that to what you want. >> >> However, if you in the Properties pane later rename the copy of form to >> the new name, I've found that the refactoring mechanics will rename >> references to your form not only in the .Designer.cs file (correct) but >> also in the original .Designer.cs file (really nasty)! What do others do? >> >> /gustav >> >>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >> Hi All >> >> How do you copy a Form in VB.Net 2005? I have a form with 100+ controls. >> I need a very similar form and It seems a real drag to type that lot again. >> Any sugesstions? >> >> TIA >> >> johnc From shamil at smsconsulting.spb.ru Wed Jul 2 11:57:06 2008 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 2 Jul 2008 20:57:06 +0400 Subject: [dba-VB] C#: this.prefix In-Reply-To: Message-ID: <09f701c8dc64$a87fb080$6401a8c0@nant> Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From davidmcafee at gmail.com Wed Jul 2 12:00:23 2008 From: davidmcafee at gmail.com (David McAfee) Date: Wed, 2 Jul 2008 10:00:23 -0700 Subject: [dba-VB] C#: this.prefix In-Reply-To: References: Message-ID: <8786a4c00807021000g7dfa4d50l79887245b8f41e37@mail.gmail.com> Same here, I use it out of (an old) habit from "Me." in VBA, on forms. On Wed, Jul 2, 2008 at 8:54 AM, Gustav Brock wrote: > Hi all > > How rigorously are you prefixing controls and variables with "this."? > > Is it a good or bad coding practice to use it when not strictly needed? > Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? > > I've found, that I use it a lot - old habit from "Me." in VBA, I guess. > > /gustav > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From wdhindman at dejpolsystems.com Wed Jul 2 15:46:51 2008 From: wdhindman at dejpolsystems.com (William Hindman) Date: Wed, 2 Jul 2008 16:46:51 -0400 Subject: [dba-VB] VB.Net 2005 copy a form References: Message-ID: <11A2F20AE0B143519C50E0A3E043028F@jislaptopdev> ...damn ...sorry about the sig :( William -------------------------------------------------- From: "Gustav Brock" Sent: Wednesday, July 02, 2008 12:30 PM To: Subject: Re: [dba-VB] VB.Net 2005 copy a form > Hi William > > That brings some relief - I thought I was missing something obvious. > > I'll try your method next time. > > /gustav > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > Gustav > > ...I never "copy" a form outright ...I found it cited as a bad practice on > a > "best practices" list when I first got into vs5 ...it supposedly led to > all > kinds of problems down the line ...my practice is to first create a new > form > in VS and then to copy the contents of the original to the new leaving > what > vs created alone ...I've not had any problems with this (knock on wood) > and > its "almost" as easy as copying and renaming a form. > > ...I assumed ms would have fixed such an obvious problem in vs8 but then > I've been assuming such in Access since A97 days ...and what do I have to > show for such faith? ...a ribbon! :( > > William > "My friends, we live in the greatest country in the world. Please join > with > me as we try to change it." Obama > > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Wednesday, June 25, 2008 3:34 AM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi William >> >> I have done so. Same issue. Or am I missing something? >> >> /gustav >> >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> >> ...upgrade to vs2008 :) >> >> William >> "Sen. McCain will bring a lifetime of experience to the campaign... Sen. >> Obama will bring a speech that he gave." Hillary Clinton >> >> -------------------------------------------------- >> From: "Gustav Brock" >> Sent: Tuesday, June 24, 2008 12:09 PM >> To: >> Subject: Re: [dba-VB] VB.Net 2005 copy a form >> >>> Hi John >>> >>> You can copy and paste the .cs file in the Solution Explorer pane. The >>> copy will be renamed and you can rename that to what you want. >>> >>> However, if you in the Properties pane later rename the copy of form to >>> the new name, I've found that the refactoring mechanics will rename >>> references to your form not only in the .Designer.cs file (correct) but >>> also in the original .Designer.cs file (really nasty)! What do others >>> do? >>> >>> /gustav >>> >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >>> Hi All >>> >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ >>> controls. >>> I need a very similar form and It seems a real drag to type that lot >>> again. >>> Any sugesstions? >>> >>> TIA >>> >>> johnc > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From cfoust at infostatsystems.com Wed Jul 2 18:34:39 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 2 Jul 2008 16:34:39 -0700 Subject: [dba-VB] VB.Net 2005 copy a form In-Reply-To: References: Message-ID: If you're really hot to copy a form (I've had a few that I didn't want to recreate by copy and paste for very complex reasons), you can simply copy the files for that form to someplace like a temp folder and rename it. Course, you have to go into the modules and make sure the rename gets propagated throughout the class and designer code. Then just use Add Existing Item from the menu and browse to the class for your renamed form. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 9:31 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] VB.Net 2005 copy a form Hi William That brings some relief - I thought I was missing something obvious. I'll try your method next time. /gustav >>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> Gustav ...I never "copy" a form outright ...I found it cited as a bad practice on a "best practices" list when I first got into vs5 ...it supposedly led to all kinds of problems down the line ...my practice is to first create a new form in VS and then to copy the contents of the original to the new leaving what vs created alone ...I've not had any problems with this (knock on wood) and its "almost" as easy as copying and renaming a form. ...I assumed ms would have fixed such an obvious problem in vs8 but then I've been assuming such in Access since A97 days ...and what do I have to show for such faith? ...a ribbon! :( William "My friends, we live in the greatest country in the world. Please join with me as we try to change it." Obama -------------------------------------------------- From: "Gustav Brock" Sent: Wednesday, June 25, 2008 3:34 AM To: Subject: Re: [dba-VB] VB.Net 2005 copy a form > Hi William > > I have done so. Same issue. Or am I missing something? > > /gustav > >>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > ...upgrade to vs2008 :) > > William > "Sen. McCain will bring a lifetime of experience to the campaign... Sen. > Obama will bring a speech that he gave." Hillary Clinton > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Tuesday, June 24, 2008 12:09 PM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi John >> >> You can copy and paste the .cs file in the Solution Explorer pane. The >> copy will be renamed and you can rename that to what you want. >> >> However, if you in the Properties pane later rename the copy of form to >> the new name, I've found that the refactoring mechanics will rename >> references to your form not only in the .Designer.cs file (correct) but >> also in the original .Designer.cs file (really nasty)! What do others do? >> >> /gustav >> >>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >> Hi All >> >> How do you copy a Form in VB.Net 2005? I have a form with 100+ controls. >> I need a very similar form and It seems a real drag to type that lot again. >> Any sugesstions? >> >> TIA >> >> johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Wed Jul 2 18:37:36 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 2 Jul 2008 16:37:36 -0700 Subject: [dba-VB] C#: this.prefix In-Reply-To: <09f701c8dc64$a87fb080$6401a8c0@nant> References: <09f701c8dc64$a87fb080$6401a8c0@nant> Message-ID: We use camcelcase postfix for objects and I still HATE it! We name things so they sort alpha but sometimes the names aren't very illuminating until you get to the tag end, which makes it wearing to search through the list for something you can't quite recall the name of. We use a variant of Hungarian within the code, although that has become hit or miss since .Net too. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Wednesday, July 02, 2008 9:57 AM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: Re: [dba-VB] C#: this.prefix Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From wdhindman at dejpolsystems.com Thu Jul 3 07:22:08 2008 From: wdhindman at dejpolsystems.com (William Hindman) Date: Thu, 3 Jul 2008 08:22:08 -0400 Subject: [dba-VB] VB.Net 2005 copy a form References: Message-ID: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> ...either way, its really annoying that ms can't get a simple copy/paste/rename right and propagate the name change throughout the module and forms ...if they can do intellisense, why not a very basic thing like this :( William -------------------------------------------------- From: "Charlotte Foust" Sent: Wednesday, July 02, 2008 7:34 PM To: "Discussion concerning Visual Basic and related programming issues." Subject: Re: [dba-VB] VB.Net 2005 copy a form > If you're really hot to copy a form (I've had a few that I didn't want > to recreate by copy and paste for very complex reasons), you can simply > copy the files for that form to someplace like a temp folder and rename > it. Course, you have to go into the modules and make sure the rename > gets propagated throughout the class and designer code. Then just use > Add Existing Item from the menu and browse to the class for your renamed > form. > > Charlotte Foust > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Wednesday, July 02, 2008 9:31 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > Hi William > > That brings some relief - I thought I was missing something obvious. > > I'll try your method next time. > > /gustav > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > Gustav > > ...I never "copy" a form outright ...I found it cited as a bad practice > on a "best practices" list when I first got into vs5 ...it supposedly > led to all kinds of problems down the line ...my practice is to first > create a new form in VS and then to copy the contents of the original to > the new leaving what vs created alone ...I've not had any problems with > this (knock on wood) and its "almost" as easy as copying and renaming a > form. > > ...I assumed ms would have fixed such an obvious problem in vs8 but then > I've been assuming such in Access since A97 days ...and what do I have > to show for such faith? ...a ribbon! :( > > William > "My friends, we live in the greatest country in the world. Please join > with me as we try to change it." Obama > > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Wednesday, June 25, 2008 3:34 AM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi William >> >> I have done so. Same issue. Or am I missing something? >> >> /gustav >> >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> >> ...upgrade to vs2008 :) >> >> William >> "Sen. McCain will bring a lifetime of experience to the campaign... > Sen. >> Obama will bring a speech that he gave." Hillary Clinton >> >> -------------------------------------------------- >> From: "Gustav Brock" >> Sent: Tuesday, June 24, 2008 12:09 PM >> To: >> Subject: Re: [dba-VB] VB.Net 2005 copy a form >> >>> Hi John >>> >>> You can copy and paste the .cs file in the Solution Explorer pane. > The >>> copy will be renamed and you can rename that to what you want. >>> >>> However, if you in the Properties pane later rename the copy of form > to >>> the new name, I've found that the refactoring mechanics will rename >>> references to your form not only in the .Designer.cs file (correct) > but >>> also in the original .Designer.cs file (really nasty)! What do others > do? >>> >>> /gustav >>> >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >>> Hi All >>> >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ > controls. >>> I need a very similar form and It seems a real drag to type that lot > again. >>> Any sugesstions? >>> >>> TIA >>> >>> johnc > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From max.wanadoo at gmail.com Thu Jul 3 08:51:06 2008 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Thu, 3 Jul 2008 14:51:06 +0100 Subject: [dba-VB] VB.Net 2005 copy a form In-Reply-To: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> References: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> Message-ID: Or ExportAs Text and then ImportAsText aka EATBloat. Max On Thu, Jul 3, 2008 at 1:22 PM, William Hindman wrote: > ...either way, its really annoying that ms can't get a simple > copy/paste/rename right and propagate the name change throughout the module > and forms ...if they can do intellisense, why not a very basic thing like > this :( > > William > > -------------------------------------------------- > From: "Charlotte Foust" > Sent: Wednesday, July 02, 2008 7:34 PM > To: "Discussion concerning Visual Basic and related programming issues." > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > If you're really hot to copy a form (I've had a few that I didn't want > > to recreate by copy and paste for very complex reasons), you can simply > > copy the files for that form to someplace like a temp folder and rename > > it. Course, you have to go into the modules and make sure the rename > > gets propagated throughout the class and designer code. Then just use > > Add Existing Item from the menu and browse to the class for your renamed > > form. > > > > Charlotte Foust > > > > -----Original Message----- > > From: dba-vb-bounces at databaseadvisors.com > > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > > Sent: Wednesday, July 02, 2008 9:31 AM > > To: dba-vb at databaseadvisors.com > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > Hi William > > > > That brings some relief - I thought I was missing something obvious. > > > > I'll try your method next time. > > > > /gustav > > > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > > Gustav > > > > ...I never "copy" a form outright ...I found it cited as a bad practice > > on a "best practices" list when I first got into vs5 ...it supposedly > > led to all kinds of problems down the line ...my practice is to first > > create a new form in VS and then to copy the contents of the original to > > the new leaving what vs created alone ...I've not had any problems with > > this (knock on wood) and its "almost" as easy as copying and renaming a > > form. > > > > ...I assumed ms would have fixed such an obvious problem in vs8 but then > > I've been assuming such in Access since A97 days ...and what do I have > > to show for such faith? ...a ribbon! :( > > > > William > > "My friends, we live in the greatest country in the world. Please join > > with me as we try to change it." Obama > > > > > > -------------------------------------------------- > > From: "Gustav Brock" > > Sent: Wednesday, June 25, 2008 3:34 AM > > To: > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > >> Hi William > >> > >> I have done so. Same issue. Or am I missing something? > >> > >> /gustav > >> > >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > >> ...upgrade to vs2008 :) > >> > >> William > >> "Sen. McCain will bring a lifetime of experience to the campaign... > > Sen. > >> Obama will bring a speech that he gave." Hillary Clinton > >> > >> -------------------------------------------------- > >> From: "Gustav Brock" > >> Sent: Tuesday, June 24, 2008 12:09 PM > >> To: > >> Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> > >>> Hi John > >>> > >>> You can copy and paste the .cs file in the Solution Explorer pane. > > The > >>> copy will be renamed and you can rename that to what you want. > >>> > >>> However, if you in the Properties pane later rename the copy of form > > to > >>> the new name, I've found that the refactoring mechanics will rename > >>> references to your form not only in the .Designer.cs file (correct) > > but > >>> also in the original .Designer.cs file (really nasty)! What do others > > do? > >>> > >>> /gustav > >>> > >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> > >>> Hi All > >>> > >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ > > controls. > >>> I need a very similar form and It seems a real drag to type that lot > > again. > >>> Any sugesstions? > >>> > >>> TIA > >>> > >>> johnc > > > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From michael at ddisolutions.com.au Fri Jul 4 02:05:48 2008 From: michael at ddisolutions.com.au (Michael Maddison) Date: Fri, 4 Jul 2008 17:05:48 +1000 Subject: [dba-VB] VB.Net 2005 copy a form References: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D013BFBCE@ddi-01.DDI.local> Wrong list I think Max... William, As to why its an issue I guess its because forms are partial classes, so it is legal and valid to have more then 1 cs file with the same class name. Refactor changes all names within the namespace, so change the namespace then rename then change the namespace back. You will need to change the namespace in the designer as well. cheers MM Or ExportAs Text and then ImportAsText aka EATBloat. Max On Thu, Jul 3, 2008 at 1:22 PM, William Hindman wrote: > ...either way, its really annoying that ms can't get a simple > copy/paste/rename right and propagate the name change throughout the > module and forms ...if they can do intellisense, why not a very basic > thing like this :( > > William > > -------------------------------------------------- > From: "Charlotte Foust" > Sent: Wednesday, July 02, 2008 7:34 PM > To: "Discussion concerning Visual Basic and related programming issues." > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > If you're really hot to copy a form (I've had a few that I didn't > > want to recreate by copy and paste for very complex reasons), you > > can simply copy the files for that form to someplace like a temp > > folder and rename it. Course, you have to go into the modules and > > make sure the rename gets propagated throughout the class and > > designer code. Then just use Add Existing Item from the menu and > > browse to the class for your renamed form. > > > > Charlotte Foust > > > > -----Original Message----- > > From: dba-vb-bounces at databaseadvisors.com > > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav > > Brock > > Sent: Wednesday, July 02, 2008 9:31 AM > > To: dba-vb at databaseadvisors.com > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > Hi William > > > > That brings some relief - I thought I was missing something obvious. > > > > I'll try your method next time. > > > > /gustav > > > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > > Gustav > > > > ...I never "copy" a form outright ...I found it cited as a bad > > practice on a "best practices" list when I first got into vs5 ...it > > supposedly led to all kinds of problems down the line ...my practice > > is to first create a new form in VS and then to copy the contents of > > the original to the new leaving what vs created alone ...I've not > > had any problems with this (knock on wood) and its "almost" as easy > > as copying and renaming a form. > > > > ...I assumed ms would have fixed such an obvious problem in vs8 but > > then I've been assuming such in Access since A97 days ...and what do > > I have to show for such faith? ...a ribbon! :( > > > > William > > "My friends, we live in the greatest country in the world. Please > > join with me as we try to change it." Obama > > > > > > -------------------------------------------------- > > From: "Gustav Brock" > > Sent: Wednesday, June 25, 2008 3:34 AM > > To: > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > >> Hi William > >> > >> I have done so. Same issue. Or am I missing something? > >> > >> /gustav > >> > >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > >> ...upgrade to vs2008 :) > >> > >> William > >> "Sen. McCain will bring a lifetime of experience to the campaign... > > Sen. > >> Obama will bring a speech that he gave." Hillary Clinton > >> > >> -------------------------------------------------- > >> From: "Gustav Brock" > >> Sent: Tuesday, June 24, 2008 12:09 PM > >> To: > >> Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> > >>> Hi John > >>> > >>> You can copy and paste the .cs file in the Solution Explorer pane. > > The > >>> copy will be renamed and you can rename that to what you want. > >>> > >>> However, if you in the Properties pane later rename the copy of > >>> form > > to > >>> the new name, I've found that the refactoring mechanics will > >>> rename references to your form not only in the .Designer.cs file > >>> (correct) > > but > >>> also in the original .Designer.cs file (really nasty)! What do > >>> others > > do? > >>> > >>> /gustav > >>> > >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> > >>> Hi All > >>> > >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ > > controls. > >>> I need a very similar form and It seems a real drag to type that > >>> lot > > again. > >>> Any sugesstions? > >>> > >>> TIA > >>> > >>> johnc > > > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From max.wanadoo at gmail.com Fri Jul 4 02:56:25 2008 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Fri, 4 Jul 2008 08:56:25 +0100 Subject: [dba-VB] VB.Net 2005 copy a form In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D013BFBCE@ddi-01.DDI.local> References: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> <59A61174B1F5B54B97FD4ADDE71E7D013BFBCE@ddi-01.DDI.local> Message-ID: Yes, sorry! Max On Fri, Jul 4, 2008 at 8:05 AM, Michael Maddison < michael at ddisolutions.com.au> wrote: > Wrong list I think Max... > > William, > As to why its an issue I guess its because forms are partial classes, so > it is legal and valid > to have more then 1 cs file with the same class name. Refactor changes > all names within the > namespace, so change the namespace then rename then change the namespace > back. You will > need to change the namespace in the designer as well. > > cheers > > MM > > > Or ExportAs Text and then ImportAsText aka EATBloat. > Max > > > On Thu, Jul 3, 2008 at 1:22 PM, William Hindman > > wrote: > > > ...either way, its really annoying that ms can't get a simple > > copy/paste/rename right and propagate the name change throughout the > > module and forms ...if they can do intellisense, why not a very basic > > > thing like this :( > > > > William > > > > -------------------------------------------------- > > From: "Charlotte Foust" > > Sent: Wednesday, July 02, 2008 7:34 PM > > To: "Discussion concerning Visual Basic and related programming > issues." > > > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > > If you're really hot to copy a form (I've had a few that I didn't > > > want to recreate by copy and paste for very complex reasons), you > > > can simply copy the files for that form to someplace like a temp > > > folder and rename it. Course, you have to go into the modules and > > > make sure the rename gets propagated throughout the class and > > > designer code. Then just use Add Existing Item from the menu and > > > browse to the class for your renamed form. > > > > > > Charlotte Foust > > > > > > -----Original Message----- > > > From: dba-vb-bounces at databaseadvisors.com > > > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav > > > Brock > > > Sent: Wednesday, July 02, 2008 9:31 AM > > > To: dba-vb at databaseadvisors.com > > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > > > Hi William > > > > > > That brings some relief - I thought I was missing something obvious. > > > > > > I'll try your method next time. > > > > > > /gustav > > > > > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > > > Gustav > > > > > > ...I never "copy" a form outright ...I found it cited as a bad > > > practice on a "best practices" list when I first got into vs5 ...it > > > supposedly led to all kinds of problems down the line ...my practice > > > > is to first create a new form in VS and then to copy the contents of > > > > the original to the new leaving what vs created alone ...I've not > > > had any problems with this (knock on wood) and its "almost" as easy > > > as copying and renaming a form. > > > > > > ...I assumed ms would have fixed such an obvious problem in vs8 but > > > then I've been assuming such in Access since A97 days ...and what do > > > > I have to show for such faith? ...a ribbon! :( > > > > > > William > > > "My friends, we live in the greatest country in the world. Please > > > join with me as we try to change it." Obama > > > > > > > > > -------------------------------------------------- > > > From: "Gustav Brock" > > > Sent: Wednesday, June 25, 2008 3:34 AM > > > To: > > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > > >> Hi William > > >> > > >> I have done so. Same issue. Or am I missing something? > > >> > > >> /gustav > > >> > > >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > > >> ...upgrade to vs2008 :) > > >> > > >> William > > >> "Sen. McCain will bring a lifetime of experience to the campaign... > > > Sen. > > >> Obama will bring a speech that he gave." Hillary Clinton > > >> > > >> -------------------------------------------------- > > >> From: "Gustav Brock" > > >> Sent: Tuesday, June 24, 2008 12:09 PM > > >> To: > > >> Subject: Re: [dba-VB] VB.Net 2005 copy a form > > >> > > >>> Hi John > > >>> > > >>> You can copy and paste the .cs file in the Solution Explorer pane. > > > The > > >>> copy will be renamed and you can rename that to what you want. > > >>> > > >>> However, if you in the Properties pane later rename the copy of > > >>> form > > > to > > >>> the new name, I've found that the refactoring mechanics will > > >>> rename references to your form not only in the .Designer.cs file > > >>> (correct) > > > but > > >>> also in the original .Designer.cs file (really nasty)! What do > > >>> others > > > do? > > >>> > > >>> /gustav > > >>> > > >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> > > >>> Hi All > > >>> > > >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ > > > controls. > > >>> I need a very similar form and It seems a real drag to type that > > >>> lot > > > again. > > >>> Any sugesstions? > > >>> > > >>> TIA > > >>> > > >>> johnc > > > > > > > > > > > > _______________________________________________ > > > dba-VB mailing list > > > dba-VB at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > > http://www.databaseadvisors.com > > > > > > > > > _______________________________________________ > > > dba-VB mailing list > > > dba-VB at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > > http://www.databaseadvisors.com > > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From Gustav at cactus.dk Mon Jul 7 09:48:09 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 07 Jul 2008 16:48:09 +0200 Subject: [dba-VB] Visual Studio: NumericUpDown control Message-ID: Hi all If I change the Minimum property of this, the ValueChanged event fires. Is this true? I would expect it to fire only at a change of the Value property of the control. Is there any way to distinguish between a change of Value and Minimum (and Maximum I guess, though I don't manipulate that property)? /gustav From paul.hartland at googlemail.com Thu Jul 10 05:58:31 2008 From: paul.hartland at googlemail.com (Paul Hartland) Date: Thu, 10 Jul 2008 11:58:31 +0100 Subject: [dba-VB] Trapping Errors When Trying To Get Distance Using MapPoint 2006 Message-ID: <38c884770807100358m68737a45rd9e67471d5aff979@mail.gmail.com> To all, I have just started a VB6 app that using MapPoint 2006 to calculate a few driving distances when required. The actual driving distance calculator is in a function, on which I have put some very simple error trapping. However when I pass a postcode (in one case B18 2PX) I get the error message (which bypasses my error trapping) as below: Run-time error '-2147181454 (80049c72)': The requested member of the collection does not exist. Use a valid name or index number. This is one of a few it errors on, all others work fine, but has anyone any idea why this isn't being picked up by my error trapping: Function GetDrivingDistance() On Error Goto MileageCalcError drivingdistancecode ResumeOnErrorHere savemap exitmappointapplication Exit Function MileageCalcError: Resume ResumeOnErrorHere End Function Thanks in advance for any help on this ..... -- Paul Hartland paul.hartland at googlemail.com From Johncliviger at aol.com Thu Jul 10 13:23:43 2008 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Thu, 10 Jul 2008 14:23:43 EDT Subject: [dba-VB] Datagridview in vb.net 2005 Message-ID: Hi All Is possible in datagridview to subtract a finish Date from a start Date and show the result in a unbound column on the same row by using the Expression property. If it is an example will be most useful TIA johnc From cfoust at infostatsystems.com Thu Jul 10 18:19:13 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Thu, 10 Jul 2008 16:19:13 -0700 Subject: [dba-VB] Datagridview in vb.net 2005 In-Reply-To: References: Message-ID: It should be possible. We do similar things with Infragistics grids, which are based on the vanilla Winforms variety. The expression/formula for the unbound column should probably be something like [FinishDate] - [StartDate]. However, that assumes all dates are populated. Are they? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Johncliviger at aol.com Sent: Thursday, July 10, 2008 11:24 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Datagridview in vb.net 2005 Hi All Is possible in datagridview to subtract a finish Date from a start Date and show the result in a unbound column on the same row by using the Expression property. If it is an example will be most useful TIA johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Johncliviger at aol.com Fri Jul 11 03:34:00 2008 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Fri, 11 Jul 2008 04:34:00 EDT Subject: [dba-VB] Datagridview in vb.net 2005 Message-ID: Hi Charlotte Yes all dates are populated. But what if there not? johnc From wdhindman at dejpolsystems.com Fri Jul 11 15:01:09 2008 From: wdhindman at dejpolsystems.com (William Hindman) Date: Fri, 11 Jul 2008 16:01:09 -0400 Subject: [dba-VB] Datagridview in vb.net 2005 References: Message-ID: <49ACF872F5124FC893FBDD608883980A@jislaptopdev> http://www.dreamincode.net/forums/showtopic41981.htm William -------------------------------------------------- From: Sent: Thursday, July 10, 2008 2:23 PM To: Subject: [dba-VB] Datagridview in vb.net 2005 > Hi All > Is possible in datagridview to subtract a finish Date from a start Date > and > show the result in a unbound column on the same row by using the > Expression > property. > > If it is an example will be most useful > > TIA > > johnc > > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From cfoust at infostatsystems.com Mon Jul 14 10:41:40 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 14 Jul 2008 08:41:40 -0700 Subject: [dba-VB] Datagridview in vb.net 2005 In-Reply-To: References: Message-ID: Then you'll probably get midnight and you can check for Date.MinValue to see whether you want to use it. I generally use a hidden expression column and then use code in the RowInitialize event to populate a visible unbound column appropriately. But we do some pretty exotic stuff with our grids. You can also use a typed dataset that includes an expression field in the dataset and then calculate based on that expression rather than doing it at the grid level. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Johncliviger at aol.com Sent: Friday, July 11, 2008 1:34 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Datagridview in vb.net 2005 Hi Charlotte Yes all dates are populated. But what if there not? johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Johncliviger at aol.com Tue Jul 15 04:01:41 2008 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Tue, 15 Jul 2008 05:01:41 EDT Subject: [dba-VB] Datagridview in vb.net 2005 Message-ID: Charlotte Thanks for the datagrid tips johnc From john at winhaven.net Tue Jul 15 16:39:40 2008 From: john at winhaven.net (John Bartow) Date: Tue, 15 Jul 2008 16:39:40 -0500 Subject: [dba-VB] Paging Chris Mackin Message-ID: <200807152139.m6FLdS9r022604@databaseadvisors.com> Does anyone know Chris new email address? John Bartow, President Database Advisors, Inc. Email: mailto:president at databaseadvisors.com Website: http://www.databaseadvisors.com From michael at ddisolutions.com.au Tue Jul 15 18:54:08 2008 From: michael at ddisolutions.com.au (Michael Maddison) Date: Wed, 16 Jul 2008 09:54:08 +1000 Subject: [dba-VB] Datagridview in vb.net 2005 References: Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D013BFCA8@ddi-01.DDI.local> FYI, There is a doc called DataGridView FAQ.doc floating about the www. Has lots of useful info for dealing with the DGV. cheers Michael M Charlotte Thanks for the datagrid tips johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Wed Jul 23 10:40:19 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 23 Jul 2008 17:40:19 +0200 Subject: [dba-VB] C#: this.prefix Message-ID: Hi Shamil et al Sorry to return to this perhaps pedantic question, but I noticed that the auto generated code in the .Designer.cs files are 100% flooded with either the this. prefix or the full namespace. Why would the generator do this if it was not necessary? Is it just being overcautious? /gustav >>> shamil at smsconsulting.spb.ru 02-07-2008 18:57 >>> Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav From shamil at smsconsulting.spb.ru Wed Jul 23 14:06:11 2008 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 23 Jul 2008 23:06:11 +0400 Subject: [dba-VB] C#: this.prefix In-Reply-To: Message-ID: <1c6301c8ecf7$2bf4a630$6401a8c0@nant> Hi Gustav, That's waste of HDD space for sure IMO. Probably somebody "paranoid" and overcautious with VB6/VBA programming experience background did write this code generator at MS. I'm serious :) FYI: I almost never use this. in my C# coding - I do use camelCase naming conventions and it works very well for me - never had any confusion with scope, as well as my VS2005/VS2008 C# compiler :) Here is the case when this. *is* necessary - but this (pun intended:)) is a bad coding style: public class ThatParent { public string Name = "Parent Name"; } public class ThisChild : ThatParent { public new string Name = "Child Name"; public void Test() { Console.WriteLine("Parent:" + base.Name); Console.WriteLine("Child:" + this.Name); Console.WriteLine("Whose name is this ?:" + Name); } } They (MS) do generate this. everywhere to prevent confusions like that one above as controls' names could be similar to the names of the properties and methods in WinForm class inheritance hierarchy: System..::.Object System..::.MarshalByRefObject System.ComponentModel..::.Component System.Windows.Forms..::.Control System.Windows.Forms..::.ScrollableControl System.Windows.Forms..::.ContainerControl System.Windows.Forms..::.Form Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 23, 2008 7:40 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] C#: this.prefix Hi Shamil et al Sorry to return to this perhaps pedantic question, but I noticed that the auto generated code in the .Designer.cs files are 100% flooded with either the this. prefix or the full namespace. Why would the generator do this if it was not necessary? Is it just being overcautious? /gustav >>> shamil at smsconsulting.spb.ru 02-07-2008 18:57 >>> Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Wed Jul 23 15:24:50 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 23 Jul 2008 22:24:50 +0200 Subject: [dba-VB] C#: this.prefix Message-ID: Hi Shamil Thanks. That explains. I guess MS has considered this and concluded that the cost in consumed disk space is well worth avoiding the possible confusion from name conflicts. /gustav >>> shamil at smsconsulting.spb.ru 23-07-2008 21:06 >>> Hi Gustav, That's waste of HDD space for sure IMO. Probably somebody "paranoid" and overcautious with VB6/VBA programming experience background did write this code generator at MS. I'm serious :) FYI: I almost never use this. in my C# coding - I do use camelCase naming conventions and it works very well for me - never had any confusion with scope, as well as my VS2005/VS2008 C# compiler :) Here is the case when this. *is* necessary - but this (pun intended:)) is a bad coding style: public class ThatParent { public string Name = "Parent Name"; } public class ThisChild : ThatParent { public new string Name = "Child Name"; public void Test() { Console.WriteLine("Parent:" + base.Name); Console.WriteLine("Child:" + this.Name); Console.WriteLine("Whose name is this ?:" + Name); } } They (MS) do generate this. everywhere to prevent confusions like that one above as controls' names could be similar to the names of the properties and methods in WinForm class inheritance hierarchy: System..::.Object System..::.MarshalByRefObject System.ComponentModel..::.Component System.Windows.Forms..::.Control System.Windows.Forms..::.ScrollableControl System.Windows.Forms..::.ContainerControl System.Windows.Forms..::.Form Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 23, 2008 7:40 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] C#: this.prefix Hi Shamil et al Sorry to return to this perhaps pedantic question, but I noticed that the auto generated code in the .Designer.cs files are 100% flooded with either the this. prefix or the full namespace. Why would the generator do this if it was not necessary? Is it just being overcautious? /gustav >>> shamil at smsconsulting.spb.ru 02-07-2008 18:57 >>> Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav From paul.hartland at googlemail.com Thu Jul 24 03:56:04 2008 From: paul.hartland at googlemail.com (Paul Hartland) Date: Thu, 24 Jul 2008 09:56:04 +0100 Subject: [dba-VB] OT - Cross Post Learning VB.Net Message-ID: <38c884770807240156t17f628bbw3dd7935cd80df20d@mail.gmail.com> To all, I want to start learning Visual Basic .Net, I did download VB 2005 Express, C++ 2005 Express, C# 2005 Express & SQL Server 2005 Express, but unfortunately didn't actually get around to playing with them. I have noticed that 2008 Express editions are now available, would it be worth using these instead of the 2005 Express editions ? Also, I would class myself as an intermediate to advanced VB6 developer, does anyone have any good suggestions on books, free web tutuorials that would get me started, I don't mind going right back to the beginning if I have to to learn this, as I am falling behind a long way. Oops another thought, does anyone know if there is anything like an ASP.Net Express edition or similar (or am I being thick lol) Thanks in advance for any help on this.... -- Paul Hartland paul.hartland at googlemail.com From robert at webedb.com Thu Jul 24 22:20:03 2008 From: robert at webedb.com (Robert L. Stewart) Date: Thu, 24 Jul 2008 22:20:03 -0500 Subject: [dba-VB] Cross Post Learning VB.Net In-Reply-To: References: Message-ID: <200807250320.m6P3KYtV028389@databaseadvisors.com> Paul, That would be the Visual Web Developer. Yes, I would go to the 2008 versions since you are starting out. I would go with the Step-By-Step books as a start. Robert At 12:00 PM 7/24/2008, you wrote: >Date: Thu, 24 Jul 2008 09:56:04 +0100 >From: "Paul Hartland" >Subject: [dba-VB] OT - Cross Post Learning VB.Net >To: VisualBasicList , "Access List" > >Message-ID: > <38c884770807240156t17f628bbw3dd7935cd80df20d at mail.gmail.com> >Content-Type: text/plain; charset=ISO-8859-1 > >To all, > >I want to start learning Visual Basic .Net, I did download VB 2005 Express, >C++ 2005 Express, C# 2005 Express & SQL Server 2005 Express, but >unfortunately didn't actually get around to playing with them. > >I have noticed that 2008 Express editions are now available, would it be >worth using these instead of the 2005 Express editions ? > >Also, I would class myself as an intermediate to advanced VB6 developer, >does anyone have any good suggestions on books, free web tutuorials that >would get me started, I don't mind going right back to the beginning if I >have to to learn this, as I am falling behind a long way. > >Oops another thought, does anyone know if there is anything like an ASP.Net >Express edition or similar (or am I being thick lol) > >Thanks in advance for any help on this.... > >-- >Paul Hartland >paul.hartland at googlemail.com From Johncliviger at aol.com Mon Jul 28 03:50:35 2008 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Mon, 28 Jul 2008 04:50:35 EDT Subject: [dba-VB] VB2005 DatagridView with unbound calculated fields Message-ID: Hi All I have a form with a parent and child grids. On the child grid I have 2 unbound calculated fields. And everything works fine. What I need to do is add a subtotal field for 1 of the calculated fields. And the subtotal to appear in a textbox on the form for each parent. Anyone seen this before? Any sites that may explain how to do it? TIA johnc From paul.hartland at googlemail.com Wed Jul 30 04:56:11 2008 From: paul.hartland at googlemail.com (Paul Hartland) Date: Wed, 30 Jul 2008 10:56:11 +0100 Subject: [dba-VB] Visual Basic 6.0 Control CardScan Scanner Message-ID: <38c884770807300256o5b4c26a8s347c2a461d31bba8@mail.gmail.com> To all, We have started scanning personnel photo's onto our employee database, I am using Visual Basic 6.0 and the business card scanner CardScan 800c. It works but is a bit clumsy i.e. when we scan a phto the user clicks a button which runs a macro to represent the keystrokes etc required by the CardScan software to process & save the employee's photo. The macro works by firing events/keystrokes depending on the name of the currently open CardScan window, however we now want our European divisions in Belgium & Netherlands to do this as well, the problem being that the macro will not recognise the window name as it will not be in English. Has anyone ever worked with CardScan scanning devices, so that perhaps I could use some sort of general driver to control the CardScan scanner and save the picture. The closest I have came is using GDTwain, which lets me tell the unit to scan and save the picture, but I don't seem to be able to control the resolution etc of the photos. Any help on this will be appreciated, and thank you in advance for any help on this.... -- Paul Hartland paul.hartland at googlemail.com From Gustav at cactus.dk Wed Jul 30 05:36:17 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 30 Jul 2008 12:36:17 +0200 Subject: [dba-VB] Visual Basic 6.0 Control CardScan Scanner Message-ID: Hi Paul Sounds like a job for csXImage which I have recommend several times: http://www.chestysoft.com/ximage/default.asp A fully functional trial is available for download. Scanners - not to say their buggy drivers - are nasty and unpredictable animals, and you will most likely - as I did - need the excellent support from Simon Chester. I believe he knows just about anything about scanners and their misbehaving. /gustav >>> paul.hartland at googlemail.com 30-07-2008 11:56 >>> To all, We have started scanning personnel photo's onto our employee database, I am using Visual Basic 6.0 and the business card scanner CardScan 800c. It works but is a bit clumsy i.e. when we scan a phto the user clicks a button which runs a macro to represent the keystrokes etc required by the CardScan software to process & save the employee's photo. The macro works by firing events/keystrokes depending on the name of the currently open CardScan window, however we now want our European divisions in Belgium & Netherlands to do this as well, the problem being that the macro will not recognise the window name as it will not be in English. Has anyone ever worked with CardScan scanning devices, so that perhaps I could use some sort of general driver to control the CardScan scanner and save the picture. The closest I have came is using GDTwain, which lets me tell the unit to scan and save the picture, but I don't seem to be able to control the resolution etc of the photos. Any help on this will be appreciated, and thank you in advance for any help on this.... -- Paul Hartland paul.hartland at googlemail.com From paul.hartland at googlemail.com Wed Jul 30 05:48:36 2008 From: paul.hartland at googlemail.com (Paul Hartland) Date: Wed, 30 Jul 2008 11:48:36 +0100 Subject: [dba-VB] Visual Basic 6.0 Control CardScan Scanner In-Reply-To: References: Message-ID: <38c884770807300348k718230a8s738e205140676a5@mail.gmail.com> Thank you Gustav, just downloaded it so will have a look.... 2008/7/30 Gustav Brock > Hi Paul > > Sounds like a job for csXImage which I have recommend several times: > > http://www.chestysoft.com/ximage/default.asp > > A fully functional trial is available for download. > > Scanners - not to say their buggy drivers - are nasty and unpredictable > animals, and you will most likely - as I did - need the excellent support > from Simon Chester. I believe he knows just about anything about scanners > and their misbehaving. > > /gustav > > >>> paul.hartland at googlemail.com 30-07-2008 11:56 >>> > To all, > > We have started scanning personnel photo's onto our employee database, I am > using Visual Basic 6.0 and the business card scanner CardScan 800c. It > works but is a bit clumsy i.e. when we scan a phto the user clicks a button > which runs a macro to represent the keystrokes etc required by the CardScan > software to process & save the employee's photo. The macro works by firing > events/keystrokes depending on the name of the currently open CardScan > window, however we now want our European divisions in Belgium & Netherlands > to do this as well, the problem being that the macro will not recognise the > window name as it will not be in English. > > Has anyone ever worked with CardScan scanning devices, so that perhaps I > could use some sort of general driver to control the CardScan scanner and > save the picture. The closest I have came is using GDTwain, which lets me > tell the unit to scan and save the picture, but I don't seem to be able to > control the resolution etc of the photos. > > Any help on this will be appreciated, and thank you in advance for any help > on this.... > > -- > Paul Hartland > paul.hartland at googlemail.com > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > -- Paul Hartland paul.hartland at googlemail.com From cfoust at infostatsystems.com Thu Jul 31 10:30:51 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Thu, 31 Jul 2008 08:30:51 -0700 Subject: [dba-VB] VB2005 DatagridView with unbound calculated fields In-Reply-To: References: Message-ID: I'm not sure I understand. You want the subtotal to appear on the parent form, not in the parent grid, right? That should only take creating a dataset (or reference the datasource of the child grid and cast it as the appropriate object type) and then doing a compute on it to sum the value of the column in the child. You'd raise an event from the child grid if the value changed and a handler in the parent form would then recalculate the subtotal. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Johncliviger at aol.com Sent: Monday, July 28, 2008 1:51 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB2005 DatagridView with unbound calculated fields Hi All I have a form with a parent and child grids. On the child grid I have 2 unbound calculated fields. And everything works fine. What I need to do is add a subtotal field for 1 of the calculated fields. And the subtotal to appear in a textbox on the form for each parent. Anyone seen this before? Any sites that may explain how to do it? TIA johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Wed Jul 2 10:54:58 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 02 Jul 2008 17:54:58 +0200 Subject: [dba-VB] C#: this.prefix Message-ID: Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav From wdhindman at dejpolsystems.com Wed Jul 2 11:12:45 2008 From: wdhindman at dejpolsystems.com (William Hindman) Date: Wed, 2 Jul 2008 12:12:45 -0400 Subject: [dba-VB] VB.Net 2005 copy a form References: Message-ID: <572DA58D1F8F4E1E865FA20E43C52CAA@jislaptopdev> Gustav ...I never "copy" a form outright ...I found it cited as a bad practice on a "best practices" list when I first got into vs5 ...it supposedly led to all kinds of problems down the line ...my practice is to first create a new form in VS and then to copy the contents of the original to the new leaving what vs created alone ...I've not had any problems with this (knock on wood) and its "almost" as easy as copying and renaming a form. ...I assumed ms would have fixed such an obvious problem in vs8 but then I've been assuming such in Access since A97 days ...and what do I have to show for such faith? ...a ribbon! :( William "My friends, we live in the greatest country in the world. Please join with me as we try to change it." Obama -------------------------------------------------- From: "Gustav Brock" Sent: Wednesday, June 25, 2008 3:34 AM To: Subject: Re: [dba-VB] VB.Net 2005 copy a form > Hi William > > I have done so. Same issue. Or am I missing something? > > /gustav > >>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > ...upgrade to vs2008 :) > > William > "Sen. McCain will bring a lifetime of experience to the campaign... Sen. > Obama will bring a speech that he gave." Hillary Clinton > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Tuesday, June 24, 2008 12:09 PM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi John >> >> You can copy and paste the .cs file in the Solution Explorer pane. The >> copy will be renamed and you can rename that to what you want. >> >> However, if you in the Properties pane later rename the copy of form to >> the new name, I've found that the refactoring mechanics will rename >> references to your form not only in the .Designer.cs file (correct) but >> also in the original .Designer.cs file (really nasty)! What do others do? >> >> /gustav >> >>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >> Hi All >> >> How do you copy a Form in VB.Net 2005? I have a form with 100+ >> controls. >> I need a very similar form and It seems a real drag to type that lot >> again. >> Any sugesstions? >> >> TIA >> >> johnc > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From Gustav at cactus.dk Wed Jul 2 11:30:42 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 02 Jul 2008 18:30:42 +0200 Subject: [dba-VB] VB.Net 2005 copy a form Message-ID: Hi William That brings some relief - I thought I was missing something obvious. I'll try your method next time. /gustav >>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> Gustav ...I never "copy" a form outright ...I found it cited as a bad practice on a "best practices" list when I first got into vs5 ...it supposedly led to all kinds of problems down the line ...my practice is to first create a new form in VS and then to copy the contents of the original to the new leaving what vs created alone ...I've not had any problems with this (knock on wood) and its "almost" as easy as copying and renaming a form. ...I assumed ms would have fixed such an obvious problem in vs8 but then I've been assuming such in Access since A97 days ...and what do I have to show for such faith? ...a ribbon! :( William "My friends, we live in the greatest country in the world. Please join with me as we try to change it." Obama -------------------------------------------------- From: "Gustav Brock" Sent: Wednesday, June 25, 2008 3:34 AM To: Subject: Re: [dba-VB] VB.Net 2005 copy a form > Hi William > > I have done so. Same issue. Or am I missing something? > > /gustav > >>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > ...upgrade to vs2008 :) > > William > "Sen. McCain will bring a lifetime of experience to the campaign... Sen. > Obama will bring a speech that he gave." Hillary Clinton > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Tuesday, June 24, 2008 12:09 PM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi John >> >> You can copy and paste the .cs file in the Solution Explorer pane. The >> copy will be renamed and you can rename that to what you want. >> >> However, if you in the Properties pane later rename the copy of form to >> the new name, I've found that the refactoring mechanics will rename >> references to your form not only in the .Designer.cs file (correct) but >> also in the original .Designer.cs file (really nasty)! What do others do? >> >> /gustav >> >>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >> Hi All >> >> How do you copy a Form in VB.Net 2005? I have a form with 100+ controls. >> I need a very similar form and It seems a real drag to type that lot again. >> Any sugesstions? >> >> TIA >> >> johnc From shamil at smsconsulting.spb.ru Wed Jul 2 11:57:06 2008 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 2 Jul 2008 20:57:06 +0400 Subject: [dba-VB] C#: this.prefix In-Reply-To: Message-ID: <09f701c8dc64$a87fb080$6401a8c0@nant> Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From davidmcafee at gmail.com Wed Jul 2 12:00:23 2008 From: davidmcafee at gmail.com (David McAfee) Date: Wed, 2 Jul 2008 10:00:23 -0700 Subject: [dba-VB] C#: this.prefix In-Reply-To: References: Message-ID: <8786a4c00807021000g7dfa4d50l79887245b8f41e37@mail.gmail.com> Same here, I use it out of (an old) habit from "Me." in VBA, on forms. On Wed, Jul 2, 2008 at 8:54 AM, Gustav Brock wrote: > Hi all > > How rigorously are you prefixing controls and variables with "this."? > > Is it a good or bad coding practice to use it when not strictly needed? > Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? > > I've found, that I use it a lot - old habit from "Me." in VBA, I guess. > > /gustav > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From wdhindman at dejpolsystems.com Wed Jul 2 15:46:51 2008 From: wdhindman at dejpolsystems.com (William Hindman) Date: Wed, 2 Jul 2008 16:46:51 -0400 Subject: [dba-VB] VB.Net 2005 copy a form References: Message-ID: <11A2F20AE0B143519C50E0A3E043028F@jislaptopdev> ...damn ...sorry about the sig :( William -------------------------------------------------- From: "Gustav Brock" Sent: Wednesday, July 02, 2008 12:30 PM To: Subject: Re: [dba-VB] VB.Net 2005 copy a form > Hi William > > That brings some relief - I thought I was missing something obvious. > > I'll try your method next time. > > /gustav > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > Gustav > > ...I never "copy" a form outright ...I found it cited as a bad practice on > a > "best practices" list when I first got into vs5 ...it supposedly led to > all > kinds of problems down the line ...my practice is to first create a new > form > in VS and then to copy the contents of the original to the new leaving > what > vs created alone ...I've not had any problems with this (knock on wood) > and > its "almost" as easy as copying and renaming a form. > > ...I assumed ms would have fixed such an obvious problem in vs8 but then > I've been assuming such in Access since A97 days ...and what do I have to > show for such faith? ...a ribbon! :( > > William > "My friends, we live in the greatest country in the world. Please join > with > me as we try to change it." Obama > > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Wednesday, June 25, 2008 3:34 AM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi William >> >> I have done so. Same issue. Or am I missing something? >> >> /gustav >> >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> >> ...upgrade to vs2008 :) >> >> William >> "Sen. McCain will bring a lifetime of experience to the campaign... Sen. >> Obama will bring a speech that he gave." Hillary Clinton >> >> -------------------------------------------------- >> From: "Gustav Brock" >> Sent: Tuesday, June 24, 2008 12:09 PM >> To: >> Subject: Re: [dba-VB] VB.Net 2005 copy a form >> >>> Hi John >>> >>> You can copy and paste the .cs file in the Solution Explorer pane. The >>> copy will be renamed and you can rename that to what you want. >>> >>> However, if you in the Properties pane later rename the copy of form to >>> the new name, I've found that the refactoring mechanics will rename >>> references to your form not only in the .Designer.cs file (correct) but >>> also in the original .Designer.cs file (really nasty)! What do others >>> do? >>> >>> /gustav >>> >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >>> Hi All >>> >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ >>> controls. >>> I need a very similar form and It seems a real drag to type that lot >>> again. >>> Any sugesstions? >>> >>> TIA >>> >>> johnc > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From cfoust at infostatsystems.com Wed Jul 2 18:34:39 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 2 Jul 2008 16:34:39 -0700 Subject: [dba-VB] VB.Net 2005 copy a form In-Reply-To: References: Message-ID: If you're really hot to copy a form (I've had a few that I didn't want to recreate by copy and paste for very complex reasons), you can simply copy the files for that form to someplace like a temp folder and rename it. Course, you have to go into the modules and make sure the rename gets propagated throughout the class and designer code. Then just use Add Existing Item from the menu and browse to the class for your renamed form. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 9:31 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] VB.Net 2005 copy a form Hi William That brings some relief - I thought I was missing something obvious. I'll try your method next time. /gustav >>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> Gustav ...I never "copy" a form outright ...I found it cited as a bad practice on a "best practices" list when I first got into vs5 ...it supposedly led to all kinds of problems down the line ...my practice is to first create a new form in VS and then to copy the contents of the original to the new leaving what vs created alone ...I've not had any problems with this (knock on wood) and its "almost" as easy as copying and renaming a form. ...I assumed ms would have fixed such an obvious problem in vs8 but then I've been assuming such in Access since A97 days ...and what do I have to show for such faith? ...a ribbon! :( William "My friends, we live in the greatest country in the world. Please join with me as we try to change it." Obama -------------------------------------------------- From: "Gustav Brock" Sent: Wednesday, June 25, 2008 3:34 AM To: Subject: Re: [dba-VB] VB.Net 2005 copy a form > Hi William > > I have done so. Same issue. Or am I missing something? > > /gustav > >>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > ...upgrade to vs2008 :) > > William > "Sen. McCain will bring a lifetime of experience to the campaign... Sen. > Obama will bring a speech that he gave." Hillary Clinton > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Tuesday, June 24, 2008 12:09 PM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi John >> >> You can copy and paste the .cs file in the Solution Explorer pane. The >> copy will be renamed and you can rename that to what you want. >> >> However, if you in the Properties pane later rename the copy of form to >> the new name, I've found that the refactoring mechanics will rename >> references to your form not only in the .Designer.cs file (correct) but >> also in the original .Designer.cs file (really nasty)! What do others do? >> >> /gustav >> >>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >> Hi All >> >> How do you copy a Form in VB.Net 2005? I have a form with 100+ controls. >> I need a very similar form and It seems a real drag to type that lot again. >> Any sugesstions? >> >> TIA >> >> johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Wed Jul 2 18:37:36 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 2 Jul 2008 16:37:36 -0700 Subject: [dba-VB] C#: this.prefix In-Reply-To: <09f701c8dc64$a87fb080$6401a8c0@nant> References: <09f701c8dc64$a87fb080$6401a8c0@nant> Message-ID: We use camcelcase postfix for objects and I still HATE it! We name things so they sort alpha but sometimes the names aren't very illuminating until you get to the tag end, which makes it wearing to search through the list for something you can't quite recall the name of. We use a variant of Hungarian within the code, although that has become hit or miss since .Net too. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Wednesday, July 02, 2008 9:57 AM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: Re: [dba-VB] C#: this.prefix Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From wdhindman at dejpolsystems.com Thu Jul 3 07:22:08 2008 From: wdhindman at dejpolsystems.com (William Hindman) Date: Thu, 3 Jul 2008 08:22:08 -0400 Subject: [dba-VB] VB.Net 2005 copy a form References: Message-ID: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> ...either way, its really annoying that ms can't get a simple copy/paste/rename right and propagate the name change throughout the module and forms ...if they can do intellisense, why not a very basic thing like this :( William -------------------------------------------------- From: "Charlotte Foust" Sent: Wednesday, July 02, 2008 7:34 PM To: "Discussion concerning Visual Basic and related programming issues." Subject: Re: [dba-VB] VB.Net 2005 copy a form > If you're really hot to copy a form (I've had a few that I didn't want > to recreate by copy and paste for very complex reasons), you can simply > copy the files for that form to someplace like a temp folder and rename > it. Course, you have to go into the modules and make sure the rename > gets propagated throughout the class and designer code. Then just use > Add Existing Item from the menu and browse to the class for your renamed > form. > > Charlotte Foust > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Wednesday, July 02, 2008 9:31 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > Hi William > > That brings some relief - I thought I was missing something obvious. > > I'll try your method next time. > > /gustav > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > Gustav > > ...I never "copy" a form outright ...I found it cited as a bad practice > on a "best practices" list when I first got into vs5 ...it supposedly > led to all kinds of problems down the line ...my practice is to first > create a new form in VS and then to copy the contents of the original to > the new leaving what vs created alone ...I've not had any problems with > this (knock on wood) and its "almost" as easy as copying and renaming a > form. > > ...I assumed ms would have fixed such an obvious problem in vs8 but then > I've been assuming such in Access since A97 days ...and what do I have > to show for such faith? ...a ribbon! :( > > William > "My friends, we live in the greatest country in the world. Please join > with me as we try to change it." Obama > > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Wednesday, June 25, 2008 3:34 AM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi William >> >> I have done so. Same issue. Or am I missing something? >> >> /gustav >> >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> >> ...upgrade to vs2008 :) >> >> William >> "Sen. McCain will bring a lifetime of experience to the campaign... > Sen. >> Obama will bring a speech that he gave." Hillary Clinton >> >> -------------------------------------------------- >> From: "Gustav Brock" >> Sent: Tuesday, June 24, 2008 12:09 PM >> To: >> Subject: Re: [dba-VB] VB.Net 2005 copy a form >> >>> Hi John >>> >>> You can copy and paste the .cs file in the Solution Explorer pane. > The >>> copy will be renamed and you can rename that to what you want. >>> >>> However, if you in the Properties pane later rename the copy of form > to >>> the new name, I've found that the refactoring mechanics will rename >>> references to your form not only in the .Designer.cs file (correct) > but >>> also in the original .Designer.cs file (really nasty)! What do others > do? >>> >>> /gustav >>> >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >>> Hi All >>> >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ > controls. >>> I need a very similar form and It seems a real drag to type that lot > again. >>> Any sugesstions? >>> >>> TIA >>> >>> johnc > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From max.wanadoo at gmail.com Thu Jul 3 08:51:06 2008 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Thu, 3 Jul 2008 14:51:06 +0100 Subject: [dba-VB] VB.Net 2005 copy a form In-Reply-To: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> References: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> Message-ID: Or ExportAs Text and then ImportAsText aka EATBloat. Max On Thu, Jul 3, 2008 at 1:22 PM, William Hindman wrote: > ...either way, its really annoying that ms can't get a simple > copy/paste/rename right and propagate the name change throughout the module > and forms ...if they can do intellisense, why not a very basic thing like > this :( > > William > > -------------------------------------------------- > From: "Charlotte Foust" > Sent: Wednesday, July 02, 2008 7:34 PM > To: "Discussion concerning Visual Basic and related programming issues." > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > If you're really hot to copy a form (I've had a few that I didn't want > > to recreate by copy and paste for very complex reasons), you can simply > > copy the files for that form to someplace like a temp folder and rename > > it. Course, you have to go into the modules and make sure the rename > > gets propagated throughout the class and designer code. Then just use > > Add Existing Item from the menu and browse to the class for your renamed > > form. > > > > Charlotte Foust > > > > -----Original Message----- > > From: dba-vb-bounces at databaseadvisors.com > > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > > Sent: Wednesday, July 02, 2008 9:31 AM > > To: dba-vb at databaseadvisors.com > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > Hi William > > > > That brings some relief - I thought I was missing something obvious. > > > > I'll try your method next time. > > > > /gustav > > > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > > Gustav > > > > ...I never "copy" a form outright ...I found it cited as a bad practice > > on a "best practices" list when I first got into vs5 ...it supposedly > > led to all kinds of problems down the line ...my practice is to first > > create a new form in VS and then to copy the contents of the original to > > the new leaving what vs created alone ...I've not had any problems with > > this (knock on wood) and its "almost" as easy as copying and renaming a > > form. > > > > ...I assumed ms would have fixed such an obvious problem in vs8 but then > > I've been assuming such in Access since A97 days ...and what do I have > > to show for such faith? ...a ribbon! :( > > > > William > > "My friends, we live in the greatest country in the world. Please join > > with me as we try to change it." Obama > > > > > > -------------------------------------------------- > > From: "Gustav Brock" > > Sent: Wednesday, June 25, 2008 3:34 AM > > To: > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > >> Hi William > >> > >> I have done so. Same issue. Or am I missing something? > >> > >> /gustav > >> > >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > >> ...upgrade to vs2008 :) > >> > >> William > >> "Sen. McCain will bring a lifetime of experience to the campaign... > > Sen. > >> Obama will bring a speech that he gave." Hillary Clinton > >> > >> -------------------------------------------------- > >> From: "Gustav Brock" > >> Sent: Tuesday, June 24, 2008 12:09 PM > >> To: > >> Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> > >>> Hi John > >>> > >>> You can copy and paste the .cs file in the Solution Explorer pane. > > The > >>> copy will be renamed and you can rename that to what you want. > >>> > >>> However, if you in the Properties pane later rename the copy of form > > to > >>> the new name, I've found that the refactoring mechanics will rename > >>> references to your form not only in the .Designer.cs file (correct) > > but > >>> also in the original .Designer.cs file (really nasty)! What do others > > do? > >>> > >>> /gustav > >>> > >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> > >>> Hi All > >>> > >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ > > controls. > >>> I need a very similar form and It seems a real drag to type that lot > > again. > >>> Any sugesstions? > >>> > >>> TIA > >>> > >>> johnc > > > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From michael at ddisolutions.com.au Fri Jul 4 02:05:48 2008 From: michael at ddisolutions.com.au (Michael Maddison) Date: Fri, 4 Jul 2008 17:05:48 +1000 Subject: [dba-VB] VB.Net 2005 copy a form References: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D013BFBCE@ddi-01.DDI.local> Wrong list I think Max... William, As to why its an issue I guess its because forms are partial classes, so it is legal and valid to have more then 1 cs file with the same class name. Refactor changes all names within the namespace, so change the namespace then rename then change the namespace back. You will need to change the namespace in the designer as well. cheers MM Or ExportAs Text and then ImportAsText aka EATBloat. Max On Thu, Jul 3, 2008 at 1:22 PM, William Hindman wrote: > ...either way, its really annoying that ms can't get a simple > copy/paste/rename right and propagate the name change throughout the > module and forms ...if they can do intellisense, why not a very basic > thing like this :( > > William > > -------------------------------------------------- > From: "Charlotte Foust" > Sent: Wednesday, July 02, 2008 7:34 PM > To: "Discussion concerning Visual Basic and related programming issues." > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > If you're really hot to copy a form (I've had a few that I didn't > > want to recreate by copy and paste for very complex reasons), you > > can simply copy the files for that form to someplace like a temp > > folder and rename it. Course, you have to go into the modules and > > make sure the rename gets propagated throughout the class and > > designer code. Then just use Add Existing Item from the menu and > > browse to the class for your renamed form. > > > > Charlotte Foust > > > > -----Original Message----- > > From: dba-vb-bounces at databaseadvisors.com > > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav > > Brock > > Sent: Wednesday, July 02, 2008 9:31 AM > > To: dba-vb at databaseadvisors.com > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > Hi William > > > > That brings some relief - I thought I was missing something obvious. > > > > I'll try your method next time. > > > > /gustav > > > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > > Gustav > > > > ...I never "copy" a form outright ...I found it cited as a bad > > practice on a "best practices" list when I first got into vs5 ...it > > supposedly led to all kinds of problems down the line ...my practice > > is to first create a new form in VS and then to copy the contents of > > the original to the new leaving what vs created alone ...I've not > > had any problems with this (knock on wood) and its "almost" as easy > > as copying and renaming a form. > > > > ...I assumed ms would have fixed such an obvious problem in vs8 but > > then I've been assuming such in Access since A97 days ...and what do > > I have to show for such faith? ...a ribbon! :( > > > > William > > "My friends, we live in the greatest country in the world. Please > > join with me as we try to change it." Obama > > > > > > -------------------------------------------------- > > From: "Gustav Brock" > > Sent: Wednesday, June 25, 2008 3:34 AM > > To: > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > >> Hi William > >> > >> I have done so. Same issue. Or am I missing something? > >> > >> /gustav > >> > >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > >> ...upgrade to vs2008 :) > >> > >> William > >> "Sen. McCain will bring a lifetime of experience to the campaign... > > Sen. > >> Obama will bring a speech that he gave." Hillary Clinton > >> > >> -------------------------------------------------- > >> From: "Gustav Brock" > >> Sent: Tuesday, June 24, 2008 12:09 PM > >> To: > >> Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> > >>> Hi John > >>> > >>> You can copy and paste the .cs file in the Solution Explorer pane. > > The > >>> copy will be renamed and you can rename that to what you want. > >>> > >>> However, if you in the Properties pane later rename the copy of > >>> form > > to > >>> the new name, I've found that the refactoring mechanics will > >>> rename references to your form not only in the .Designer.cs file > >>> (correct) > > but > >>> also in the original .Designer.cs file (really nasty)! What do > >>> others > > do? > >>> > >>> /gustav > >>> > >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> > >>> Hi All > >>> > >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ > > controls. > >>> I need a very similar form and It seems a real drag to type that > >>> lot > > again. > >>> Any sugesstions? > >>> > >>> TIA > >>> > >>> johnc > > > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From max.wanadoo at gmail.com Fri Jul 4 02:56:25 2008 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Fri, 4 Jul 2008 08:56:25 +0100 Subject: [dba-VB] VB.Net 2005 copy a form In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D013BFBCE@ddi-01.DDI.local> References: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> <59A61174B1F5B54B97FD4ADDE71E7D013BFBCE@ddi-01.DDI.local> Message-ID: Yes, sorry! Max On Fri, Jul 4, 2008 at 8:05 AM, Michael Maddison < michael at ddisolutions.com.au> wrote: > Wrong list I think Max... > > William, > As to why its an issue I guess its because forms are partial classes, so > it is legal and valid > to have more then 1 cs file with the same class name. Refactor changes > all names within the > namespace, so change the namespace then rename then change the namespace > back. You will > need to change the namespace in the designer as well. > > cheers > > MM > > > Or ExportAs Text and then ImportAsText aka EATBloat. > Max > > > On Thu, Jul 3, 2008 at 1:22 PM, William Hindman > > wrote: > > > ...either way, its really annoying that ms can't get a simple > > copy/paste/rename right and propagate the name change throughout the > > module and forms ...if they can do intellisense, why not a very basic > > > thing like this :( > > > > William > > > > -------------------------------------------------- > > From: "Charlotte Foust" > > Sent: Wednesday, July 02, 2008 7:34 PM > > To: "Discussion concerning Visual Basic and related programming > issues." > > > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > > If you're really hot to copy a form (I've had a few that I didn't > > > want to recreate by copy and paste for very complex reasons), you > > > can simply copy the files for that form to someplace like a temp > > > folder and rename it. Course, you have to go into the modules and > > > make sure the rename gets propagated throughout the class and > > > designer code. Then just use Add Existing Item from the menu and > > > browse to the class for your renamed form. > > > > > > Charlotte Foust > > > > > > -----Original Message----- > > > From: dba-vb-bounces at databaseadvisors.com > > > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav > > > Brock > > > Sent: Wednesday, July 02, 2008 9:31 AM > > > To: dba-vb at databaseadvisors.com > > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > > > Hi William > > > > > > That brings some relief - I thought I was missing something obvious. > > > > > > I'll try your method next time. > > > > > > /gustav > > > > > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > > > Gustav > > > > > > ...I never "copy" a form outright ...I found it cited as a bad > > > practice on a "best practices" list when I first got into vs5 ...it > > > supposedly led to all kinds of problems down the line ...my practice > > > > is to first create a new form in VS and then to copy the contents of > > > > the original to the new leaving what vs created alone ...I've not > > > had any problems with this (knock on wood) and its "almost" as easy > > > as copying and renaming a form. > > > > > > ...I assumed ms would have fixed such an obvious problem in vs8 but > > > then I've been assuming such in Access since A97 days ...and what do > > > > I have to show for such faith? ...a ribbon! :( > > > > > > William > > > "My friends, we live in the greatest country in the world. Please > > > join with me as we try to change it." Obama > > > > > > > > > -------------------------------------------------- > > > From: "Gustav Brock" > > > Sent: Wednesday, June 25, 2008 3:34 AM > > > To: > > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > > >> Hi William > > >> > > >> I have done so. Same issue. Or am I missing something? > > >> > > >> /gustav > > >> > > >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > > >> ...upgrade to vs2008 :) > > >> > > >> William > > >> "Sen. McCain will bring a lifetime of experience to the campaign... > > > Sen. > > >> Obama will bring a speech that he gave." Hillary Clinton > > >> > > >> -------------------------------------------------- > > >> From: "Gustav Brock" > > >> Sent: Tuesday, June 24, 2008 12:09 PM > > >> To: > > >> Subject: Re: [dba-VB] VB.Net 2005 copy a form > > >> > > >>> Hi John > > >>> > > >>> You can copy and paste the .cs file in the Solution Explorer pane. > > > The > > >>> copy will be renamed and you can rename that to what you want. > > >>> > > >>> However, if you in the Properties pane later rename the copy of > > >>> form > > > to > > >>> the new name, I've found that the refactoring mechanics will > > >>> rename references to your form not only in the .Designer.cs file > > >>> (correct) > > > but > > >>> also in the original .Designer.cs file (really nasty)! What do > > >>> others > > > do? > > >>> > > >>> /gustav > > >>> > > >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> > > >>> Hi All > > >>> > > >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ > > > controls. > > >>> I need a very similar form and It seems a real drag to type that > > >>> lot > > > again. > > >>> Any sugesstions? > > >>> > > >>> TIA > > >>> > > >>> johnc > > > > > > > > > > > > _______________________________________________ > > > dba-VB mailing list > > > dba-VB at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > > http://www.databaseadvisors.com > > > > > > > > > _______________________________________________ > > > dba-VB mailing list > > > dba-VB at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > > http://www.databaseadvisors.com > > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From Gustav at cactus.dk Mon Jul 7 09:48:09 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 07 Jul 2008 16:48:09 +0200 Subject: [dba-VB] Visual Studio: NumericUpDown control Message-ID: Hi all If I change the Minimum property of this, the ValueChanged event fires. Is this true? I would expect it to fire only at a change of the Value property of the control. Is there any way to distinguish between a change of Value and Minimum (and Maximum I guess, though I don't manipulate that property)? /gustav From paul.hartland at googlemail.com Thu Jul 10 05:58:31 2008 From: paul.hartland at googlemail.com (Paul Hartland) Date: Thu, 10 Jul 2008 11:58:31 +0100 Subject: [dba-VB] Trapping Errors When Trying To Get Distance Using MapPoint 2006 Message-ID: <38c884770807100358m68737a45rd9e67471d5aff979@mail.gmail.com> To all, I have just started a VB6 app that using MapPoint 2006 to calculate a few driving distances when required. The actual driving distance calculator is in a function, on which I have put some very simple error trapping. However when I pass a postcode (in one case B18 2PX) I get the error message (which bypasses my error trapping) as below: Run-time error '-2147181454 (80049c72)': The requested member of the collection does not exist. Use a valid name or index number. This is one of a few it errors on, all others work fine, but has anyone any idea why this isn't being picked up by my error trapping: Function GetDrivingDistance() On Error Goto MileageCalcError drivingdistancecode ResumeOnErrorHere savemap exitmappointapplication Exit Function MileageCalcError: Resume ResumeOnErrorHere End Function Thanks in advance for any help on this ..... -- Paul Hartland paul.hartland at googlemail.com From Johncliviger at aol.com Thu Jul 10 13:23:43 2008 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Thu, 10 Jul 2008 14:23:43 EDT Subject: [dba-VB] Datagridview in vb.net 2005 Message-ID: Hi All Is possible in datagridview to subtract a finish Date from a start Date and show the result in a unbound column on the same row by using the Expression property. If it is an example will be most useful TIA johnc From cfoust at infostatsystems.com Thu Jul 10 18:19:13 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Thu, 10 Jul 2008 16:19:13 -0700 Subject: [dba-VB] Datagridview in vb.net 2005 In-Reply-To: References: Message-ID: It should be possible. We do similar things with Infragistics grids, which are based on the vanilla Winforms variety. The expression/formula for the unbound column should probably be something like [FinishDate] - [StartDate]. However, that assumes all dates are populated. Are they? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Johncliviger at aol.com Sent: Thursday, July 10, 2008 11:24 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Datagridview in vb.net 2005 Hi All Is possible in datagridview to subtract a finish Date from a start Date and show the result in a unbound column on the same row by using the Expression property. If it is an example will be most useful TIA johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Johncliviger at aol.com Fri Jul 11 03:34:00 2008 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Fri, 11 Jul 2008 04:34:00 EDT Subject: [dba-VB] Datagridview in vb.net 2005 Message-ID: Hi Charlotte Yes all dates are populated. But what if there not? johnc From wdhindman at dejpolsystems.com Fri Jul 11 15:01:09 2008 From: wdhindman at dejpolsystems.com (William Hindman) Date: Fri, 11 Jul 2008 16:01:09 -0400 Subject: [dba-VB] Datagridview in vb.net 2005 References: Message-ID: <49ACF872F5124FC893FBDD608883980A@jislaptopdev> http://www.dreamincode.net/forums/showtopic41981.htm William -------------------------------------------------- From: Sent: Thursday, July 10, 2008 2:23 PM To: Subject: [dba-VB] Datagridview in vb.net 2005 > Hi All > Is possible in datagridview to subtract a finish Date from a start Date > and > show the result in a unbound column on the same row by using the > Expression > property. > > If it is an example will be most useful > > TIA > > johnc > > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From cfoust at infostatsystems.com Mon Jul 14 10:41:40 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 14 Jul 2008 08:41:40 -0700 Subject: [dba-VB] Datagridview in vb.net 2005 In-Reply-To: References: Message-ID: Then you'll probably get midnight and you can check for Date.MinValue to see whether you want to use it. I generally use a hidden expression column and then use code in the RowInitialize event to populate a visible unbound column appropriately. But we do some pretty exotic stuff with our grids. You can also use a typed dataset that includes an expression field in the dataset and then calculate based on that expression rather than doing it at the grid level. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Johncliviger at aol.com Sent: Friday, July 11, 2008 1:34 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Datagridview in vb.net 2005 Hi Charlotte Yes all dates are populated. But what if there not? johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Johncliviger at aol.com Tue Jul 15 04:01:41 2008 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Tue, 15 Jul 2008 05:01:41 EDT Subject: [dba-VB] Datagridview in vb.net 2005 Message-ID: Charlotte Thanks for the datagrid tips johnc From john at winhaven.net Tue Jul 15 16:39:40 2008 From: john at winhaven.net (John Bartow) Date: Tue, 15 Jul 2008 16:39:40 -0500 Subject: [dba-VB] Paging Chris Mackin Message-ID: <200807152139.m6FLdS9r022604@databaseadvisors.com> Does anyone know Chris new email address? John Bartow, President Database Advisors, Inc. Email: mailto:president at databaseadvisors.com Website: http://www.databaseadvisors.com From michael at ddisolutions.com.au Tue Jul 15 18:54:08 2008 From: michael at ddisolutions.com.au (Michael Maddison) Date: Wed, 16 Jul 2008 09:54:08 +1000 Subject: [dba-VB] Datagridview in vb.net 2005 References: Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D013BFCA8@ddi-01.DDI.local> FYI, There is a doc called DataGridView FAQ.doc floating about the www. Has lots of useful info for dealing with the DGV. cheers Michael M Charlotte Thanks for the datagrid tips johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Wed Jul 23 10:40:19 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 23 Jul 2008 17:40:19 +0200 Subject: [dba-VB] C#: this.prefix Message-ID: Hi Shamil et al Sorry to return to this perhaps pedantic question, but I noticed that the auto generated code in the .Designer.cs files are 100% flooded with either the this. prefix or the full namespace. Why would the generator do this if it was not necessary? Is it just being overcautious? /gustav >>> shamil at smsconsulting.spb.ru 02-07-2008 18:57 >>> Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav From shamil at smsconsulting.spb.ru Wed Jul 23 14:06:11 2008 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 23 Jul 2008 23:06:11 +0400 Subject: [dba-VB] C#: this.prefix In-Reply-To: Message-ID: <1c6301c8ecf7$2bf4a630$6401a8c0@nant> Hi Gustav, That's waste of HDD space for sure IMO. Probably somebody "paranoid" and overcautious with VB6/VBA programming experience background did write this code generator at MS. I'm serious :) FYI: I almost never use this. in my C# coding - I do use camelCase naming conventions and it works very well for me - never had any confusion with scope, as well as my VS2005/VS2008 C# compiler :) Here is the case when this. *is* necessary - but this (pun intended:)) is a bad coding style: public class ThatParent { public string Name = "Parent Name"; } public class ThisChild : ThatParent { public new string Name = "Child Name"; public void Test() { Console.WriteLine("Parent:" + base.Name); Console.WriteLine("Child:" + this.Name); Console.WriteLine("Whose name is this ?:" + Name); } } They (MS) do generate this. everywhere to prevent confusions like that one above as controls' names could be similar to the names of the properties and methods in WinForm class inheritance hierarchy: System..::.Object System..::.MarshalByRefObject System.ComponentModel..::.Component System.Windows.Forms..::.Control System.Windows.Forms..::.ScrollableControl System.Windows.Forms..::.ContainerControl System.Windows.Forms..::.Form Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 23, 2008 7:40 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] C#: this.prefix Hi Shamil et al Sorry to return to this perhaps pedantic question, but I noticed that the auto generated code in the .Designer.cs files are 100% flooded with either the this. prefix or the full namespace. Why would the generator do this if it was not necessary? Is it just being overcautious? /gustav >>> shamil at smsconsulting.spb.ru 02-07-2008 18:57 >>> Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Wed Jul 23 15:24:50 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 23 Jul 2008 22:24:50 +0200 Subject: [dba-VB] C#: this.prefix Message-ID: Hi Shamil Thanks. That explains. I guess MS has considered this and concluded that the cost in consumed disk space is well worth avoiding the possible confusion from name conflicts. /gustav >>> shamil at smsconsulting.spb.ru 23-07-2008 21:06 >>> Hi Gustav, That's waste of HDD space for sure IMO. Probably somebody "paranoid" and overcautious with VB6/VBA programming experience background did write this code generator at MS. I'm serious :) FYI: I almost never use this. in my C# coding - I do use camelCase naming conventions and it works very well for me - never had any confusion with scope, as well as my VS2005/VS2008 C# compiler :) Here is the case when this. *is* necessary - but this (pun intended:)) is a bad coding style: public class ThatParent { public string Name = "Parent Name"; } public class ThisChild : ThatParent { public new string Name = "Child Name"; public void Test() { Console.WriteLine("Parent:" + base.Name); Console.WriteLine("Child:" + this.Name); Console.WriteLine("Whose name is this ?:" + Name); } } They (MS) do generate this. everywhere to prevent confusions like that one above as controls' names could be similar to the names of the properties and methods in WinForm class inheritance hierarchy: System..::.Object System..::.MarshalByRefObject System.ComponentModel..::.Component System.Windows.Forms..::.Control System.Windows.Forms..::.ScrollableControl System.Windows.Forms..::.ContainerControl System.Windows.Forms..::.Form Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 23, 2008 7:40 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] C#: this.prefix Hi Shamil et al Sorry to return to this perhaps pedantic question, but I noticed that the auto generated code in the .Designer.cs files are 100% flooded with either the this. prefix or the full namespace. Why would the generator do this if it was not necessary? Is it just being overcautious? /gustav >>> shamil at smsconsulting.spb.ru 02-07-2008 18:57 >>> Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav From paul.hartland at googlemail.com Thu Jul 24 03:56:04 2008 From: paul.hartland at googlemail.com (Paul Hartland) Date: Thu, 24 Jul 2008 09:56:04 +0100 Subject: [dba-VB] OT - Cross Post Learning VB.Net Message-ID: <38c884770807240156t17f628bbw3dd7935cd80df20d@mail.gmail.com> To all, I want to start learning Visual Basic .Net, I did download VB 2005 Express, C++ 2005 Express, C# 2005 Express & SQL Server 2005 Express, but unfortunately didn't actually get around to playing with them. I have noticed that 2008 Express editions are now available, would it be worth using these instead of the 2005 Express editions ? Also, I would class myself as an intermediate to advanced VB6 developer, does anyone have any good suggestions on books, free web tutuorials that would get me started, I don't mind going right back to the beginning if I have to to learn this, as I am falling behind a long way. Oops another thought, does anyone know if there is anything like an ASP.Net Express edition or similar (or am I being thick lol) Thanks in advance for any help on this.... -- Paul Hartland paul.hartland at googlemail.com From robert at webedb.com Thu Jul 24 22:20:03 2008 From: robert at webedb.com (Robert L. Stewart) Date: Thu, 24 Jul 2008 22:20:03 -0500 Subject: [dba-VB] Cross Post Learning VB.Net In-Reply-To: References: Message-ID: <200807250320.m6P3KYtV028389@databaseadvisors.com> Paul, That would be the Visual Web Developer. Yes, I would go to the 2008 versions since you are starting out. I would go with the Step-By-Step books as a start. Robert At 12:00 PM 7/24/2008, you wrote: >Date: Thu, 24 Jul 2008 09:56:04 +0100 >From: "Paul Hartland" >Subject: [dba-VB] OT - Cross Post Learning VB.Net >To: VisualBasicList , "Access List" > >Message-ID: > <38c884770807240156t17f628bbw3dd7935cd80df20d at mail.gmail.com> >Content-Type: text/plain; charset=ISO-8859-1 > >To all, > >I want to start learning Visual Basic .Net, I did download VB 2005 Express, >C++ 2005 Express, C# 2005 Express & SQL Server 2005 Express, but >unfortunately didn't actually get around to playing with them. > >I have noticed that 2008 Express editions are now available, would it be >worth using these instead of the 2005 Express editions ? > >Also, I would class myself as an intermediate to advanced VB6 developer, >does anyone have any good suggestions on books, free web tutuorials that >would get me started, I don't mind going right back to the beginning if I >have to to learn this, as I am falling behind a long way. > >Oops another thought, does anyone know if there is anything like an ASP.Net >Express edition or similar (or am I being thick lol) > >Thanks in advance for any help on this.... > >-- >Paul Hartland >paul.hartland at googlemail.com From Johncliviger at aol.com Mon Jul 28 03:50:35 2008 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Mon, 28 Jul 2008 04:50:35 EDT Subject: [dba-VB] VB2005 DatagridView with unbound calculated fields Message-ID: Hi All I have a form with a parent and child grids. On the child grid I have 2 unbound calculated fields. And everything works fine. What I need to do is add a subtotal field for 1 of the calculated fields. And the subtotal to appear in a textbox on the form for each parent. Anyone seen this before? Any sites that may explain how to do it? TIA johnc From paul.hartland at googlemail.com Wed Jul 30 04:56:11 2008 From: paul.hartland at googlemail.com (Paul Hartland) Date: Wed, 30 Jul 2008 10:56:11 +0100 Subject: [dba-VB] Visual Basic 6.0 Control CardScan Scanner Message-ID: <38c884770807300256o5b4c26a8s347c2a461d31bba8@mail.gmail.com> To all, We have started scanning personnel photo's onto our employee database, I am using Visual Basic 6.0 and the business card scanner CardScan 800c. It works but is a bit clumsy i.e. when we scan a phto the user clicks a button which runs a macro to represent the keystrokes etc required by the CardScan software to process & save the employee's photo. The macro works by firing events/keystrokes depending on the name of the currently open CardScan window, however we now want our European divisions in Belgium & Netherlands to do this as well, the problem being that the macro will not recognise the window name as it will not be in English. Has anyone ever worked with CardScan scanning devices, so that perhaps I could use some sort of general driver to control the CardScan scanner and save the picture. The closest I have came is using GDTwain, which lets me tell the unit to scan and save the picture, but I don't seem to be able to control the resolution etc of the photos. Any help on this will be appreciated, and thank you in advance for any help on this.... -- Paul Hartland paul.hartland at googlemail.com From Gustav at cactus.dk Wed Jul 30 05:36:17 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 30 Jul 2008 12:36:17 +0200 Subject: [dba-VB] Visual Basic 6.0 Control CardScan Scanner Message-ID: Hi Paul Sounds like a job for csXImage which I have recommend several times: http://www.chestysoft.com/ximage/default.asp A fully functional trial is available for download. Scanners - not to say their buggy drivers - are nasty and unpredictable animals, and you will most likely - as I did - need the excellent support from Simon Chester. I believe he knows just about anything about scanners and their misbehaving. /gustav >>> paul.hartland at googlemail.com 30-07-2008 11:56 >>> To all, We have started scanning personnel photo's onto our employee database, I am using Visual Basic 6.0 and the business card scanner CardScan 800c. It works but is a bit clumsy i.e. when we scan a phto the user clicks a button which runs a macro to represent the keystrokes etc required by the CardScan software to process & save the employee's photo. The macro works by firing events/keystrokes depending on the name of the currently open CardScan window, however we now want our European divisions in Belgium & Netherlands to do this as well, the problem being that the macro will not recognise the window name as it will not be in English. Has anyone ever worked with CardScan scanning devices, so that perhaps I could use some sort of general driver to control the CardScan scanner and save the picture. The closest I have came is using GDTwain, which lets me tell the unit to scan and save the picture, but I don't seem to be able to control the resolution etc of the photos. Any help on this will be appreciated, and thank you in advance for any help on this.... -- Paul Hartland paul.hartland at googlemail.com From paul.hartland at googlemail.com Wed Jul 30 05:48:36 2008 From: paul.hartland at googlemail.com (Paul Hartland) Date: Wed, 30 Jul 2008 11:48:36 +0100 Subject: [dba-VB] Visual Basic 6.0 Control CardScan Scanner In-Reply-To: References: Message-ID: <38c884770807300348k718230a8s738e205140676a5@mail.gmail.com> Thank you Gustav, just downloaded it so will have a look.... 2008/7/30 Gustav Brock > Hi Paul > > Sounds like a job for csXImage which I have recommend several times: > > http://www.chestysoft.com/ximage/default.asp > > A fully functional trial is available for download. > > Scanners - not to say their buggy drivers - are nasty and unpredictable > animals, and you will most likely - as I did - need the excellent support > from Simon Chester. I believe he knows just about anything about scanners > and their misbehaving. > > /gustav > > >>> paul.hartland at googlemail.com 30-07-2008 11:56 >>> > To all, > > We have started scanning personnel photo's onto our employee database, I am > using Visual Basic 6.0 and the business card scanner CardScan 800c. It > works but is a bit clumsy i.e. when we scan a phto the user clicks a button > which runs a macro to represent the keystrokes etc required by the CardScan > software to process & save the employee's photo. The macro works by firing > events/keystrokes depending on the name of the currently open CardScan > window, however we now want our European divisions in Belgium & Netherlands > to do this as well, the problem being that the macro will not recognise the > window name as it will not be in English. > > Has anyone ever worked with CardScan scanning devices, so that perhaps I > could use some sort of general driver to control the CardScan scanner and > save the picture. The closest I have came is using GDTwain, which lets me > tell the unit to scan and save the picture, but I don't seem to be able to > control the resolution etc of the photos. > > Any help on this will be appreciated, and thank you in advance for any help > on this.... > > -- > Paul Hartland > paul.hartland at googlemail.com > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > -- Paul Hartland paul.hartland at googlemail.com From cfoust at infostatsystems.com Thu Jul 31 10:30:51 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Thu, 31 Jul 2008 08:30:51 -0700 Subject: [dba-VB] VB2005 DatagridView with unbound calculated fields In-Reply-To: References: Message-ID: I'm not sure I understand. You want the subtotal to appear on the parent form, not in the parent grid, right? That should only take creating a dataset (or reference the datasource of the child grid and cast it as the appropriate object type) and then doing a compute on it to sum the value of the column in the child. You'd raise an event from the child grid if the value changed and a handler in the parent form would then recalculate the subtotal. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Johncliviger at aol.com Sent: Monday, July 28, 2008 1:51 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB2005 DatagridView with unbound calculated fields Hi All I have a form with a parent and child grids. On the child grid I have 2 unbound calculated fields. And everything works fine. What I need to do is add a subtotal field for 1 of the calculated fields. And the subtotal to appear in a textbox on the form for each parent. Anyone seen this before? Any sites that may explain how to do it? TIA johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Wed Jul 2 10:54:58 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 02 Jul 2008 17:54:58 +0200 Subject: [dba-VB] C#: this.prefix Message-ID: Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav From wdhindman at dejpolsystems.com Wed Jul 2 11:12:45 2008 From: wdhindman at dejpolsystems.com (William Hindman) Date: Wed, 2 Jul 2008 12:12:45 -0400 Subject: [dba-VB] VB.Net 2005 copy a form References: Message-ID: <572DA58D1F8F4E1E865FA20E43C52CAA@jislaptopdev> Gustav ...I never "copy" a form outright ...I found it cited as a bad practice on a "best practices" list when I first got into vs5 ...it supposedly led to all kinds of problems down the line ...my practice is to first create a new form in VS and then to copy the contents of the original to the new leaving what vs created alone ...I've not had any problems with this (knock on wood) and its "almost" as easy as copying and renaming a form. ...I assumed ms would have fixed such an obvious problem in vs8 but then I've been assuming such in Access since A97 days ...and what do I have to show for such faith? ...a ribbon! :( William "My friends, we live in the greatest country in the world. Please join with me as we try to change it." Obama -------------------------------------------------- From: "Gustav Brock" Sent: Wednesday, June 25, 2008 3:34 AM To: Subject: Re: [dba-VB] VB.Net 2005 copy a form > Hi William > > I have done so. Same issue. Or am I missing something? > > /gustav > >>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > ...upgrade to vs2008 :) > > William > "Sen. McCain will bring a lifetime of experience to the campaign... Sen. > Obama will bring a speech that he gave." Hillary Clinton > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Tuesday, June 24, 2008 12:09 PM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi John >> >> You can copy and paste the .cs file in the Solution Explorer pane. The >> copy will be renamed and you can rename that to what you want. >> >> However, if you in the Properties pane later rename the copy of form to >> the new name, I've found that the refactoring mechanics will rename >> references to your form not only in the .Designer.cs file (correct) but >> also in the original .Designer.cs file (really nasty)! What do others do? >> >> /gustav >> >>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >> Hi All >> >> How do you copy a Form in VB.Net 2005? I have a form with 100+ >> controls. >> I need a very similar form and It seems a real drag to type that lot >> again. >> Any sugesstions? >> >> TIA >> >> johnc > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From Gustav at cactus.dk Wed Jul 2 11:30:42 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 02 Jul 2008 18:30:42 +0200 Subject: [dba-VB] VB.Net 2005 copy a form Message-ID: Hi William That brings some relief - I thought I was missing something obvious. I'll try your method next time. /gustav >>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> Gustav ...I never "copy" a form outright ...I found it cited as a bad practice on a "best practices" list when I first got into vs5 ...it supposedly led to all kinds of problems down the line ...my practice is to first create a new form in VS and then to copy the contents of the original to the new leaving what vs created alone ...I've not had any problems with this (knock on wood) and its "almost" as easy as copying and renaming a form. ...I assumed ms would have fixed such an obvious problem in vs8 but then I've been assuming such in Access since A97 days ...and what do I have to show for such faith? ...a ribbon! :( William "My friends, we live in the greatest country in the world. Please join with me as we try to change it." Obama -------------------------------------------------- From: "Gustav Brock" Sent: Wednesday, June 25, 2008 3:34 AM To: Subject: Re: [dba-VB] VB.Net 2005 copy a form > Hi William > > I have done so. Same issue. Or am I missing something? > > /gustav > >>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > ...upgrade to vs2008 :) > > William > "Sen. McCain will bring a lifetime of experience to the campaign... Sen. > Obama will bring a speech that he gave." Hillary Clinton > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Tuesday, June 24, 2008 12:09 PM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi John >> >> You can copy and paste the .cs file in the Solution Explorer pane. The >> copy will be renamed and you can rename that to what you want. >> >> However, if you in the Properties pane later rename the copy of form to >> the new name, I've found that the refactoring mechanics will rename >> references to your form not only in the .Designer.cs file (correct) but >> also in the original .Designer.cs file (really nasty)! What do others do? >> >> /gustav >> >>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >> Hi All >> >> How do you copy a Form in VB.Net 2005? I have a form with 100+ controls. >> I need a very similar form and It seems a real drag to type that lot again. >> Any sugesstions? >> >> TIA >> >> johnc From shamil at smsconsulting.spb.ru Wed Jul 2 11:57:06 2008 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 2 Jul 2008 20:57:06 +0400 Subject: [dba-VB] C#: this.prefix In-Reply-To: Message-ID: <09f701c8dc64$a87fb080$6401a8c0@nant> Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From davidmcafee at gmail.com Wed Jul 2 12:00:23 2008 From: davidmcafee at gmail.com (David McAfee) Date: Wed, 2 Jul 2008 10:00:23 -0700 Subject: [dba-VB] C#: this.prefix In-Reply-To: References: Message-ID: <8786a4c00807021000g7dfa4d50l79887245b8f41e37@mail.gmail.com> Same here, I use it out of (an old) habit from "Me." in VBA, on forms. On Wed, Jul 2, 2008 at 8:54 AM, Gustav Brock wrote: > Hi all > > How rigorously are you prefixing controls and variables with "this."? > > Is it a good or bad coding practice to use it when not strictly needed? > Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? > > I've found, that I use it a lot - old habit from "Me." in VBA, I guess. > > /gustav > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From wdhindman at dejpolsystems.com Wed Jul 2 15:46:51 2008 From: wdhindman at dejpolsystems.com (William Hindman) Date: Wed, 2 Jul 2008 16:46:51 -0400 Subject: [dba-VB] VB.Net 2005 copy a form References: Message-ID: <11A2F20AE0B143519C50E0A3E043028F@jislaptopdev> ...damn ...sorry about the sig :( William -------------------------------------------------- From: "Gustav Brock" Sent: Wednesday, July 02, 2008 12:30 PM To: Subject: Re: [dba-VB] VB.Net 2005 copy a form > Hi William > > That brings some relief - I thought I was missing something obvious. > > I'll try your method next time. > > /gustav > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > Gustav > > ...I never "copy" a form outright ...I found it cited as a bad practice on > a > "best practices" list when I first got into vs5 ...it supposedly led to > all > kinds of problems down the line ...my practice is to first create a new > form > in VS and then to copy the contents of the original to the new leaving > what > vs created alone ...I've not had any problems with this (knock on wood) > and > its "almost" as easy as copying and renaming a form. > > ...I assumed ms would have fixed such an obvious problem in vs8 but then > I've been assuming such in Access since A97 days ...and what do I have to > show for such faith? ...a ribbon! :( > > William > "My friends, we live in the greatest country in the world. Please join > with > me as we try to change it." Obama > > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Wednesday, June 25, 2008 3:34 AM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi William >> >> I have done so. Same issue. Or am I missing something? >> >> /gustav >> >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> >> ...upgrade to vs2008 :) >> >> William >> "Sen. McCain will bring a lifetime of experience to the campaign... Sen. >> Obama will bring a speech that he gave." Hillary Clinton >> >> -------------------------------------------------- >> From: "Gustav Brock" >> Sent: Tuesday, June 24, 2008 12:09 PM >> To: >> Subject: Re: [dba-VB] VB.Net 2005 copy a form >> >>> Hi John >>> >>> You can copy and paste the .cs file in the Solution Explorer pane. The >>> copy will be renamed and you can rename that to what you want. >>> >>> However, if you in the Properties pane later rename the copy of form to >>> the new name, I've found that the refactoring mechanics will rename >>> references to your form not only in the .Designer.cs file (correct) but >>> also in the original .Designer.cs file (really nasty)! What do others >>> do? >>> >>> /gustav >>> >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >>> Hi All >>> >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ >>> controls. >>> I need a very similar form and It seems a real drag to type that lot >>> again. >>> Any sugesstions? >>> >>> TIA >>> >>> johnc > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From cfoust at infostatsystems.com Wed Jul 2 18:34:39 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 2 Jul 2008 16:34:39 -0700 Subject: [dba-VB] VB.Net 2005 copy a form In-Reply-To: References: Message-ID: If you're really hot to copy a form (I've had a few that I didn't want to recreate by copy and paste for very complex reasons), you can simply copy the files for that form to someplace like a temp folder and rename it. Course, you have to go into the modules and make sure the rename gets propagated throughout the class and designer code. Then just use Add Existing Item from the menu and browse to the class for your renamed form. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 9:31 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] VB.Net 2005 copy a form Hi William That brings some relief - I thought I was missing something obvious. I'll try your method next time. /gustav >>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> Gustav ...I never "copy" a form outright ...I found it cited as a bad practice on a "best practices" list when I first got into vs5 ...it supposedly led to all kinds of problems down the line ...my practice is to first create a new form in VS and then to copy the contents of the original to the new leaving what vs created alone ...I've not had any problems with this (knock on wood) and its "almost" as easy as copying and renaming a form. ...I assumed ms would have fixed such an obvious problem in vs8 but then I've been assuming such in Access since A97 days ...and what do I have to show for such faith? ...a ribbon! :( William "My friends, we live in the greatest country in the world. Please join with me as we try to change it." Obama -------------------------------------------------- From: "Gustav Brock" Sent: Wednesday, June 25, 2008 3:34 AM To: Subject: Re: [dba-VB] VB.Net 2005 copy a form > Hi William > > I have done so. Same issue. Or am I missing something? > > /gustav > >>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > ...upgrade to vs2008 :) > > William > "Sen. McCain will bring a lifetime of experience to the campaign... Sen. > Obama will bring a speech that he gave." Hillary Clinton > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Tuesday, June 24, 2008 12:09 PM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi John >> >> You can copy and paste the .cs file in the Solution Explorer pane. The >> copy will be renamed and you can rename that to what you want. >> >> However, if you in the Properties pane later rename the copy of form to >> the new name, I've found that the refactoring mechanics will rename >> references to your form not only in the .Designer.cs file (correct) but >> also in the original .Designer.cs file (really nasty)! What do others do? >> >> /gustav >> >>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >> Hi All >> >> How do you copy a Form in VB.Net 2005? I have a form with 100+ controls. >> I need a very similar form and It seems a real drag to type that lot again. >> Any sugesstions? >> >> TIA >> >> johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Wed Jul 2 18:37:36 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 2 Jul 2008 16:37:36 -0700 Subject: [dba-VB] C#: this.prefix In-Reply-To: <09f701c8dc64$a87fb080$6401a8c0@nant> References: <09f701c8dc64$a87fb080$6401a8c0@nant> Message-ID: We use camcelcase postfix for objects and I still HATE it! We name things so they sort alpha but sometimes the names aren't very illuminating until you get to the tag end, which makes it wearing to search through the list for something you can't quite recall the name of. We use a variant of Hungarian within the code, although that has become hit or miss since .Net too. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Wednesday, July 02, 2008 9:57 AM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: Re: [dba-VB] C#: this.prefix Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From wdhindman at dejpolsystems.com Thu Jul 3 07:22:08 2008 From: wdhindman at dejpolsystems.com (William Hindman) Date: Thu, 3 Jul 2008 08:22:08 -0400 Subject: [dba-VB] VB.Net 2005 copy a form References: Message-ID: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> ...either way, its really annoying that ms can't get a simple copy/paste/rename right and propagate the name change throughout the module and forms ...if they can do intellisense, why not a very basic thing like this :( William -------------------------------------------------- From: "Charlotte Foust" Sent: Wednesday, July 02, 2008 7:34 PM To: "Discussion concerning Visual Basic and related programming issues." Subject: Re: [dba-VB] VB.Net 2005 copy a form > If you're really hot to copy a form (I've had a few that I didn't want > to recreate by copy and paste for very complex reasons), you can simply > copy the files for that form to someplace like a temp folder and rename > it. Course, you have to go into the modules and make sure the rename > gets propagated throughout the class and designer code. Then just use > Add Existing Item from the menu and browse to the class for your renamed > form. > > Charlotte Foust > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Wednesday, July 02, 2008 9:31 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > Hi William > > That brings some relief - I thought I was missing something obvious. > > I'll try your method next time. > > /gustav > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > Gustav > > ...I never "copy" a form outright ...I found it cited as a bad practice > on a "best practices" list when I first got into vs5 ...it supposedly > led to all kinds of problems down the line ...my practice is to first > create a new form in VS and then to copy the contents of the original to > the new leaving what vs created alone ...I've not had any problems with > this (knock on wood) and its "almost" as easy as copying and renaming a > form. > > ...I assumed ms would have fixed such an obvious problem in vs8 but then > I've been assuming such in Access since A97 days ...and what do I have > to show for such faith? ...a ribbon! :( > > William > "My friends, we live in the greatest country in the world. Please join > with me as we try to change it." Obama > > > -------------------------------------------------- > From: "Gustav Brock" > Sent: Wednesday, June 25, 2008 3:34 AM > To: > Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> Hi William >> >> I have done so. Same issue. Or am I missing something? >> >> /gustav >> >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> >> ...upgrade to vs2008 :) >> >> William >> "Sen. McCain will bring a lifetime of experience to the campaign... > Sen. >> Obama will bring a speech that he gave." Hillary Clinton >> >> -------------------------------------------------- >> From: "Gustav Brock" >> Sent: Tuesday, June 24, 2008 12:09 PM >> To: >> Subject: Re: [dba-VB] VB.Net 2005 copy a form >> >>> Hi John >>> >>> You can copy and paste the .cs file in the Solution Explorer pane. > The >>> copy will be renamed and you can rename that to what you want. >>> >>> However, if you in the Properties pane later rename the copy of form > to >>> the new name, I've found that the refactoring mechanics will rename >>> references to your form not only in the .Designer.cs file (correct) > but >>> also in the original .Designer.cs file (really nasty)! What do others > do? >>> >>> /gustav >>> >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> >>> Hi All >>> >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ > controls. >>> I need a very similar form and It seems a real drag to type that lot > again. >>> Any sugesstions? >>> >>> TIA >>> >>> johnc > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From max.wanadoo at gmail.com Thu Jul 3 08:51:06 2008 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Thu, 3 Jul 2008 14:51:06 +0100 Subject: [dba-VB] VB.Net 2005 copy a form In-Reply-To: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> References: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> Message-ID: Or ExportAs Text and then ImportAsText aka EATBloat. Max On Thu, Jul 3, 2008 at 1:22 PM, William Hindman wrote: > ...either way, its really annoying that ms can't get a simple > copy/paste/rename right and propagate the name change throughout the module > and forms ...if they can do intellisense, why not a very basic thing like > this :( > > William > > -------------------------------------------------- > From: "Charlotte Foust" > Sent: Wednesday, July 02, 2008 7:34 PM > To: "Discussion concerning Visual Basic and related programming issues." > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > If you're really hot to copy a form (I've had a few that I didn't want > > to recreate by copy and paste for very complex reasons), you can simply > > copy the files for that form to someplace like a temp folder and rename > > it. Course, you have to go into the modules and make sure the rename > > gets propagated throughout the class and designer code. Then just use > > Add Existing Item from the menu and browse to the class for your renamed > > form. > > > > Charlotte Foust > > > > -----Original Message----- > > From: dba-vb-bounces at databaseadvisors.com > > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > > Sent: Wednesday, July 02, 2008 9:31 AM > > To: dba-vb at databaseadvisors.com > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > Hi William > > > > That brings some relief - I thought I was missing something obvious. > > > > I'll try your method next time. > > > > /gustav > > > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > > Gustav > > > > ...I never "copy" a form outright ...I found it cited as a bad practice > > on a "best practices" list when I first got into vs5 ...it supposedly > > led to all kinds of problems down the line ...my practice is to first > > create a new form in VS and then to copy the contents of the original to > > the new leaving what vs created alone ...I've not had any problems with > > this (knock on wood) and its "almost" as easy as copying and renaming a > > form. > > > > ...I assumed ms would have fixed such an obvious problem in vs8 but then > > I've been assuming such in Access since A97 days ...and what do I have > > to show for such faith? ...a ribbon! :( > > > > William > > "My friends, we live in the greatest country in the world. Please join > > with me as we try to change it." Obama > > > > > > -------------------------------------------------- > > From: "Gustav Brock" > > Sent: Wednesday, June 25, 2008 3:34 AM > > To: > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > >> Hi William > >> > >> I have done so. Same issue. Or am I missing something? > >> > >> /gustav > >> > >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > >> ...upgrade to vs2008 :) > >> > >> William > >> "Sen. McCain will bring a lifetime of experience to the campaign... > > Sen. > >> Obama will bring a speech that he gave." Hillary Clinton > >> > >> -------------------------------------------------- > >> From: "Gustav Brock" > >> Sent: Tuesday, June 24, 2008 12:09 PM > >> To: > >> Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> > >>> Hi John > >>> > >>> You can copy and paste the .cs file in the Solution Explorer pane. > > The > >>> copy will be renamed and you can rename that to what you want. > >>> > >>> However, if you in the Properties pane later rename the copy of form > > to > >>> the new name, I've found that the refactoring mechanics will rename > >>> references to your form not only in the .Designer.cs file (correct) > > but > >>> also in the original .Designer.cs file (really nasty)! What do others > > do? > >>> > >>> /gustav > >>> > >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> > >>> Hi All > >>> > >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ > > controls. > >>> I need a very similar form and It seems a real drag to type that lot > > again. > >>> Any sugesstions? > >>> > >>> TIA > >>> > >>> johnc > > > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From michael at ddisolutions.com.au Fri Jul 4 02:05:48 2008 From: michael at ddisolutions.com.au (Michael Maddison) Date: Fri, 4 Jul 2008 17:05:48 +1000 Subject: [dba-VB] VB.Net 2005 copy a form References: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D013BFBCE@ddi-01.DDI.local> Wrong list I think Max... William, As to why its an issue I guess its because forms are partial classes, so it is legal and valid to have more then 1 cs file with the same class name. Refactor changes all names within the namespace, so change the namespace then rename then change the namespace back. You will need to change the namespace in the designer as well. cheers MM Or ExportAs Text and then ImportAsText aka EATBloat. Max On Thu, Jul 3, 2008 at 1:22 PM, William Hindman wrote: > ...either way, its really annoying that ms can't get a simple > copy/paste/rename right and propagate the name change throughout the > module and forms ...if they can do intellisense, why not a very basic > thing like this :( > > William > > -------------------------------------------------- > From: "Charlotte Foust" > Sent: Wednesday, July 02, 2008 7:34 PM > To: "Discussion concerning Visual Basic and related programming issues." > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > If you're really hot to copy a form (I've had a few that I didn't > > want to recreate by copy and paste for very complex reasons), you > > can simply copy the files for that form to someplace like a temp > > folder and rename it. Course, you have to go into the modules and > > make sure the rename gets propagated throughout the class and > > designer code. Then just use Add Existing Item from the menu and > > browse to the class for your renamed form. > > > > Charlotte Foust > > > > -----Original Message----- > > From: dba-vb-bounces at databaseadvisors.com > > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav > > Brock > > Sent: Wednesday, July 02, 2008 9:31 AM > > To: dba-vb at databaseadvisors.com > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > Hi William > > > > That brings some relief - I thought I was missing something obvious. > > > > I'll try your method next time. > > > > /gustav > > > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > > Gustav > > > > ...I never "copy" a form outright ...I found it cited as a bad > > practice on a "best practices" list when I first got into vs5 ...it > > supposedly led to all kinds of problems down the line ...my practice > > is to first create a new form in VS and then to copy the contents of > > the original to the new leaving what vs created alone ...I've not > > had any problems with this (knock on wood) and its "almost" as easy > > as copying and renaming a form. > > > > ...I assumed ms would have fixed such an obvious problem in vs8 but > > then I've been assuming such in Access since A97 days ...and what do > > I have to show for such faith? ...a ribbon! :( > > > > William > > "My friends, we live in the greatest country in the world. Please > > join with me as we try to change it." Obama > > > > > > -------------------------------------------------- > > From: "Gustav Brock" > > Sent: Wednesday, June 25, 2008 3:34 AM > > To: > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > >> Hi William > >> > >> I have done so. Same issue. Or am I missing something? > >> > >> /gustav > >> > >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > >> ...upgrade to vs2008 :) > >> > >> William > >> "Sen. McCain will bring a lifetime of experience to the campaign... > > Sen. > >> Obama will bring a speech that he gave." Hillary Clinton > >> > >> -------------------------------------------------- > >> From: "Gustav Brock" > >> Sent: Tuesday, June 24, 2008 12:09 PM > >> To: > >> Subject: Re: [dba-VB] VB.Net 2005 copy a form > >> > >>> Hi John > >>> > >>> You can copy and paste the .cs file in the Solution Explorer pane. > > The > >>> copy will be renamed and you can rename that to what you want. > >>> > >>> However, if you in the Properties pane later rename the copy of > >>> form > > to > >>> the new name, I've found that the refactoring mechanics will > >>> rename references to your form not only in the .Designer.cs file > >>> (correct) > > but > >>> also in the original .Designer.cs file (really nasty)! What do > >>> others > > do? > >>> > >>> /gustav > >>> > >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> > >>> Hi All > >>> > >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ > > controls. > >>> I need a very similar form and It seems a real drag to type that > >>> lot > > again. > >>> Any sugesstions? > >>> > >>> TIA > >>> > >>> johnc > > > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From max.wanadoo at gmail.com Fri Jul 4 02:56:25 2008 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Fri, 4 Jul 2008 08:56:25 +0100 Subject: [dba-VB] VB.Net 2005 copy a form In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D013BFBCE@ddi-01.DDI.local> References: <73D81E7B191A47E8A99411D208667E14@jislaptopdev> <59A61174B1F5B54B97FD4ADDE71E7D013BFBCE@ddi-01.DDI.local> Message-ID: Yes, sorry! Max On Fri, Jul 4, 2008 at 8:05 AM, Michael Maddison < michael at ddisolutions.com.au> wrote: > Wrong list I think Max... > > William, > As to why its an issue I guess its because forms are partial classes, so > it is legal and valid > to have more then 1 cs file with the same class name. Refactor changes > all names within the > namespace, so change the namespace then rename then change the namespace > back. You will > need to change the namespace in the designer as well. > > cheers > > MM > > > Or ExportAs Text and then ImportAsText aka EATBloat. > Max > > > On Thu, Jul 3, 2008 at 1:22 PM, William Hindman > > wrote: > > > ...either way, its really annoying that ms can't get a simple > > copy/paste/rename right and propagate the name change throughout the > > module and forms ...if they can do intellisense, why not a very basic > > > thing like this :( > > > > William > > > > -------------------------------------------------- > > From: "Charlotte Foust" > > Sent: Wednesday, July 02, 2008 7:34 PM > > To: "Discussion concerning Visual Basic and related programming > issues." > > > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > > If you're really hot to copy a form (I've had a few that I didn't > > > want to recreate by copy and paste for very complex reasons), you > > > can simply copy the files for that form to someplace like a temp > > > folder and rename it. Course, you have to go into the modules and > > > make sure the rename gets propagated throughout the class and > > > designer code. Then just use Add Existing Item from the menu and > > > browse to the class for your renamed form. > > > > > > Charlotte Foust > > > > > > -----Original Message----- > > > From: dba-vb-bounces at databaseadvisors.com > > > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav > > > Brock > > > Sent: Wednesday, July 02, 2008 9:31 AM > > > To: dba-vb at databaseadvisors.com > > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > > > Hi William > > > > > > That brings some relief - I thought I was missing something obvious. > > > > > > I'll try your method next time. > > > > > > /gustav > > > > > >>>> wdhindman at dejpolsystems.com 02-07-2008 18:12 >>> > > > Gustav > > > > > > ...I never "copy" a form outright ...I found it cited as a bad > > > practice on a "best practices" list when I first got into vs5 ...it > > > supposedly led to all kinds of problems down the line ...my practice > > > > is to first create a new form in VS and then to copy the contents of > > > > the original to the new leaving what vs created alone ...I've not > > > had any problems with this (knock on wood) and its "almost" as easy > > > as copying and renaming a form. > > > > > > ...I assumed ms would have fixed such an obvious problem in vs8 but > > > then I've been assuming such in Access since A97 days ...and what do > > > > I have to show for such faith? ...a ribbon! :( > > > > > > William > > > "My friends, we live in the greatest country in the world. Please > > > join with me as we try to change it." Obama > > > > > > > > > -------------------------------------------------- > > > From: "Gustav Brock" > > > Sent: Wednesday, June 25, 2008 3:34 AM > > > To: > > > Subject: Re: [dba-VB] VB.Net 2005 copy a form > > > > > >> Hi William > > >> > > >> I have done so. Same issue. Or am I missing something? > > >> > > >> /gustav > > >> > > >>>>> wdhindman at dejpolsystems.com 25-06-2008 05:19 >>> > > >> ...upgrade to vs2008 :) > > >> > > >> William > > >> "Sen. McCain will bring a lifetime of experience to the campaign... > > > Sen. > > >> Obama will bring a speech that he gave." Hillary Clinton > > >> > > >> -------------------------------------------------- > > >> From: "Gustav Brock" > > >> Sent: Tuesday, June 24, 2008 12:09 PM > > >> To: > > >> Subject: Re: [dba-VB] VB.Net 2005 copy a form > > >> > > >>> Hi John > > >>> > > >>> You can copy and paste the .cs file in the Solution Explorer pane. > > > The > > >>> copy will be renamed and you can rename that to what you want. > > >>> > > >>> However, if you in the Properties pane later rename the copy of > > >>> form > > > to > > >>> the new name, I've found that the refactoring mechanics will > > >>> rename references to your form not only in the .Designer.cs file > > >>> (correct) > > > but > > >>> also in the original .Designer.cs file (really nasty)! What do > > >>> others > > > do? > > >>> > > >>> /gustav > > >>> > > >>>>>> Johncliviger at aol.com 24-06-2008 17:21 >>> > > >>> Hi All > > >>> > > >>> How do you copy a Form in VB.Net 2005? I have a form with 100+ > > > controls. > > >>> I need a very similar form and It seems a real drag to type that > > >>> lot > > > again. > > >>> Any sugesstions? > > >>> > > >>> TIA > > >>> > > >>> johnc > > > > > > > > > > > > _______________________________________________ > > > dba-VB mailing list > > > dba-VB at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > > http://www.databaseadvisors.com > > > > > > > > > _______________________________________________ > > > dba-VB mailing list > > > dba-VB at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > > http://www.databaseadvisors.com > > > > > > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From Gustav at cactus.dk Mon Jul 7 09:48:09 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 07 Jul 2008 16:48:09 +0200 Subject: [dba-VB] Visual Studio: NumericUpDown control Message-ID: Hi all If I change the Minimum property of this, the ValueChanged event fires. Is this true? I would expect it to fire only at a change of the Value property of the control. Is there any way to distinguish between a change of Value and Minimum (and Maximum I guess, though I don't manipulate that property)? /gustav From paul.hartland at googlemail.com Thu Jul 10 05:58:31 2008 From: paul.hartland at googlemail.com (Paul Hartland) Date: Thu, 10 Jul 2008 11:58:31 +0100 Subject: [dba-VB] Trapping Errors When Trying To Get Distance Using MapPoint 2006 Message-ID: <38c884770807100358m68737a45rd9e67471d5aff979@mail.gmail.com> To all, I have just started a VB6 app that using MapPoint 2006 to calculate a few driving distances when required. The actual driving distance calculator is in a function, on which I have put some very simple error trapping. However when I pass a postcode (in one case B18 2PX) I get the error message (which bypasses my error trapping) as below: Run-time error '-2147181454 (80049c72)': The requested member of the collection does not exist. Use a valid name or index number. This is one of a few it errors on, all others work fine, but has anyone any idea why this isn't being picked up by my error trapping: Function GetDrivingDistance() On Error Goto MileageCalcError drivingdistancecode ResumeOnErrorHere savemap exitmappointapplication Exit Function MileageCalcError: Resume ResumeOnErrorHere End Function Thanks in advance for any help on this ..... -- Paul Hartland paul.hartland at googlemail.com From Johncliviger at aol.com Thu Jul 10 13:23:43 2008 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Thu, 10 Jul 2008 14:23:43 EDT Subject: [dba-VB] Datagridview in vb.net 2005 Message-ID: Hi All Is possible in datagridview to subtract a finish Date from a start Date and show the result in a unbound column on the same row by using the Expression property. If it is an example will be most useful TIA johnc From cfoust at infostatsystems.com Thu Jul 10 18:19:13 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Thu, 10 Jul 2008 16:19:13 -0700 Subject: [dba-VB] Datagridview in vb.net 2005 In-Reply-To: References: Message-ID: It should be possible. We do similar things with Infragistics grids, which are based on the vanilla Winforms variety. The expression/formula for the unbound column should probably be something like [FinishDate] - [StartDate]. However, that assumes all dates are populated. Are they? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Johncliviger at aol.com Sent: Thursday, July 10, 2008 11:24 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Datagridview in vb.net 2005 Hi All Is possible in datagridview to subtract a finish Date from a start Date and show the result in a unbound column on the same row by using the Expression property. If it is an example will be most useful TIA johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Johncliviger at aol.com Fri Jul 11 03:34:00 2008 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Fri, 11 Jul 2008 04:34:00 EDT Subject: [dba-VB] Datagridview in vb.net 2005 Message-ID: Hi Charlotte Yes all dates are populated. But what if there not? johnc From wdhindman at dejpolsystems.com Fri Jul 11 15:01:09 2008 From: wdhindman at dejpolsystems.com (William Hindman) Date: Fri, 11 Jul 2008 16:01:09 -0400 Subject: [dba-VB] Datagridview in vb.net 2005 References: Message-ID: <49ACF872F5124FC893FBDD608883980A@jislaptopdev> http://www.dreamincode.net/forums/showtopic41981.htm William -------------------------------------------------- From: Sent: Thursday, July 10, 2008 2:23 PM To: Subject: [dba-VB] Datagridview in vb.net 2005 > Hi All > Is possible in datagridview to subtract a finish Date from a start Date > and > show the result in a unbound column on the same row by using the > Expression > property. > > If it is an example will be most useful > > TIA > > johnc > > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From cfoust at infostatsystems.com Mon Jul 14 10:41:40 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 14 Jul 2008 08:41:40 -0700 Subject: [dba-VB] Datagridview in vb.net 2005 In-Reply-To: References: Message-ID: Then you'll probably get midnight and you can check for Date.MinValue to see whether you want to use it. I generally use a hidden expression column and then use code in the RowInitialize event to populate a visible unbound column appropriately. But we do some pretty exotic stuff with our grids. You can also use a typed dataset that includes an expression field in the dataset and then calculate based on that expression rather than doing it at the grid level. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Johncliviger at aol.com Sent: Friday, July 11, 2008 1:34 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Datagridview in vb.net 2005 Hi Charlotte Yes all dates are populated. But what if there not? johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Johncliviger at aol.com Tue Jul 15 04:01:41 2008 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Tue, 15 Jul 2008 05:01:41 EDT Subject: [dba-VB] Datagridview in vb.net 2005 Message-ID: Charlotte Thanks for the datagrid tips johnc From john at winhaven.net Tue Jul 15 16:39:40 2008 From: john at winhaven.net (John Bartow) Date: Tue, 15 Jul 2008 16:39:40 -0500 Subject: [dba-VB] Paging Chris Mackin Message-ID: <200807152139.m6FLdS9r022604@databaseadvisors.com> Does anyone know Chris new email address? John Bartow, President Database Advisors, Inc. Email: mailto:president at databaseadvisors.com Website: http://www.databaseadvisors.com From michael at ddisolutions.com.au Tue Jul 15 18:54:08 2008 From: michael at ddisolutions.com.au (Michael Maddison) Date: Wed, 16 Jul 2008 09:54:08 +1000 Subject: [dba-VB] Datagridview in vb.net 2005 References: Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D013BFCA8@ddi-01.DDI.local> FYI, There is a doc called DataGridView FAQ.doc floating about the www. Has lots of useful info for dealing with the DGV. cheers Michael M Charlotte Thanks for the datagrid tips johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Wed Jul 23 10:40:19 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 23 Jul 2008 17:40:19 +0200 Subject: [dba-VB] C#: this.prefix Message-ID: Hi Shamil et al Sorry to return to this perhaps pedantic question, but I noticed that the auto generated code in the .Designer.cs files are 100% flooded with either the this. prefix or the full namespace. Why would the generator do this if it was not necessary? Is it just being overcautious? /gustav >>> shamil at smsconsulting.spb.ru 02-07-2008 18:57 >>> Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav From shamil at smsconsulting.spb.ru Wed Jul 23 14:06:11 2008 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 23 Jul 2008 23:06:11 +0400 Subject: [dba-VB] C#: this.prefix In-Reply-To: Message-ID: <1c6301c8ecf7$2bf4a630$6401a8c0@nant> Hi Gustav, That's waste of HDD space for sure IMO. Probably somebody "paranoid" and overcautious with VB6/VBA programming experience background did write this code generator at MS. I'm serious :) FYI: I almost never use this. in my C# coding - I do use camelCase naming conventions and it works very well for me - never had any confusion with scope, as well as my VS2005/VS2008 C# compiler :) Here is the case when this. *is* necessary - but this (pun intended:)) is a bad coding style: public class ThatParent { public string Name = "Parent Name"; } public class ThisChild : ThatParent { public new string Name = "Child Name"; public void Test() { Console.WriteLine("Parent:" + base.Name); Console.WriteLine("Child:" + this.Name); Console.WriteLine("Whose name is this ?:" + Name); } } They (MS) do generate this. everywhere to prevent confusions like that one above as controls' names could be similar to the names of the properties and methods in WinForm class inheritance hierarchy: System..::.Object System..::.MarshalByRefObject System.ComponentModel..::.Component System.Windows.Forms..::.Control System.Windows.Forms..::.ScrollableControl System.Windows.Forms..::.ContainerControl System.Windows.Forms..::.Form Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 23, 2008 7:40 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] C#: this.prefix Hi Shamil et al Sorry to return to this perhaps pedantic question, but I noticed that the auto generated code in the .Designer.cs files are 100% flooded with either the this. prefix or the full namespace. Why would the generator do this if it was not necessary? Is it just being overcautious? /gustav >>> shamil at smsconsulting.spb.ru 02-07-2008 18:57 >>> Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Wed Jul 23 15:24:50 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 23 Jul 2008 22:24:50 +0200 Subject: [dba-VB] C#: this.prefix Message-ID: Hi Shamil Thanks. That explains. I guess MS has considered this and concluded that the cost in consumed disk space is well worth avoiding the possible confusion from name conflicts. /gustav >>> shamil at smsconsulting.spb.ru 23-07-2008 21:06 >>> Hi Gustav, That's waste of HDD space for sure IMO. Probably somebody "paranoid" and overcautious with VB6/VBA programming experience background did write this code generator at MS. I'm serious :) FYI: I almost never use this. in my C# coding - I do use camelCase naming conventions and it works very well for me - never had any confusion with scope, as well as my VS2005/VS2008 C# compiler :) Here is the case when this. *is* necessary - but this (pun intended:)) is a bad coding style: public class ThatParent { public string Name = "Parent Name"; } public class ThisChild : ThatParent { public new string Name = "Child Name"; public void Test() { Console.WriteLine("Parent:" + base.Name); Console.WriteLine("Child:" + this.Name); Console.WriteLine("Whose name is this ?:" + Name); } } They (MS) do generate this. everywhere to prevent confusions like that one above as controls' names could be similar to the names of the properties and methods in WinForm class inheritance hierarchy: System..::.Object System..::.MarshalByRefObject System.ComponentModel..::.Component System.Windows.Forms..::.Control System.Windows.Forms..::.ScrollableControl System.Windows.Forms..::.ContainerControl System.Windows.Forms..::.Form Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 23, 2008 7:40 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] C#: this.prefix Hi Shamil et al Sorry to return to this perhaps pedantic question, but I noticed that the auto generated code in the .Designer.cs files are 100% flooded with either the this. prefix or the full namespace. Why would the generator do this if it was not necessary? Is it just being overcautious? /gustav >>> shamil at smsconsulting.spb.ru 02-07-2008 18:57 >>> Hi Gustav, I almost never use such prefixing - and I did use Me. a lot in VBA... I do use full namespace prefix if needed. Using this. prefix could disturb a lot as for C# programming is usual to make a lot of code refactorings with moving code snippets from here to there etc. I do use CamelCase postfix naming convention - and it helps and works well for me (Imagine that after almost ten years of using LNRC (and Hungarian) naming conventions in VBA and VB6!)... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, July 02, 2008 7:55 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] C#: this.prefix Hi all How rigorously are you prefixing controls and variables with "this."? Is it a good or bad coding practice to use it when not strictly needed? Do I understand it right, that it is only needed to separate, say, a method in the current namespace from an identically named and public method in another namespace? I've found, that I use it a lot - old habit from "Me." in VBA, I guess. /gustav From paul.hartland at googlemail.com Thu Jul 24 03:56:04 2008 From: paul.hartland at googlemail.com (Paul Hartland) Date: Thu, 24 Jul 2008 09:56:04 +0100 Subject: [dba-VB] OT - Cross Post Learning VB.Net Message-ID: <38c884770807240156t17f628bbw3dd7935cd80df20d@mail.gmail.com> To all, I want to start learning Visual Basic .Net, I did download VB 2005 Express, C++ 2005 Express, C# 2005 Express & SQL Server 2005 Express, but unfortunately didn't actually get around to playing with them. I have noticed that 2008 Express editions are now available, would it be worth using these instead of the 2005 Express editions ? Also, I would class myself as an intermediate to advanced VB6 developer, does anyone have any good suggestions on books, free web tutuorials that would get me started, I don't mind going right back to the beginning if I have to to learn this, as I am falling behind a long way. Oops another thought, does anyone know if there is anything like an ASP.Net Express edition or similar (or am I being thick lol) Thanks in advance for any help on this.... -- Paul Hartland paul.hartland at googlemail.com From robert at webedb.com Thu Jul 24 22:20:03 2008 From: robert at webedb.com (Robert L. Stewart) Date: Thu, 24 Jul 2008 22:20:03 -0500 Subject: [dba-VB] Cross Post Learning VB.Net In-Reply-To: References: Message-ID: <200807250320.m6P3KYtV028389@databaseadvisors.com> Paul, That would be the Visual Web Developer. Yes, I would go to the 2008 versions since you are starting out. I would go with the Step-By-Step books as a start. Robert At 12:00 PM 7/24/2008, you wrote: >Date: Thu, 24 Jul 2008 09:56:04 +0100 >From: "Paul Hartland" >Subject: [dba-VB] OT - Cross Post Learning VB.Net >To: VisualBasicList , "Access List" > >Message-ID: > <38c884770807240156t17f628bbw3dd7935cd80df20d at mail.gmail.com> >Content-Type: text/plain; charset=ISO-8859-1 > >To all, > >I want to start learning Visual Basic .Net, I did download VB 2005 Express, >C++ 2005 Express, C# 2005 Express & SQL Server 2005 Express, but >unfortunately didn't actually get around to playing with them. > >I have noticed that 2008 Express editions are now available, would it be >worth using these instead of the 2005 Express editions ? > >Also, I would class myself as an intermediate to advanced VB6 developer, >does anyone have any good suggestions on books, free web tutuorials that >would get me started, I don't mind going right back to the beginning if I >have to to learn this, as I am falling behind a long way. > >Oops another thought, does anyone know if there is anything like an ASP.Net >Express edition or similar (or am I being thick lol) > >Thanks in advance for any help on this.... > >-- >Paul Hartland >paul.hartland at googlemail.com From Johncliviger at aol.com Mon Jul 28 03:50:35 2008 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Mon, 28 Jul 2008 04:50:35 EDT Subject: [dba-VB] VB2005 DatagridView with unbound calculated fields Message-ID: Hi All I have a form with a parent and child grids. On the child grid I have 2 unbound calculated fields. And everything works fine. What I need to do is add a subtotal field for 1 of the calculated fields. And the subtotal to appear in a textbox on the form for each parent. Anyone seen this before? Any sites that may explain how to do it? TIA johnc From paul.hartland at googlemail.com Wed Jul 30 04:56:11 2008 From: paul.hartland at googlemail.com (Paul Hartland) Date: Wed, 30 Jul 2008 10:56:11 +0100 Subject: [dba-VB] Visual Basic 6.0 Control CardScan Scanner Message-ID: <38c884770807300256o5b4c26a8s347c2a461d31bba8@mail.gmail.com> To all, We have started scanning personnel photo's onto our employee database, I am using Visual Basic 6.0 and the business card scanner CardScan 800c. It works but is a bit clumsy i.e. when we scan a phto the user clicks a button which runs a macro to represent the keystrokes etc required by the CardScan software to process & save the employee's photo. The macro works by firing events/keystrokes depending on the name of the currently open CardScan window, however we now want our European divisions in Belgium & Netherlands to do this as well, the problem being that the macro will not recognise the window name as it will not be in English. Has anyone ever worked with CardScan scanning devices, so that perhaps I could use some sort of general driver to control the CardScan scanner and save the picture. The closest I have came is using GDTwain, which lets me tell the unit to scan and save the picture, but I don't seem to be able to control the resolution etc of the photos. Any help on this will be appreciated, and thank you in advance for any help on this.... -- Paul Hartland paul.hartland at googlemail.com From Gustav at cactus.dk Wed Jul 30 05:36:17 2008 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 30 Jul 2008 12:36:17 +0200 Subject: [dba-VB] Visual Basic 6.0 Control CardScan Scanner Message-ID: Hi Paul Sounds like a job for csXImage which I have recommend several times: http://www.chestysoft.com/ximage/default.asp A fully functional trial is available for download. Scanners - not to say their buggy drivers - are nasty and unpredictable animals, and you will most likely - as I did - need the excellent support from Simon Chester. I believe he knows just about anything about scanners and their misbehaving. /gustav >>> paul.hartland at googlemail.com 30-07-2008 11:56 >>> To all, We have started scanning personnel photo's onto our employee database, I am using Visual Basic 6.0 and the business card scanner CardScan 800c. It works but is a bit clumsy i.e. when we scan a phto the user clicks a button which runs a macro to represent the keystrokes etc required by the CardScan software to process & save the employee's photo. The macro works by firing events/keystrokes depending on the name of the currently open CardScan window, however we now want our European divisions in Belgium & Netherlands to do this as well, the problem being that the macro will not recognise the window name as it will not be in English. Has anyone ever worked with CardScan scanning devices, so that perhaps I could use some sort of general driver to control the CardScan scanner and save the picture. The closest I have came is using GDTwain, which lets me tell the unit to scan and save the picture, but I don't seem to be able to control the resolution etc of the photos. Any help on this will be appreciated, and thank you in advance for any help on this.... -- Paul Hartland paul.hartland at googlemail.com From paul.hartland at googlemail.com Wed Jul 30 05:48:36 2008 From: paul.hartland at googlemail.com (Paul Hartland) Date: Wed, 30 Jul 2008 11:48:36 +0100 Subject: [dba-VB] Visual Basic 6.0 Control CardScan Scanner In-Reply-To: References: Message-ID: <38c884770807300348k718230a8s738e205140676a5@mail.gmail.com> Thank you Gustav, just downloaded it so will have a look.... 2008/7/30 Gustav Brock > Hi Paul > > Sounds like a job for csXImage which I have recommend several times: > > http://www.chestysoft.com/ximage/default.asp > > A fully functional trial is available for download. > > Scanners - not to say their buggy drivers - are nasty and unpredictable > animals, and you will most likely - as I did - need the excellent support > from Simon Chester. I believe he knows just about anything about scanners > and their misbehaving. > > /gustav > > >>> paul.hartland at googlemail.com 30-07-2008 11:56 >>> > To all, > > We have started scanning personnel photo's onto our employee database, I am > using Visual Basic 6.0 and the business card scanner CardScan 800c. It > works but is a bit clumsy i.e. when we scan a phto the user clicks a button > which runs a macro to represent the keystrokes etc required by the CardScan > software to process & save the employee's photo. The macro works by firing > events/keystrokes depending on the name of the currently open CardScan > window, however we now want our European divisions in Belgium & Netherlands > to do this as well, the problem being that the macro will not recognise the > window name as it will not be in English. > > Has anyone ever worked with CardScan scanning devices, so that perhaps I > could use some sort of general driver to control the CardScan scanner and > save the picture. The closest I have came is using GDTwain, which lets me > tell the unit to scan and save the picture, but I don't seem to be able to > control the resolution etc of the photos. > > Any help on this will be appreciated, and thank you in advance for any help > on this.... > > -- > Paul Hartland > paul.hartland at googlemail.com > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > -- Paul Hartland paul.hartland at googlemail.com From cfoust at infostatsystems.com Thu Jul 31 10:30:51 2008 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Thu, 31 Jul 2008 08:30:51 -0700 Subject: [dba-VB] VB2005 DatagridView with unbound calculated fields In-Reply-To: References: Message-ID: I'm not sure I understand. You want the subtotal to appear on the parent form, not in the parent grid, right? That should only take creating a dataset (or reference the datasource of the child grid and cast it as the appropriate object type) and then doing a compute on it to sum the value of the column in the child. You'd raise an event from the child grid if the value changed and a handler in the parent form would then recalculate the subtotal. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Johncliviger at aol.com Sent: Monday, July 28, 2008 1:51 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB2005 DatagridView with unbound calculated fields Hi All I have a form with a parent and child grids. On the child grid I have 2 unbound calculated fields. And everything works fine. What I need to do is add a subtotal field for 1 of the calculated fields. And the subtotal to appear in a textbox on the form for each parent. Anyone seen this before? Any sites that may explain how to do it? TIA johnc _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com