|
Hello,
Thanks for the reply.
The customer doesn't want to display in one line.
Any other ideas about a text box control?
Thanks,
|
|
|
|
|
Are these going to be editable fields? If not, use a label instead. Create a user control, place the fields where you want them and then put that user control on your form. Inheriting from textbox is the hard/long way around.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
Hello,
Yes, you are right. Only labels are needed.
I am thinking of creating a user control using a panel to hold the different labels.
|
|
|
|
|
steve_rm wrote: I am thinking of creating a user control using a panel to hold the different labels.
That would be the easiest way to do it.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
I have been working with a fair number of .VOB files (DVD format) that are up to 1 GB in size. When I use "delete" from Windows Explorer (or xplorer2) or "rm", it takes a very long time to delete the files. I have moved all the files I want to delete (and the directories they are in, into a single directory, and looking at it, I see there are over 40 GB of data to be deleted.
I thought I would write something that would run as a service or if not that, at least invisibly, to handle the job by watching for files to show up in a particular director, then deleting them at leisure.
However, in playing around with VB, I have discovered that I can programmatically delete files very quickly.
The way I do it is to open the file for write, then close it immediately. This makes it 0 length. I then close it, then delete it, and the job is done almost immediately.
My question is this... Is this method viable? Does Windows fix everything up later, taking care of deallocating the sectors, etc.? If so, what the heck is taking so long with the regular file delete from Explorer or a shell?
What pitfalls am I overlooking?
Thanks,
Larry
|
|
|
|
|
lar3ry wrote: The way I do it is to open the file for write, then close it immediately. This makes it 0 length. I then close it, then delete it, and the job is done almost immediately.
My question is this... Is this method viable? Does Windows fix everything up later
Yes.
lar3ry wrote: If so, what the heck is taking so long with the regular file delete from Explorer or a shell?
Perhaps a VERY fragmented volume. Try running Defrag on it once in a while.
|
|
|
|
|
Dave Kreskowiak wrote: lar3ry wrote:
If so, what the heck is taking so long with the regular file delete from Explorer or a shell?
Perhaps a VERY fragmented volume. Try running Defrag on it once in a while.
I recently defragmented all my drives, but I rechecked just to make sure. The Windows defragmenter (in System Tools)tells me I don't need to defragment.
I just did a couple of tests on some .VOB files, using the rm from WinXs, and the files, sizes, and times to delete were:
vts_01_2.vob 1073739776
vts_01_3.vob 1073739776
>elapsed rm -f VTS_01_2.VOB
rm -f VTS_01_2.VOB
Elapsed time: 00:22:27.609
>elapsed rm -f VTS_01_3.VOB
rm -f VTS_01_3.VOB
Elapsed time: 00:09:18.047
I timed these with a little command line utility I wrote. It's quite accurate. Note that rm does not use the Recycle Bin.
I am at a loss as to why this should take so long, as well as why the first one took over twice as long as the second one.
When I delete files from VB, using the method I asked about (open for write, close, delete), a directory containing 4 or 5 of these files takes only seconds to delete.
Any ideas?
|
|
|
|
|
This gets weirder. I thought perhaps I'd try a DOS 'del' command, and came up with the following:
vts_01_0.vob 167813120
>elapsed del vts_01_0.vob
del vts_01_0.vob
Elapsed time: 00:01:39.203
So I retried the rm command supplied by WinXs, with the following result:
vts_01_5.vob 91742208
>elapsed rm -f vts_01_5.vob
rm -f vts_01_5.vob
Elapsed time: 00:00:49.016
Which is a quite acceptable time, and a far cry from the 22+ minutes I have experienced, though still much slower than my Open/Close/Delete method. I decided to try it again, and got:
vts_02_1.vob 125822976
>elapsed rm -f vts_02_1.vob
rm -f vts_02_1.vob
Elapsed time: 00:00:59.859
Still quite acceptable, but I think I'll keep on working on my DevNull program, which will delete anything dropped into a particular directory, and do it quickly.
I am now wondering if it has anything to do with the occasional slow launching I am experiencing. When it happens, I launch a program, the hourglass shows up briefly, then nothing happens. If I launch a few more programs, the same thing happens. After a few minutes (2, 5, occasionally more), al the programs I tried to launch will suddenly show up. I am running XP, Service Pack 2. I have Service Pack 3, but have not installed it yet.
|
|
|
|
|
lar3ry wrote: and a far cry from the 22+ minutes
Man, your machine's got issues. I'd try looking at virus problems next. That's the only time I've ever experienced that kind of time deleting a file.
|
|
|
|
|
Thanks for the help, Dave. I haven't yet figured out why my file delete is so slow, but you are probably right in it being a virus or other malware, or perhaps just a corruption somewhere.
At any rate, I have finished my "DevNull" program, and it deleted all the stuff I wanted to get rid of (about 30GB) in about 5 seconds flat, and that's with debug stuff and a dirlist and filelist updating on screen. The time taken seems to depend on the number of files and dirs (and the depth of subdirs) rather than the size of the files.
A directory with 1.25 GB, 168 folders, and 2881 files, took about 19 seconds. Definitely solves my immediate problem.
|
|
|
|
|
Hi i am new in vb,actually i wrote a program in visual studio express edition 2008 ,now my program results are as follows:
12.003 23.034
12.009 23.8
12.15 24.2
12.49 24.56
...
so i wonder to know how i can plot a graph with above data in vb 2008?
2-one of my freinds advised me that using excell in your vb progam ,he explained to me you can use excell in ur program and plot a graph with using execll in your vb program so again i don't know how i can do it?so if any body can answe above question plz let me know.
Best Regards
Ali
|
|
|
|
|
There are several ways of creating charts in Visual Studio.
1. You can use third party tools such as Dundas Chart[^]
2. You can use Excel as your friend said (I personally prefer Excel, as it is easy to use compare to Dundas Chart )
3. If you have enough time and willingness of learning something new then, you can create your own graph by using 2D image library in .NET (This involves lot of hard work but it is so worth learning)
There is one artical on CP explaining how to use Excel from Visual Studio but the author has used J#, but then again it is .NET so you can workout things in VB. Here's the Link http://www.codeproject.com/KB/office/JExcel.aspx[^]
- Stop thinking in terms of limitations and start thinking in terms of possibilities -
|
|
|
|
|
Hi Thank you for ur answer,actully now i installed vb 2009 professional ,so i think it has dundas on it,so i wonder to know how i can connect my program result to report result?should i make an excel file or acces file or can directly use my program out put for it ,in fact my program calculates some parameters and i see them with this command:" consolewrite"so would you plz tell me how i can draw a graph with it?
the other thing i found out that the vb 2008 (professional edition )has the other tolls which it name "Professional Crystal Reports for Visual Studio" so can i use it too?if so,how?
again thank you very much for your considreation.
|
|
|
|
|
It will take me hours to write everything on how to use them. You can just Google it and it will give you more information than i can.
And yes you can use Access database for Dundas chart, you don't need to transfer anything to anything...
- Stop thinking in terms of limitations and start thinking in terms of possibilities -
|
|
|
|
|
Hello..
I am looking for some code (VB.net) so that i can see what my external (ADSL) router IP is. It would also be great if someone knows how i could also email this to myself daily? as i dont have a static IP with me isp.
|
|
|
|
|
People at this site do not usually just hand out code if you are not willing to work at the problem.
|
|
|
|
|
You'll have to write the code to query an external website for that information. The site has to return the IP address, such as http://www.whatsmyip.org[^]. There's no API cann you can use to get this information.
|
|
|
|
|
Hi,
this[^] may be
what you want: it returns just the IP address, no more, no less.
A simple code snippet based on WebRequest/WebResponse could get it programmatically.
|
|
|
|
|
Hello
I want to let my Vb.net program to let me view a specific channel of my usb receiver.
Please give me at least a hint to begin my research
Your will be greatly appreciated
And thanks in advance
Assaf
|
|
|
|
|
You'll need a Software Development Kit for the reciever. The best place to find that would be the manufacturer of the receiver. Don't be surprised if they don't offer one.
|
|
|
|
|
I have all the file of the receiver in the Install CD
but i don't know for what to search and what to ask
Thank you in advance for your help
Assaf
|
|
|
|
|
There might be something that says "SDK" on it, but I doubt it. Manufacturers don't normally ship SDK's with their hardware. You normally have to go to the manufacturers website for that.
|
|
|
|
|
Please I'm sorry to ask
But should i refer to the manufactures asking for the SDK or what ?
Really i appreciate your Help
Assaf
|
|
|
|
|
I think I've told you to do that twice now, haven't I?
|
|
|
|
|
Hello,
I have a problem :
I have a class Library (FooClasses) which has a refence to a second set of classes (Foo2Classes)
In Foo2Classes is a class (Foo3)
I have the following code
Imports System.Reflection
Imports Foo2Classes
Public Class FooClass
Protected Sub SomeSub()
Dim T as Type
T = Type.GetType("Foo2Classes.Foo3")
I have also tried
T = Type.GetType("FooClasses.Foo2Classes.Foo3")
End Sub
End Class
The T cant be found by reflection so I am assuming I must load the Foo2Classes assembly first.
If this is the case how can I load the assembly without using a hardcoded path in a loadfrom.
What I want to be able to do is to use the fact that it has been referenced in my FooClasses.
Can you get the path from the assembly reference , rather than hardcoding it OR putting in a partially qualified pathname ie "/subdir/Foo2Classes.dll"
Thanks
Martin
life is a bowl of cherries
go on take a byte
|
|
|
|
|