|
I am a student at the faculty of engineering,Cairo university, depsatment of electronics and electrical communications.
My graduation project involves the use of the Diffie-Hellman key agreement protocolusing visual basic.I hope someone can help me locate something that can do the mathematical operations needed for such an algorithm.
Thank you.
|
|
|
|
|
What kind of math calculations are required in that algorithm?
BTW, you can use DLLs that are created for both Visual Basic and C. I am sure that someone has written a math library in C that can help.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I need exponentials for large numbers (160+ bits)
I found a dll called CypherMathWin32,but I can't get my hands on it.
|
|
|
|
|
|
I can't buy a 300 dollars DLL
Can any body help me in finding a DLL, an OCX, or any other written code that I can use to implement the Montgomery modular exponentiation?
|
|
|
|
|
How do u make a new line in text box programmatically in VB.NET?
I was hoping to use C++ format code "\n":
For i = 0 To (Count - 1) Step 1
txtMsgBox.Text = txtMsgBox.Text.Concat("\n" & lstContactList.SelectedItems(i).Text & txtMsg.Text)
Next i
But no, it didnt work.
Thanx
norm
|
|
|
|
|
You can use :
<br />
txtMsgBox.Text=txtMsgBox.Text+ vbCrLf + "NewString"<br />
as vbCrLf = \n in VB
make sure that :
<br />
txtMsgBox.MultiLine=True<br />
|
|
|
|
|
Actually vbCrLf = \r\n, Carriage Return (Cr), Line Feed (Lf)
vbCr = \r
vbLf = \n
Jason Gerard
|
|
|
|
|
Try CrLf Carriage Return and Line Feed characters.
use one every time you want to start a new line.
|
|
|
|
|
All the previous versions of VB could not support MAPI to its fullest. Can VB.net?
If not is there any alternative for creating a complete email program with VB.net other than CDO?
|
|
|
|
|
hi, how can i use SetTimer in a class, i keep getting these errors:
Invalid use of adressof operator
my code is:
lngTimerID = SetTimer(0, 0, 200, AddressOf mysub)
Public Sub mysub(ByVal hwnd As Long, ByVal uMsg As Long, ByVal idEvent As Long, ByVal dwTime As Long)
Dim retval As Long ' return value
objWinSock.SendData ByteCode & "rcon " & rconNumber & " " & s_pass & " " & s_command
objWinSock.Close
Set objWinSock = Nothing
retval = KillTimer(vbNull, 1)
End Sub
|
|
|
|
|
In VB6, the AddressOf operator can only be used for procedures in a module, not a class. To see how to work around the problem, look here.
|
|
|
|
|
Hi, I wish to build a control that resembles those panes, "ToolBox" for example, that "slides" into the view when click on the tab.
1. Is there a name for these controls?
2. Any idea how to build them?
3. How can I set a "control" opacity? Can I control individual individual "control" opacity as suppose to controlling dialog opacity?
Something similar to what u can see at bluetooth site:
http://www.bluetooth.com/
Thanks!
norm
|
|
|
|
|
I'm working on a program that is the front end for a database (Access). One of the fields in the data base is set up to use options set in the field's 'Row Source' during design of the database. (When viewing the records in Access it comes up as a list box) I am wondering how I can get the options for that field into my program without hardcoding them. I can get the option that is currently chosen for a record back, but I need to know how to get ALL the possible options for that field. I'm using ADODB objects to access the database. Any help or pointers in the right direction will be much appreciated.
Quinn
|
|
|
|
|
If you are using the ADO object in your application, do a simple query:
Select [YourField] from [YourTable]
Once you have executed that SQL statement say when the form loads, you can add items with something like:
ListBox.Clear()
Do While Not adors.EOF
ListBox.Add(adors("[YourField]"))
Loop
HTH
Nick Parker
|
|
|
|
|
That didn't work. Stoopid IE made me lose my reply and I'm too tired to type it again. In short, that will only return the one option that a row has as a value. If one of the options were never selected it wouldn't show up in the list box. Thx though. Anything else you can suggest?
Quinn
|
|
|
|
|
Are you saying such as if someone were to hold down the shift key when clicking the mouse inside the listbox, thus selecting multiple items? Is your question on how to get the value of all those selected items?
Nick Parker
|
|
|
|
|
I think if you alter Nick's query so it starts out as SELECT DISTINCT .... it should give you the values you need.
James
Simplicity Rules!
|
|
|
|
|
Sorry James, but the SELECT DISTINCT change didn't help either.
Nick:
What I am needing is, in Access, when viewing a table it can be set up so that when you are entering data into the database directly that a list box will open for a particualr field and display the options that you can select for that field. Such as a 'Gender' Field. A list box will show the options 'No Answer', 'Male', 'Female' so you can choose one of those three options for the record. If in all the records for that table only 'No Answer' and 'Male' have been chosen, I need a way for my program to also recieve 'Female' to add to MY list box, so that it can be selected in my program.
I hope that helps clarify what I am looking to do using ADODB.
The actualy field I need to do this with isn't Gender, but it makes for an easy example, else I'd be hardcoding all the live long day.
Thx again for the tries.
Quinn
|
|
|
|
|
And maybe VB.Net in general.. why is it looking a bit un-represented?
No VB.Net tab on the front page here?
A lack of articles?
I've also noticed this from Microsoft itself in general?
I'm a long time Powerbuilder guru whose looking at .Net and it had seemed now that VB finally has some inheritance along with better data support I thought it might be worth a hard look. However C# and C++ seem to have the heavy amount of attention. I'd rather not pick the wrong one and then have to start again.. while starting again. Can I assume this will be supported or will Microsoft continue to make me change gears either by smoking out their competitors [regardless of merit] or starving off their own languages?
Craig Kazial
|
|
|
|
|
Craig,
The reason that you are seeing so much C#/VC++ on this site is that it's main contributors have heavy backgrounds in some C++ flavor. Due to the .NET Framework release, many of those same developers have decided to go against managed C++ in turn for C#. I work for a *strictly* VB shop right now and I assume that we will continue to go that route, however I myself am rather interested in C#. This site has been a great learning experience where I believe we can all benefit from each other. Take a look at our current competition where you can build a Code Project screen saver using the .NET Framework in any language, even VB.NET. Here is the link in a new window. The race to build the perfect Screen Saver. I hope this answer some of your questions.
Nick Parker
|
|
|
|
|
Part of the reason is due to the design of .NET
I read all of the C# articles, and post in the C# forums (and know the answers sometimes too) because most of them, and most of the "work" in getting to know .NET is to do with the framework classes, and not the syntax of the language. I just convert the code in my head to VB.NET syntax and most of the time it works.
I think VB.NET is a fantastic language, and I will keep using it, but I think that forums like this will not cover it much because, firstly, CP is a C++ oriented place, and secondly there is a stigma about "VB" that makes people think of bad programming, and indeed, in my experience, the language can attract bad programmers.
Choice of C# vs VB.NET is a lot to do with IDE, neatness of syntax, and almost nothing to do with capabilities. Choose the one you feel confortable with, but you might have to look at both to find samples/help etc.
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
David Wengier wrote:
Choice of C# vs VB.NET is a lot to do with IDE
The IDE is the same for all languages in .NET.
David Wengier wrote:
and almost nothing to do with capabilities
In fact, VB.NET has some limitations, like only one namespace in each assembly (it's a property of the project), no boolean shortcircuit evaluation, and so on. Ok, you can workaround most of them.
I think that the language choice has more to do with the programming background you have: for me, every VB code I've written was a pain, and was because if I wrote in C++, I would have only a few programmers capable of mantaining my code.
With C# I feel that other programmers in the team can read, understand and mantain my code, even if they only coded in VB...
C# syntax is more elegant (in a C++ POV) than VB.
Crivo
Automated Credit Assessment
|
|
|
|
|
Daniel Turini wrote:
The IDE is the same for all languages in .NET.
The IDE is generally the same, but there are a few differences. The project properties are a bit different, plus other minor differences.
Daniel Turini wrote:
like only one namespace in each assembly (it's a property of the project)
VB supports namespaces the same as C#.
Namespace MyNamespace.MyNestedNamespace
Class A ' Full name: MyNamespace.MyNestedNamespace.A
End Class
End Namespace
Daniel Turini wrote:
no boolean shortcircuit evaluation
You don't get short circuit evaluation using And/Or, but if you use AndAlso/OrElse you get short circuit evaluation.
VB doesn't support:- indexers: a special property which allows you to access an instance of a class like an array, instead you get an Items property.
- operator overloading: Allowing a class to create new meanings for +, -, *, /, etc
- Optional parameters: Create and call methods without any value being provided. As you'll see below it is supported but with a twist.
- unsigned types: This isn't too important because unsigned types are not compliant with the CLR anyway, they are provided for conveinence.
VB does support:- Late binding: Calling methods on an object without having to know what type the object is, just that it supports that particular method signature.
- Optional parameters with default values: Just like C++ you don't have to provide values if you just want the default value. The default value is required, unlike VB6.
- Handles keyword: Events can be wired up at compile time without needing to use
myEvent += ..... , though if someone wants they can use the VB equivalent, AddHandler . Coming from using VB for all my real programming projects I naturally wanted to use VB.NET, but there were enough minor things that irked me into using C# instead.
First, I prefer curly braces over Then, End *, etc. Second, I really did not like the addition of the short circuit keywords, I would have rather had And/Or do it. Third, I prefer curly braces . Fourth, I did not care for using keywords like Shadows
Aside from those differences there isn't a whole lot of difference between C# and VB.NET, 90% of your code is going to be using the .NET base class libraries so that is where a lot of the knowledge is going to be.
James
Simplicity Rules!
|
|
|
|
|
James T. Johnson wrote:
Optional parameters: Create and call methods without any value being provided
But because of overloading, it can be done with two different methods, just leave out one parameter
James T. Johnson wrote:
Handles keyword: Events can be wired up at compile time without needing to use myEvent += ....., though if someone wants they can use the VB equivalent, AddHandler.
And how could anybody want to use anything else! In all of my C# code, whenever I accidently create an event handler I dont want, I think "oh damn" and delete the method. Then, come build time, bring on the errors, as the code, miles up in the file, hidden in the GUI created #region, mentions these missing methods.
(I seem to be just replying to you and ranting these days... you must have a friendly face )
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|