|
hi dudes,
Please help me how to create a user control calendar display.
I am not able to understand the logic how to create
Thanks in advance.
-- modified at 7:26 Monday 11th December, 2006
Success is 99% failure
|
|
|
|
|
Look at some CP articles for user controls to see the approach to take.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
does anyone know how to iterate through a registry.
I have a registry key \HKEY_CURRENT_USER\Software\MyTest
and that has several folder below it:
\HKEY_CURRENT_USER\Software\MyTest\FolderA
\HKEY_CURRENT_USER\Software\MyTest\FolderB
\HKEY_CURRENT_USER\Software\MyTest\FolderC
I need some find some function in VB.Net 2005 that will produce a list or array like:
FolderA
FolderB
FolderC
I searched through CodeProject but couldnt find anything like that.
Any response gratefully appreciated.
Mark
|
|
|
|
|
Hi,
have a look at the Registry class and the RegistryKey class espcially its GetSubKeyNames function.
Robert
|
|
|
|
|
hello all,
am creating an simple application using vb6.0 and msaccess. my problem is i want to directly connected to printer by an button press event in a form.
Not going to any datareport or something. when they fill up all the fields in the form and then they press print button. but i dont know how 2 write code for printer connection? i think it is possible, but i cant do please help me. thank you....
|
|
|
|
|
|
hi all
how can I get Ascii code of characters in vb.net
AMR-CIS
|
|
|
|
|
You could google "Ascii character set" theres thousands out there or "Ascii character codes" for a full table if you liked.
By the way, What do you need this for?
Posted by The ANZAC
|
|
|
|
|
use the Asc function (see MSDN).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Create a new application and put a button on it and listbox on it.
in the buttons click event create a for loop from 0 to 255
in the loop put listbox1.items.add("Chr(loop iterator) = " & Chr(loop iterator))
that will give you the ascii chart in a listbox. The characters that are not normal characters will show up as as box. (chr(13), chr(10), ect...)
Hope this helps.
Recreating the wheel is the best way to appreciate what the previous coders have gone through to get you where you are at now.
|
|
|
|
|
I have a database driven program. On my form i need to have a checkbox. My problem is, how do i define this in my table defenition for data type. I was going to use boolean, but it turns out that you can't. So what data type do i use for a checkbox on my form.
Posted by The ANZAC
|
|
|
|
|
That depends on what kind of database you are using. What kind of database are you using?
---
b { font-weight: normal; }
|
|
|
|
|
SQL in visual studio 2005. its in mdf format.
Posted by The ANZAC
|
|
|
|
|
Use the Bit data type. In an SQL query it has the value 0 or 1, when accessed using parameters and returned in a data reader, it is represented as a boolean.
---
b { font-weight: normal; }
|
|
|
|
|
Great! Thankyou, that was my gut feeling, but helps to have confirmation. I tried it out, it works perfect thankyou.
Posted by The ANZAC
|
|
|
|
|
When writing a terminal emulation program of COM. A textbox is used as a terminal window for receiving and transmiting. All new text is .AppendText to the old one. This works fine and new text scrolling when total text length is within the .MaxLength range. But it stuck when this maxlength is reached. Have to manually clear the text then go on.
How to make the textbox works as a ring-buffer window? Discard the oldest text when maxlength is reached, and new text is added and scrolling in a line-by-line base?
Have tried richTextbox, only to find that the MaxLength attribute enlarged but the issue still exist. Do I have to handle all string[] by code, or is there an easy way? Thanks!
|
|
|
|
|
If text1.text.length + sNewText.length > text1.maxlength Then
text1.text=text1.substring(snewtext.length)
End If
text1.text &= sNewText
|
|
|
|
|
It works, only to change the 2nd line to:
text1.text=text1.text.substring(snewtext.length)
Tks
|
|
|
|
|
I'm currently developing freeware internet traffic monitoring program. Previously, I create Dial-up network (DUN) internet monitoring program using Delphi 6, you can download it at www.ia11.com/gprs.
Now, I rewrite the entire program using VB.NET and want to add universal traffic monitoring that monitor internet connection from both DUN and from LAN. I'm using System.Net.NetworkInformation.NetworkInterface to monitor specific network interface, but it cannot differ traffic from local and internet, so the statistic is not accurate.
How I can monitor internet traffic from any network interface (without selecting specific network interface) including from DUN? I need basic statistic like sent, receive, total sent, total receive, and speed. Thanks in advance.
Regards,
Irman Fauzi
web designer / web programmer
|
|
|
|
|
Hello,
Some parts of my VB.NET code that I used to compile with Visual Studio 2002 and the .Net Framework SDK 1.1 runs about 50% - 100% slower now that I am using VS 2005 / .Net 2.0.
All configuration/compilation settings are the same, I compared the old and new executables by running them outside VS.
The code that runs slower is code that runs on seperate threads, in some cases by using the ThreadPool (QueueUserWorkItem), in other cases by using Control.Invoke. More than 10 threads may be running at times.
Does anybody have any idea what may be causing this slowdown?
Thanks
Jim
|
|
|
|
|
Generally code compiled in framework 2.0 runs faster, as the compilers have gotten better at optimising, and the framework has improved. I remember reading somewhere about a 60% improvement.
What are you doing in the threads? Anything that might have changed from framework 1.1 to 2.0?
Anyway, if you want fast processing, threading is normally not the way to go, as the threading adds overhead.
---
b { font-weight: normal; }
|
|
|
|
|
The threads do lots of calculations (including math.log, math.exp and math.sqrt) and date/time manipulations (DateTime.Compare, .Substract,
.AddMonthts, .AddSeconds, TimeSpan.Compare, etc.).
Some GDI+ drawing also seems slower (i.e. Graphics.DrawLines).
|
|
|
|
|
Hi,
Guffa wrote: I remember reading somewhere about a 60% improvement.
slight improvements might be true but 60% is more a marketing wish than reality...
Robert
|
|
|
|
|
In fact, I did see clear speed improvements in other code (could very well have been 60% or more) but this was running on a dedicated thread.
All the code that has become slower either runs on a ThreadPool thread (so with background priority) or is called in the Paint event.
Meanwhile, I found that the slowdown is not being caused by any GDI+ methods nor probably any other specific framework things that I am using.
I am starting to suspect that from .Net 1.1 to 2.0 something has changed in the amount of priority given to background threads and/or Paint events.
Does anybody know of this?
|
|
|
|
|
I don't know anything about the priority for background threads, but I know that the Paint event is not run in a separate thread at all, but in the main thread of the application. The paint event goes through the regular message pump of Windows, so that hasn't changed at all. If the priority level of background threads has changed, that would of course be relative to the main thread, including the paint event.
Are you using any locking in your code? The code itself should not be running slower, so perhaps the threads are spending more time waiting for each other?
---
b { font-weight: normal; }
|
|
|
|