|
You could use the Opacity property.
But I'd suggest to find out why the form "freezes" instead of trying to hide that fact from the user. What do you do in e.g. The Form_Load event?
|
|
|
|
|
I know of two popular ways to get such a freeze:
1. you are performing a lengthy operation on the main thread, either in the Form's constructor, Load handler, or Shown handler.
2. you are performing an illegal access to a Control from another thread, which is simply not allowed and may result in all kinds of odd behavior.
if #1, consider delaying the long operation, by putting it off to a BackgroundWorker. if #2, fix your code (maybe see here[^]).
|
|
|
|
|
no, i used other component rich text box and i think it's too heavy to load on the first time.
that's why i'm going to load it on splash screen.
btw thankyou for the help, problem solved.
|
|
|
|
|
This is the craziest problem I've ever seen. I have a text file containing a line of financial data for each minute of the trading day -- 400/day. I extract 4 data for each minute, calculate a ratio for two of these data points, and print what I've extracted plus the calculated value as one line, comma delimited, to a final text file. I do this process line by line. All variables are zeroed out between loops.
The calculated value is a ratio, and when the ratio is below 1, it erratically prints to the file with an order of magnitude error -- e.g., 2.567 instead of .0267. This happens consistently inside a any one file when I repeat the routine, but NOT consistently among days. There is no pattern of frequency of occurrence within the file other than when I repeat the processing, the same minutes show the error. The errors are spread throughout the day's data. The only common factor is that for files showing the error, the denominator of the calculation is alway larger than the numerator. It never occurs when the numerator is larger.
I've stepped through those days showing the errors, watched the ratio values as they are calculated, and never see an error. It only appears in the printed file. Have also tried all kinds of formatting statements and the errors always appear, for the same minutes. I've examined the original data file and an intermediate processing file and can find no irregularities.
I guess my question is what could be happening in the Print to file process that causes this error? It appears with both the Print and Write statements.
Thanks for any ideas.
|
|
|
|
|
You might like to add the code you are using to your question (edit the original) including the details of any string formats you are using.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
6rtury wrote: I guess my question is what could be happening
Without code, we would also have to guess. Mine would be a formatting-problem, a wrong interpretation of the decimal-separator.
Bastard Programmer from Hell
|
|
|
|
|
I am new to vb and need help in establishing a web service application(JSON) connection using VB.
any suggestion and help is highly valuable for me.
|
|
|
|
|
haidernitc wrote: <layer>any suggestion and help is highly valuable for me.
There's an example here[^]. They're using XML, but shouldn't be too hard to replace that with JSON.
Bastard Programmer from Hell
|
|
|
|
|
thanks for your reply but unfortunately the link is dead.
please suggest me a code either of any language which can use for connecting a web service.
my application is developed in visual basics and need to send and get the values from server.
|
|
|
|
|
haidernitc wrote: please suggest me a code either of any language which can use for connecting a web service.
Using a Web Service in VB.NET[^]
Bastard Programmer from Hell
|
|
|
|
|
|
Hello
I've been looking for some help with regard to using the ICSharpCode.SharpZipLib.GZip library to stream read embedded gz files (i.e. File1.tar.gz has a.tar.gz, b.tar.gz, etc). I can use this library to successfully read .gz files which do not contain embedded .gz files but it's been difficult finding a solution to read embedded files. The following is a snippet of what I currently have. Any ideas or suggestions would be appreciated.
For Each fi As FileInfo In di.GetFiles("*.gz")
fullPath = dirpath + fi.ToString
Dim gzips As GZipInputStream
gzips = New GZipInputStream(File.OpenRead(fullPath))
reader = New StreamReader(gzips)
Do While Not readLine Is Nothing
readLine = reader.ReadLine
Loop
|
|
|
|
|
Why the StreamReader ?
Dim zipInStream as ZipInputStream = new ZipInputStream(fileStreamIn)
Dim entry as ZipEntry = zipInStream.GetNextEntry()
Taken from this[^] CodeProject article
Bastard Programmer from Hell
|
|
|
|
|
Hello people,
I wondering how you could encrypt a string a text in a textbox in 128-bit AES and also 256-bit AES (if applicable), and be able to de-crypt it (like binary code converting). It would also help if it was a few short lines of code or short as possible (if applicable).
Regards
Brandon T. H.
|
|
|
|
|
Brandon T. H. wrote: It would also help if it was a few short lines of code or short as possible (if applicable).
In a Microsoft product? But seriously, there are lots of links to .NET encryption around, including .NET Encryption Simplified[^] in the CodeProject Articles section.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Thanks a bunch.
|
|
|
|
|
Hi,
I want to load and use two different versions of same dll in my project. only solution i could think of is to use same dll with different namespace, but I cannot change the dll since its third party. so i am stuck here...is it even possible? if yes then how?
Not sure if this is the right forum, since i want to achieve this in vb.net application so posted here. any kind of help is appreciated!
Regards,
Affan Toor
|
|
|
|
|
Are these COM-based, normal library or .NET .DLL's??
|
|
|
|
|
Thanks for reply.
these are .NET DLLs. basically our organization are shifting from an older version of third party API to its latest version. and we want to make this transition smooth, we want to use both for a while and gradually replace the functionality from older version to new version.
Regards,
Affan Ahmad Toor
|
|
|
|
|
why you want this? i've a generic solution, but will be very painstaking... so, depending on why you want that, we can delivery a simple solution...
|
|
|
|
|
thanks for reply.
our organization are shifting from an older version of third party API to its latest version. and we want to make this transition smooth, we want to use both for a while and gradually replace the functionality from older version to new version. if you have any alternative solution then please share.
Regards,
Affan Ahmad Toor
|
|
|
|
|
i don't know if this will work on VB, but i've found this workaround:
http://blogs.msdn.com/b/abhinaba/archive/2005/11/30/498278.aspx[^]
also, this post from stackOverflow can be useful: http://stackoverflow.com/questions/5916855/using-multiple-versions-of-the-same-dll[^]
also, i've found that in SharpDevelop you could simple select the reference in the solution explorer, click properties and set a alias, this works for VB and C#, i can't verify that this is true for visual studio (i don't have it here), but its a good start point
if nothing works, the solution is to create 2 more class library projects and warp each version in a diferent namespace... too much work
EDIT: i haven't managed to reference the alias defined in SharpDevelop into the code, so, i think you will be forced to warp the dlls...
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
That is what the Reflection namespace is for in .Net. You'll have to load the dll's dynamically. I don't think it is worth it though.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hey All,
So I am currently attempting to wrap my head around create multi-threaded programs and I am currently running into an issue when using a Shared variable across multiple threads.
The program is structured as follows:
Public Shared IsActive as Boolean
Main Thread = GUI
Sets the Value of IsActive through a Button Control
Two Worker Threads
Both threads are while loops that read the IsActive Boolean
Ex:
While IsActive = True
Do Work
End While
However when I change the value of IsActive from the Main Thread it causes the worker threads to stop (ThreadState = 16).
I have been reading that I have to synchronize/lock shared resources and have tried SyncLock and Monitor methods without success (it is entirely possible I am not using the above correctly, so If someone could provide proper examples for the above situation using the mentioned methods please share them).
Thanks a bunch for any and all help, much appreciated!
If further code is needed let me know.
Thanks!
|
|
|
|
|
If I read your post correctly, you declare a variable in your UI code (isActive) and set it to True. Then you start two threads that both look at isActive and run until isActive if False. When you set isActive to False, both threads stop.
This is the expected behavior. Or am I missing something? What are you expecting to happen?
|
|
|
|