|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Shortening my source.Dear All,
I've been advised by a friend of mind that in VB you can shorten your source (he doesn't know how to do it, it said someone told him), for example I could have 'Microsoft.DirectX.Direct3D' in my source alot, but he said I could, at the beginning on my source, define a short handle, like 'dx3d' to equal that. So instead of typing the whole line, I can just use dx3d, and it will know what I'm talking about. I can't for the life of me find how to do this, I hope this doesn't come across as a stupid question. Regards. Paul. Kardon,
Put in top of your programs Imports Microsoft.DirectX.Direc3D or put this in your project properties in the tab for that. I hope this helps, Cor Show quoteHide quote "Kardon Coupé" <prefer.to@readon.newsgroups> schreef in bericht news:exkV6ZeiGHA.2208@TK2MSFTNGP05.phx.gbl... > Dear All, > > I've been advised by a friend of mind that in VB you can shorten your > source (he doesn't know how to do it, it said someone told him), for > example I could have 'Microsoft.DirectX.Direct3D' in my source alot, but > he said I could, at the beginning on my source, define a short handle, > like 'dx3d' to equal that. So instead of typing the whole line, I can just > use dx3d, and it will know what I'm talking about. > > I can't for the life of me find how to do this, I hope this doesn't come > across as a stupid question. > > Regards. > Paul. > At the top of your file you can add
Imports dx3d=Microsoft.DirectX.Direct3D Volia :-) Kardon Coupé wrote: Show quoteHide quote > Dear All, > > I've been advised by a friend of mind that in VB you can shorten your source > (he doesn't know how to do it, it said someone told him), for example I > could have 'Microsoft.DirectX.Direct3D' in my source alot, but he said I > could, at the beginning on my source, define a short handle, like 'dx3d' to > equal that. So instead of typing the whole line, I can just use dx3d, and it > will know what I'm talking about. > > I can't for the life of me find how to do this, I hope this doesn't come > across as a stupid question. > > Regards. > Paul. Hello Simon,
This is actually a terrible construct and I pray to any diety that will listen that MSFT takes this out of the next release. So you do Imports x=Microsoft.DirectX at the top of your file.. now 900 lines later you write a function that references x.SomeClass... YIKES! Just import the namespace and dont try to 'simplify' things by using namespace aliases. It's all about readability and maintainability. -Boo Show quoteHide quote > At the top of your file you can add > > Imports dx3d=Microsoft.DirectX.Direct3D > > Volia :-) > > Kardon Coupé wrote: > >> Dear All, >> >> I've been advised by a friend of mind that in VB you can shorten your >> sou >> > rce > >> (he doesn't know how to do it, it said someone told him), for example >> I could have 'Microsoft.DirectX.Direct3D' in my source alot, but he >> said I could, at the beginning on my source, define a short handle, >> like 'dx3d' >> > to > >> equal that. So instead of typing the whole line, I can just use dx3d, >> and >> > it >> will know what I'm talking about. >> >> I can't for the life of me find how to do this, I hope this doesn't >> come across as a stupid question. >> >> Regards. >> Paul. "Kardon Coupé" <prefer.to@readon.newsgroups> schrieb: 'Imports' + F1.> I've been advised by a friend of mind that in VB you can shorten your > source (he doesn't know how to do it, it said someone told him), for > example I could have 'Microsoft.DirectX.Direct3D' in my source alot, but > he said I could, at the beginning on my source, define a short handle, > like 'dx3d' to equal that. So instead of typing the whole line, I can just > use dx3d, and it will know what I'm talking about. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
Why Me? (Instead of Form1)
How do I increment a byte with out casting? Capturing mouse events (Mouse up and down on the desktop) How to walk through InnerExceptions? Threading in .Net... How to connect to database Cancel Constructor (Me = Nothing) Edit Mode Parent child binding question RichTextBox in Vs2005 Vb.Net shows unformatted RTF |
|||||||||||||||||||||||