|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Visual Studio 2008 and Classes Inheriting From System.Web.UI.WebControls.StyleSystem.Web.UI.WebControls.Style. The file looks just like any other VB class I wrote, it is simple a text file with a name of the format *.vb. However, the Solution Explorer in Visual Studio 2008 displays it with a different icon and when I double click the file to edit it, the tab opened by Visual Studio 2008 has a title of: myfilename.vb [Design] And displays the text: To add components to your class, drag them from the ToolBox and use the Properties window to set their properties. To create methods and events for your class, click here to switch to code view. I can obviously click on "click here to switch to code view" or right click the file in Solution Explorer and select "View Code" to edit the code in the file, so I am not being restricted from editing the code using Visual Studio 2008. However, it is a pain in the neck to need to use a different method to open a file that is of the same type as all the others. Why is Visual Studio 2008 treating this file differently? Any help would be appreciated. Thanks. Hello Nathan,
Show quoteHide quote > I have a class written in Visual Basic that inherits from It is detected to be a designable file, and as such, Visual Studio opens > System.Web.UI.WebControls.Style. The file looks just like any other VB > class I wrote, it is simple a text file with a name of the format > *.vb. However, the Solution Explorer in Visual Studio 2008 displays it > with a different icon and when I double click the file to edit it, the > tab opened by Visual Studio 2008 has a title of: > > myfilename.vb [Design] > > And displays the text: > > To add components to your class, drag them from the ToolBox and use > the Properties window to set their properties. To create methods and > events for your class, click here to switch to code view. > > I can obviously click on "click here to switch to code view" or right > click the file in Solution Explorer and select "View Code" to edit the > code in the file, so I am not being restricted from editing the code > using Visual Studio 2008. However, it is a pain in the neck to need to > use a different method to open a file that is of the same type as all > the others. Why is Visual Studio 2008 treating this file differently? > Any help would be appreciated. Thanks. the designer. You can press F7 in the designer to switch to the code window. That is usually the fastest way. Just doubleclick and press F7. -- Jesse Houwing jesse.houwing at sogeti.nl I know how to switch to Code View, including using F7, that was never my
problem or question. My question is why is this *.vb file being treated differently than others? How exactly is it a designable file? It is a VB class that inherits from another class. Files such as *.aspx and *.master are designable, because they can be displayed visually (as something other than code), but this file cannot be displayed as anything other than code. Also, the tab that opens when I double click it in Solution Explorer does not display anything that can be edited, it just displays the text I mentioned in my original post; all you can do in the tab that is opened is click the appropriate part of that text to change to code view. In other words, I don't think there even is such a thing as Design View for *.vb files. What would be in the Design View for *.vb files? Visual Studio 2008 has utilities for certain parts of code that can be used, but those are separate windows or tabs, not Views. So I still don't understand why this *.vb file is being treated differently from other *.vb files. Any ideas? Show quoteHide quote "Jesse Houwing" <jesse.houwing@newsgroup.nospam> wrote in message news:e5317a7e7800b2a68cba8edaa8a6a05@news.microsoft.com... > Hello Nathan, > >> I have a class written in Visual Basic that inherits from >> System.Web.UI.WebControls.Style. The file looks just like any other VB >> class I wrote, it is simple a text file with a name of the format >> *.vb. However, the Solution Explorer in Visual Studio 2008 displays it >> with a different icon and when I double click the file to edit it, the >> tab opened by Visual Studio 2008 has a title of: >> >> myfilename.vb [Design] >> >> And displays the text: >> >> To add components to your class, drag them from the ToolBox and use >> the Properties window to set their properties. To create methods and >> events for your class, click here to switch to code view. >> >> I can obviously click on "click here to switch to code view" or right >> click the file in Solution Explorer and select "View Code" to edit the >> code in the file, so I am not being restricted from editing the code >> using Visual Studio 2008. However, it is a pain in the neck to need to >> use a different method to open a file that is of the same type as all >> the others. Why is Visual Studio 2008 treating this file differently? >> Any help would be appreciated. Thanks. > > It is detected to be a designable file, and as such, Visual Studio opens > the designer. You can press F7 in the designer to switch to the code > window. That is usually the fastest way. Just doubleclick and press F7. > > > -- > Jesse Houwing > jesse.houwing at sogeti.nl > >
Show quote
Hide quote
"Nathan Sokalski" <njsokal***@hotmail.com> wrote in message This is not happening for me, though I am using Web Developer Express 2008. news:evkxBKy2JHA.1424@TK2MSFTNGP02.phx.gbl... >I know how to switch to Code View, including using F7, that was never my >problem or question. My question is why is this *.vb file being treated >differently than others? How exactly is it a designable file? It is a VB >class that inherits from another class. Files such as *.aspx and *.master >are designable, because they can be displayed visually (as something other >than code), but this file cannot be displayed as anything other than code. >Also, the tab that opens when I double click it in Solution Explorer does >not display anything that can be edited, it just displays the text I >mentioned in my original post; all you can do in the tab that is opened is >click the appropriate part of that text to change to code view. In other >words, I don't think there even is such a thing as Design View for *.vb >files. What would be in the Design View for *.vb files? Visual Studio 2008 >has utilities for certain parts of code that can be used, but those are >separate windows or tabs, not Views. So I still don't understand why this >*.vb file is being treated differently from other *.vb files. Any ideas? > -- > Nathan Sokalski > njsokal***@hotmail.com > http://www.nathansokalski.com/ > > "Jesse Houwing" <jesse.houwing@newsgroup.nospam> wrote in message > news:e5317a7e7800b2a68cba8edaa8a6a05@news.microsoft.com... >> Hello Nathan, >> >>> I have a class written in Visual Basic that inherits from >>> System.Web.UI.WebControls.Style. The file looks just like any other VB >>> class I wrote, it is simple a text file with a name of the format >>> *.vb. However, the Solution Explorer in Visual Studio 2008 displays it >>> with a different icon and when I double click the file to edit it, the >>> tab opened by Visual Studio 2008 has a title of: >>> >>> myfilename.vb [Design] >>> >>> And displays the text: >>> >>> To add components to your class, drag them from the ToolBox and use >>> the Properties window to set their properties. To create methods and >>> events for your class, click here to switch to code view. >>> >>> I can obviously click on "click here to switch to code view" or right >>> click the file in Solution Explorer and select "View Code" to edit the >>> code in the file, so I am not being restricted from editing the code >>> using Visual Studio 2008. However, it is a pain in the neck to need to >>> use a different method to open a file that is of the same type as all >>> the others. Why is Visual Studio 2008 treating this file differently? >>> Any help would be appreciated. Thanks. >> >> It is detected to be a designable file, and as such, Visual Studio opens >> the designer. You can press F7 in the designer to switch to the code >> window. That is usually the fastest way. Just doubleclick and press F7. >> >> >> -- >> Jesse Houwing >> jesse.houwing at sogeti.nl >> >> > > Could there be something in your class that causes this? As a check, if you simply make a blank vb class that inherits from your parent class, does this issue occur? If not, then paste the "guts" of the class into this new class and see if the behaviour changes. -- Mike Here are two test classes I made, Class1.vb and Class2.vb. You will notice
that the only difference between them is that Class1 inherits from System.Web.UI.WebControls.Style while Class2 is simply an empty class: Class1.vb: Public Class Class1 : Inherits System.Web.UI.WebControls.Style End Class Class2.vb: Public Class Class2 End Class Class1 has the different icon and double clicking it opens it in Design View, while Class2 does all the usual, normal, expected stuff. This pretty much proves that it is inheriting from System.Web.UI.WebControls.Style that causes what is happening. And even though I think (and want) all *.vb files to open in Code View, if there was a Design View for *.vb files that inherit from certain classes that allowed you to make changes (double clicking *.aspx and *.master files opens them in Design View, but I have no problem with that since that is one of the ways to edit those files), I would be willing to accept that Visual Studio 2008 likes to open them in that Design View. However, the tab that is opened when you double click files that inherit from System.Web.UI.WebControls.Style does not provide any way of editing (or even viewing) the file, so I don't see any point in that tab ever being opened to begin with, since it has no purpose. I really don't know why this is not happening for you in Web Developer Express 2008, I guess it's just one of those small differences between the two. Show quoteHide quote "Family Tree Mike" <FamilyTreeM***@ThisOldHouse.com> wrote in message news:A8B5C7EE-1DF7-4BF9-B2BD-790150AB5E60@microsoft.com... > "Nathan Sokalski" <njsokal***@hotmail.com> wrote in message > news:evkxBKy2JHA.1424@TK2MSFTNGP02.phx.gbl... >>I know how to switch to Code View, including using F7, that was never my >>problem or question. My question is why is this *.vb file being treated >>differently than others? How exactly is it a designable file? It is a VB >>class that inherits from another class. Files such as *.aspx and *.master >>are designable, because they can be displayed visually (as something other >>than code), but this file cannot be displayed as anything other than code. >>Also, the tab that opens when I double click it in Solution Explorer does >>not display anything that can be edited, it just displays the text I >>mentioned in my original post; all you can do in the tab that is opened is >>click the appropriate part of that text to change to code view. In other >>words, I don't think there even is such a thing as Design View for *.vb >>files. What would be in the Design View for *.vb files? Visual Studio 2008 >>has utilities for certain parts of code that can be used, but those are >>separate windows or tabs, not Views. So I still don't understand why this >>*.vb file is being treated differently from other *.vb files. Any ideas? >> -- >> Nathan Sokalski >> njsokal***@hotmail.com >> http://www.nathansokalski.com/ >> >> "Jesse Houwing" <jesse.houwing@newsgroup.nospam> wrote in message >> news:e5317a7e7800b2a68cba8edaa8a6a05@news.microsoft.com... >>> Hello Nathan, >>> >>>> I have a class written in Visual Basic that inherits from >>>> System.Web.UI.WebControls.Style. The file looks just like any other VB >>>> class I wrote, it is simple a text file with a name of the format >>>> *.vb. However, the Solution Explorer in Visual Studio 2008 displays it >>>> with a different icon and when I double click the file to edit it, the >>>> tab opened by Visual Studio 2008 has a title of: >>>> >>>> myfilename.vb [Design] >>>> >>>> And displays the text: >>>> >>>> To add components to your class, drag them from the ToolBox and use >>>> the Properties window to set their properties. To create methods and >>>> events for your class, click here to switch to code view. >>>> >>>> I can obviously click on "click here to switch to code view" or right >>>> click the file in Solution Explorer and select "View Code" to edit the >>>> code in the file, so I am not being restricted from editing the code >>>> using Visual Studio 2008. However, it is a pain in the neck to need to >>>> use a different method to open a file that is of the same type as all >>>> the others. Why is Visual Studio 2008 treating this file differently? >>>> Any help would be appreciated. Thanks. >>> >>> It is detected to be a designable file, and as such, Visual Studio opens >>> the designer. You can press F7 in the designer to switch to the code >>> window. That is usually the fastest way. Just doubleclick and press F7. >>> >>> >>> -- >>> Jesse Houwing >>> jesse.houwing at sogeti.nl >>> >>> >> >> > > > This is not happening for me, though I am using Web Developer Express > 2008. Could there be something in your class that causes this? As a > check, if you simply make a blank vb class that inherits from your parent > class, does this issue occur? If not, then paste the "guts" of the class > into this new class and see if the behaviour changes. > > -- > Mike
Show quote
Hide quote
"Nathan Sokalski" <njsokal***@hotmail.com> wrote in message Just to put the information out there if someone else can help, I too see news:ubvfbX02JHA.1372@TK2MSFTNGP05.phx.gbl... > Here are two test classes I made, Class1.vb and Class2.vb. You will notice > that the only difference between them is that Class1 inherits from > System.Web.UI.WebControls.Style while Class2 is simply an empty class: > > Class1.vb: > > Public Class Class1 : Inherits System.Web.UI.WebControls.Style > End Class > > > Class2.vb: > > Public Class Class2 > End Class > > > Class1 has the different icon and double clicking it opens it in Design > View, while Class2 does all the usual, normal, expected stuff. This pretty > much proves that it is inheriting from System.Web.UI.WebControls.Style > that causes what is happening. And even though I think (and want) all *.vb > files to open in Code View, if there was a Design View for *.vb files that > inherit from certain classes that allowed you to make changes (double > clicking *.aspx and *.master files opens them in Design View, but I have > no problem with that since that is one of the ways to edit those files), I > would be willing to accept that Visual Studio 2008 likes to open them in > that Design View. However, the tab that is opened when you double click > files that inherit from System.Web.UI.WebControls.Style does not provide > any way of editing (or even viewing) the file, so I don't see any point in > that tab ever being opened to begin with, since it has no purpose. I > really don't know why this is not happening for you in Web Developer > Express 2008, I guess it's just one of those small differences between the > two. > -- > Nathan Sokalski > njsokal***@hotmail.com > http://www.nathansokalski.com/ > > "Family Tree Mike" <FamilyTreeM***@ThisOldHouse.com> wrote in message > news:A8B5C7EE-1DF7-4BF9-B2BD-790150AB5E60@microsoft.com... >> "Nathan Sokalski" <njsokal***@hotmail.com> wrote in message >> news:evkxBKy2JHA.1424@TK2MSFTNGP02.phx.gbl... >>>I know how to switch to Code View, including using F7, that was never my >>>problem or question. My question is why is this *.vb file being treated >>>differently than others? How exactly is it a designable file? It is a VB >>>class that inherits from another class. Files such as *.aspx and *.master >>>are designable, because they can be displayed visually (as something >>>other than code), but this file cannot be displayed as anything other >>>than code. Also, the tab that opens when I double click it in Solution >>>Explorer does not display anything that can be edited, it just displays >>>the text I mentioned in my original post; all you can do in the tab that >>>is opened is click the appropriate part of that text to change to code >>>view. In other words, I don't think there even is such a thing as Design >>>View for *.vb files. What would be in the Design View for *.vb files? >>>Visual Studio 2008 has utilities for certain parts of code that can be >>>used, but those are separate windows or tabs, not Views. So I still don't >>>understand why this *.vb file is being treated differently from other >>>*.vb files. Any ideas? >>> -- >>> Nathan Sokalski >>> njsokal***@hotmail.com >>> http://www.nathansokalski.com/ >>> >>> "Jesse Houwing" <jesse.houwing@newsgroup.nospam> wrote in message >>> news:e5317a7e7800b2a68cba8edaa8a6a05@news.microsoft.com... >>>> Hello Nathan, >>>> >>>>> I have a class written in Visual Basic that inherits from >>>>> System.Web.UI.WebControls.Style. The file looks just like any other VB >>>>> class I wrote, it is simple a text file with a name of the format >>>>> *.vb. However, the Solution Explorer in Visual Studio 2008 displays it >>>>> with a different icon and when I double click the file to edit it, the >>>>> tab opened by Visual Studio 2008 has a title of: >>>>> >>>>> myfilename.vb [Design] >>>>> >>>>> And displays the text: >>>>> >>>>> To add components to your class, drag them from the ToolBox and use >>>>> the Properties window to set their properties. To create methods and >>>>> events for your class, click here to switch to code view. >>>>> >>>>> I can obviously click on "click here to switch to code view" or right >>>>> click the file in Solution Explorer and select "View Code" to edit the >>>>> code in the file, so I am not being restricted from editing the code >>>>> using Visual Studio 2008. However, it is a pain in the neck to need to >>>>> use a different method to open a file that is of the same type as all >>>>> the others. Why is Visual Studio 2008 treating this file differently? >>>>> Any help would be appreciated. Thanks. >>>> >>>> It is detected to be a designable file, and as such, Visual Studio >>>> opens the designer. You can press F7 in the designer to switch to the >>>> code window. That is usually the fastest way. Just doubleclick and >>>> press F7. >>>> >>>> >>>> -- >>>> Jesse Houwing >>>> jesse.houwing at sogeti.nl >>>> >>>> >>> >>> >> >> >> This is not happening for me, though I am using Web Developer Express >> 2008. Could there be something in your class that causes this? As a >> check, if you simply make a blank vb class that inherits from your parent >> class, does this issue occur? If not, then paste the "guts" of the class >> into this new class and see if the behaviour changes. >> >> -- >> Mike > > the difference in the icon when inheriting from System.Web.UI.WebControls.Style. I'm not really sure what that icon means. -- Mike Hello Jesse,
Show quoteHide quote > Hello Nathan, Any class inheriting from Component (driectly or indirectly) is shown in > >> I have a class written in Visual Basic that inherits from >> System.Web.UI.WebControls.Style. The file looks just like any other >> VB class I wrote, it is simple a text file with a name of the format >> *.vb. However, the Solution Explorer in Visual Studio 2008 displays >> it with a different icon and when I double click the file to edit it, >> the tab opened by Visual Studio 2008 has a title of: >> >> myfilename.vb [Design] >> >> And displays the text: >> >> To add components to your class, drag them from the ToolBox and use >> the Properties window to set their properties. To create methods and >> events for your class, click here to switch to code view. >> >> I can obviously click on "click here to switch to code view" or right >> click the file in Solution Explorer and select "View Code" to edit >> the code in the file, so I am not being restricted from editing the >> code using Visual Studio 2008. However, it is a pain in the neck to >> need to use a different method to open a file that is of the same >> type as all the others. Why is Visual Studio 2008 treating this file >> differently? Any help would be appreciated. Thanks. >> > It is detected to be a designable file, and as such, Visual Studio > opens the designer. You can press F7 in the designer to switch to the > code window. That is usually the fastest way. Just doubleclick and > press F7. the designer. It's just the way it works. -- Jesse Houwing jesse.houwing at sogeti.nl OK, I guess that explains why Visual Studio 2008 is doing what it's doing,
but it still doesn't answer my question as to why Visual Studio 2008 was designed to do this. The tab that is opened doesn't let you do any designing (the tab has no functionality other than clicking to change to Code View), so is it really a Design View? Like I said in another post in this thread, what is the reason for this tab ever being opened at all? Thanks. Show quoteHide quote "Jesse Houwing" <jesse.houwing@newsgroup.nospam> wrote in message news:e5317a7e7800b6558cbaa1c6bfa4082@news.microsoft.com... > Hello Jesse, > >> Hello Nathan, >> >>> I have a class written in Visual Basic that inherits from >>> System.Web.UI.WebControls.Style. The file looks just like any other >>> VB class I wrote, it is simple a text file with a name of the format >>> *.vb. However, the Solution Explorer in Visual Studio 2008 displays >>> it with a different icon and when I double click the file to edit it, >>> the tab opened by Visual Studio 2008 has a title of: >>> >>> myfilename.vb [Design] >>> >>> And displays the text: >>> >>> To add components to your class, drag them from the ToolBox and use >>> the Properties window to set their properties. To create methods and >>> events for your class, click here to switch to code view. >>> >>> I can obviously click on "click here to switch to code view" or right >>> click the file in Solution Explorer and select "View Code" to edit >>> the code in the file, so I am not being restricted from editing the >>> code using Visual Studio 2008. However, it is a pain in the neck to >>> need to use a different method to open a file that is of the same >>> type as all the others. Why is Visual Studio 2008 treating this file >>> differently? Any help would be appreciated. Thanks. >>> >> It is detected to be a designable file, and as such, Visual Studio >> opens the designer. You can press F7 in the designer to switch to the >> code window. That is usually the fastest way. Just doubleclick and >> press F7. > > > Any class inheriting from Component (driectly or indirectly) is shown in > the designer. It's just the way it works. > > -- > Jesse Houwing > jesse.houwing at sogeti.nl > > Hello Nathan,
You could drag components on it from the toolbox. Not very useful for the style class I know.... Jesse Show quoteHide quote > OK, I guess that explains why Visual Studio 2008 is doing what it's --> doing, but it still doesn't answer my question as to why Visual Studio > 2008 was designed to do this. The tab that is opened doesn't let you > do any designing (the tab has no functionality other than clicking to > change to Code View), so is it really a Design View? Like I said in > another post in this thread, what is the reason for this tab ever > being opened at all? Thanks. > > "Jesse Houwing" <jesse.houwing@newsgroup.nospam> wrote in message > news:e5317a7e7800b6558cbaa1c6bfa4082@news.microsoft.com... > >> Hello Jesse, >> >>> Hello Nathan, >>> >>>> I have a class written in Visual Basic that inherits from >>>> System.Web.UI.WebControls.Style. The file looks just like any other >>>> VB class I wrote, it is simple a text file with a name of the >>>> format *.vb. However, the Solution Explorer in Visual Studio 2008 >>>> displays it with a different icon and when I double click the file >>>> to edit it, the tab opened by Visual Studio 2008 has a title of: >>>> >>>> myfilename.vb [Design] >>>> >>>> And displays the text: >>>> >>>> To add components to your class, drag them from the ToolBox and use >>>> the Properties window to set their properties. To create methods >>>> and events for your class, click here to switch to code view. >>>> >>>> I can obviously click on "click here to switch to code view" or >>>> right click the file in Solution Explorer and select "View Code" to >>>> edit the code in the file, so I am not being restricted from >>>> editing the code using Visual Studio 2008. However, it is a pain in >>>> the neck to need to use a different method to open a file that is >>>> of the same type as all the others. Why is Visual Studio 2008 >>>> treating this file differently? Any help would be appreciated. >>>> Thanks. >>>> >>> It is detected to be a designable file, and as such, Visual Studio >>> opens the designer. You can press F7 in the designer to switch to >>> the code window. That is usually the fastest way. Just doubleclick >>> and press F7. >>> >> Any class inheriting from Component (driectly or indirectly) is shown >> in the designer. It's just the way it works. >> >> -- >> Jesse Houwing >> jesse.houwing at sogeti.nl Jesse Houwing jesse.houwing at sogeti.nl
Problem with embedded carriage returns
trouble reading word documents Good tutorial for working with XML problem reading array data from structure When double precision isn't very precise how to know if to close sqlreader Multiple File Select Not Working In Published ClickOnce Application Loading an XML Document? drag and drop issue importing data from excel sheet to datagridView |
|||||||||||||||||||||||