|
First of all sorry for that
I think expert programmer don't see this type of thing like bold and alignment. They just concentrate on problem and write desired solution.
So please if you have a solution than reply otherwise no.
Again sorry for that Navaneeth
|
|
|
|
|
dcdhingra wrote: I think expert programmer don't see this type of thing like bold and alignment. They just concentrate on problem and write desired solution.
Errm, No we're human too, and in fact expert programmers will expect well written code and within set convensions.
dcdhingra wrote: So please if you have a solution than reply otherwise no.
With this sort of attitude, I will be suprised if anyone will help you now.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Hello Steve Jowett
you are right,
Actually i have posted near about 5 types of outlook problem in codeproject.com.
No one give desired solution of my problem except bold and italic and alignment issue..
I m really sorry to all who read this. But in frustration and for newbie it can happened.
I will change my attitude.
Thanks for reply
Dharmchand dhingra
|
|
|
|
|
I've got a VB.Net windows program that monitors a database
This progam sits in a repetitive loop. I would like to be able to output some data about what the program, had been doing in each loop.
The problem is that the listbox on the user interface does not display anything until the process has eneded.
Does any onw know how I do this?
|
|
|
|
|
Martijn Groen wrote: The problem is that the listbox on the user interface does not display anything until the process has eneded.
Looks like you have only a single thread. Try to run the operation on a different thread. If you are adding items continuosly in a tight loop, use ListBox.BeginUpdate()[^] and once finished call ListBox.EndUpdate()[^]. This will prevent unnecessary drawing the listbox.
|
|
|
|
|
Thanks Navaneeth
I've tried using the update. It doesn't seem to do what I'm trying to achieve.
What I need is to be able to update the listbox realtime eg to show data flowing through (mid loop) rather then render the control with all data when the sub completed execution.
I want to build a data flow monitoring tool that sites on a desktop.
For the below code I'm aiming forthe application to pump a new item into the listbox visually in every iteration of the loop. I've added the thread sleep to slow it down and spread the timestamp apart.
Dim counter As Integer = Nothing
Do While counter < 100
counter += 1
ListBox1.Items.Add(" timestamp output " & Now)
Threading.Thread.Sleep(200)
Loop
Does anyone have any ideas?
|
|
|
|
|
Again, you have to move the code that is generating the data to a new thread, then Invoke a method on the form to update the ListBox on the UI thread. Don't worry about the BeginUpdate and Endupdate methods just yet. Worry about getting the data to the control from a background thread first.
You may want to look into the BackgroundWorker component if doing your own threading is a bit intimidating.
|
|
|
|
|
Hi,
as others have said, you need a separate thread to keep things running AND your GUI alive.
Choose one of Thread, ThreadPool, or BackgroundWorker.
The former is the most flexible, the latter often is the most comfortable. You could implement a loop in its DoWork handler, include a Thread.Sleep if you want to, and call ReportProgress() to report progress on the GUI; i.e. your Progress handler could add data to the ListBox. That would seem the easiest way to avoid cross-thread problems. And you might want to read this little article[^] if you would consider another way (Thread, ThreadPool; or even BackgroundWorker without ReportProgress).
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Thanks to everyone for their feedback I've got it going now
|
|
|
|
|
I need to decorate my VB 2008 db app with icons for command buttons, data grid views etc. But I don't know where to go for a library of Icons to suit most situations. Can I have a top 10 with best value as a factor?
Thanks
|
|
|
|
|
There are free icons available on the Internet. You can get those if you search.
|
|
|
|
|
|
I recommend you use the fugee icon set. It's free and has a lot of icons.
http://www.pinvoke.com/[^]
Have you tried the Krypton Toolkit? http://www.componentfactory.com/free-windows-forms-controls.php
|
|
|
|
|
The Icon Factory do some excellent icon sets:
http://iconfactory.com/stockicons[^]
Not free, but not hugely expensive for what you get. Some very nice designs, too.
The fugue and diagona icons are nice (I have used them myself in the past) but if you use the free version you must include an acknowledgement in your application (that's what the $50 licence is all about, if you don't want to do that).
The crystal icon project is also very nice, but more Apple-oriented. They are covered by the LGPL licence. I've used these as well in the past, with good results.
http://www.everaldo.com/crystal/[^]
|
|
|
|
|
Thanks for these suggestions. I'll be loking into the packages as these will give me choice and consistency. I appreciate there are lots of free sites where you can search for Icons.
My preference is to pay for a package that has a good library of styles and themes.
Any more suggestions for "Pay for Packages" with good choice would be useful.
|
|
|
|
|
My VB code has been successfully reading and writing to MS Access for a long time on 32-bit machines. In the code, the instructions for the connection string include
"Provider=Microsoft.Jet.OLEDB.4.0".
When I try the same code on 64-bit machines (Vista - Service Pack 2), it does not work and my error message says that Microsoft.Jet.OLEDB.4.0 is not registered on the machine. However, MS Access 2007 does work by itself. Any suggestions?
Rich Feldman
|
|
|
|
|
There are no 64 bit Microsoft.Jet.OLEDB drivers.
You can however force your application to use the 32 bit drivers by changing the target cpu to x86 in the advanced compiler options on the project properties page.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
Unfortunately Jet Driver is not natively supported on 64 bit so the application has to run as 32 bit. Or should I rephrase there are no 64 bit Jet Drivers available.
|
|
|
|
|
Hi,all,i have projects written in vb6.0 to make it support unicode, but the richtext box have some problems in right to left layout and right to left reading order. I have tested some controls,but there is problem,like when input text mixed with ansi character,it will be in the wrong order. is there any other controls that can support unicode very well?any help will be appreciated,thanks!
|
|
|
|
|
AFAIK, no control supports Unicode rendering properly. It may be able to display Unicode characters, but not the complex symbols that are made by combining several other characters. In windows, you need to work with Uniscribe[^] to get a clear rendering. I am not sure how to call the methods in uniscribe from VB6.0.
|
|
|
|
|
Navaneeth,thank you very much!i am working with Uniscribe,thank you!
|
|
|
|
|
Does anyone know the syntax to use timers in vb 2008? every 5 seconds i need to call a routine. If anyone can help it is greatly appreciated.
Thanks
|
|
|
|
|
So open the ToolBox and drop a Timer on your form. Or were you thinking more along the lines of using one of the Timers in System.Threading or System.Timers?
|
|
|
|
|
Ha ha, I'm sorry I really was not specific in my question. That's my fault. In visual basic 6.0 I had a timer routine that worked fine, i would set mytimer.enabled = true and would have the interval = 5000 so it would run every 5 seconds. The routine that would run every time the timer would reach 5 seconds would call an output. The sub i wrote for that was simply:
Private sub myTimer_Timer()
call output()
end sub
This routine would run every five seconds using the timer. Now i am trying to do the same thing in visual basic 2008 and it uses something different than the Sub myTimer_Timer(). I think it uses the tick event. Well here is what i have so far and it doesnt seem to work for me.
Private Sub Form_load(ByVal sender As System.Object, ByVal e As System.EventArgs)_
Handles MyBase.Load
OutputTimer.Enabled = True
OutputTimer.Interval = 5000
End Sub
Private Sub OutputTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)_
Handles OutputTimer.Tick
Call Output()
End Sub
Thanks
|
|
|
|
|
You also need to call the Start method on the timer or it will not start ticking.
OutputTimer.Start() in your case. Add this after you have set the interval.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|