|
Funny, this was in the Visual Basic Studio Help File. Maybe Microsoft ought to think before the write a help file!
|
|
|
|
|
Yes, it is documented, you just have to read it first. It's in the documentation for DOS, Windows, Visual Studio, and the .NET Framework. It's also found by a examination of fully qualified filepaths too. How about launching a program with a path like this:
C:\WINDOWS\NOTEPAD.EXE /P MYFILE.TXT
You'll note the colon seperates the drive letter from the rest of the path. The backslash seperates folder and file names. And the forward slash is reserved for specifying command line parameters.
Under the .NET Framework 1.x, the invalid characters are returned by Path.InvalidPathChars[^]. Under 2.0, that functionality has been split between two methods: Path.GetInvalidFileNameChars[^] and GetInvalidPathChars[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Change the format string to any combination you want.
"yyyy-MM-dd hh.mm.ss"
Remember, slashes and colons are not legal in filenames.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
This is the code, i can't preview the second pages on print preview,i reach the first page last line and the following data should be preview on second page..but the data preview on the 1st page and cover the 1st layer's data,Please help..project deadline around..thanks
If TotalRecord - 1 <> Counts - 1 Then
For i As Integer = 0 To Counts - 1 Step 1
If EOF = True Then
With e.Graphics
.DrawString("SAFEBANK", drawFontTitle, drawBrush, 450.0F, 50.0F, StrFormatCenter)
.DrawString(Now.Date, drawFont, drawBrush, e.MarginBounds.Right - 50, 50.0F, StrFormatCenter)
.DrawString("Tel No.:XXX-XXXXXXXX", drawFontTitle, drawBrush, 450.0F, 80.0F, StrFormatCenter)
.DrawString("Fax No.:XXX-XXXXXXXX", drawFontTitle, drawBrush, 450.0F, 110.0F, StrFormatCenter)
.DrawLine(mypen, 90.0F, 150.0F, 750.0F, 150.0F)
.DrawString("TransID", drawFont, drawBrush, 50.0F, 170.0F, StrFormatLeft)
.DrawString("TransTime", drawFont, drawBrush, 130.0F, 170.0F, StrFormatLeft)
.DrawString("Amount RM", drawFont, drawBrush, 280.0F, 170.0F, StrFormatLeft)
.DrawString("AC number", drawFont, drawBrush, 420.0F, 170.0F, StrFormatLeft)
.DrawString("AC number", drawFont, drawBrush, 540.0F, 170.0F, StrFormatLeft)
.DrawString("Server", drawFont, drawBrush, 680.0F, 170.0F, StrFormatLeft)
yPos = 170.0F + Count * drawFont.GetHeight
.DrawString(TransID(i), drawFont, drawBrush, 50.0F, yPos, StrFormatLeft)
.DrawString(TransTime(i), drawFont, drawBrush, 130.0F, yPos, StrFormatLeft)
.DrawString(Amount(i), drawFont, drawBrush, 280.0F, yPos, StrFormatLeft)
.DrawString(Acc1(i), drawFont, drawBrush, 420.0F, yPos, StrFormatLeft)
.DrawString(Acc2(i), drawFont, drawBrush, 540.0F, yPos, StrFormatLeft)
.DrawString(Server(i), drawFont, drawBrush, 680.0F, yPos, StrFormatLeft)
Count += 1
TotalRecord += 1
EOF = False
End With
Else
yPos = 170 + Count * drawFont.GetHeight
With e.Graphics
.DrawString(TransID(i), drawFont, drawBrush, 50.0F, yPos, StrFormatLeft)
.DrawString(TransTime(i), drawFont, drawBrush, 130.0F, yPos, StrFormatLeft)
.DrawString(Amount(i), drawFont, drawBrush, 280.0F, yPos, StrFormatLeft)
.DrawString(Acc1(i), drawFont, drawBrush, 420.0F, yPos, StrFormatLeft)
.DrawString(Acc2(i), drawFont, drawBrush, 540.0F, yPos, StrFormatLeft)
.DrawString(Server(i), drawFont, drawBrush, 680.0F, yPos, StrFormatLeft)
Count += 1
TotalRecord += 1
End With
End If
If Count = LastRecord Then
e.HasMorePages = False
Count = 0
EOF = True
Else
e.HasMorePages = True
End If
Next
End If
From
Daryl
|
|
|
|
|
Hello
Could you please help me understand how a client-server application can be
accomplished in VB.Net or C# (Windows application)?
Traditionally, in VB6 a Client-Server application required two separate
applications:
1) - The UI application - that would be deployed on the client machines;
2) - The server application that contained the Business layer and the
database layer(this doesn't have a user interface of course)
At the installation time of the UI, it was an option to provide the IP
address of the server so the client will know where the server components can
be found on the network....
How this architecture can be achieved using VB.Net or C#.net ? Is still
possible using .Net ? Or .Net uses different approach?
Thank you so much
sachin
|
|
|
|
|
dotnethunk wrote: Traditionally, in VB6 a Client-Server application required two separate
applications:
1) - The UI application - that would be deployed on the client machines;
2) - The server application that contained the Business layer and the
database layer(this doesn't have a user interface of course)
That is what client/server means, regardless of language.
dotnethunk wrote: How this architecture can be achieved using VB.Net or C#.net ? Is still
possible using .Net ? Or .Net uses different approach?
It would work the same way, or you could make the server a web service, which is a much nicer approach, then you don't need an IP address, and it will just always work, without any sort of network code on your part.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi Experts!
How to make this kind of menus in VB.NET?
You can see a screenshot of it here:
http://www.mikze.dk/menu.jpg
Its just like the "Common Tasks" menu in the window folders!
Greetings -
|
|
|
|
|
Try this:
http://www.codeproject.com/cs/miscctrl/XPTaskBar.asp
|
|
|
|
|
|
I have to add reset function in my project which will be called on every page and it will find out all the asp controls of a page at run time and reset them.
Can any on help me in this.............. (I need this using JavaScript)
|
|
|
|
|
|
Thanks a lot Costica,
I am able to reset TextBoxes but not DropDown using this code, can you please help in this.
-- modified at 3:21 Wednesday 18th October, 2006
|
|
|
|
|
|
Thanks again Costica,
I have to add one more functionality to reset radioButton as well as checkBoxes to this function please help in this.
|
|
|
|
|
Hey all.
I am building a small in office chat program. I also want to allow user to interact from off site locations. Does the .Net framework have the right functionality? If so can you give me a brief description or a link to a tut?
Brad
Australian
Have you tried Rebooting it?
|
|
|
|
|
Ahhh, the ubiquitous chat application. All you have to is Google for "vb.net chat" and you'll come up with hundreds of examples.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi
Is it possible to catch URL's in IE with VB.Net and then prevent access to it?
-- modified at 7:23 Tuesday 17th October, 2006
|
|
|
|
|
No. Once the URL is typed in and the user hits enter, it's already too late. The request has been sent to the server.
Your best option is this case is either buy and setting up, or writing your own proxy server. The web browser, when configured properly, then makes all its requests through your proxy server and the proxy gets to decide which requests to forward on and which to stop.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I think i should be more specific about what is needed? Actually i just want to record whatever user does with web page for example it should be able to record all the textboxes which a user fills on a webpage and should be able to generate some script (vbscript) accordingly.
|
|
|
|
|
I already answered this in your previous post.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
How do i remove new line(where they hit enter key when entering data) in a string using vb .net?
eg :
my name
is paul
results to be:
my name is paul
Thank you.
|
|
|
|
|
Replace Environment.NewLine with a space.
---
b { font-weight: normal; }
|
|
|
|
|
yes, a dll can be changed to an exe, if we provide it the main entry function
I found this answer at some site.Is the about statement true.
If yes please explain.
Thanks
|
|
|
|
|
Only if you have the source code and can add the appropriate code to make the .EXE you want, either a console app or a Windows Forms app.
If you don't have the source for the .DLL, it's impossible to do. You're only option is to write an .EXE wrapper application around the functionality exposed by the .DLL.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Sir,
In C++ exe we knows that there is a main() .So Window knows where to execute the code in the c++ output exe, I mean there is a starting point , that is the execution will take place from the main().Now my queston is , In the Vb.Net What is the starting point.I mean From which point the exe will execute the code.
Thanks.
|
|
|
|
|