|
Use xceed ActiveX control!
A. Riazi
|
|
|
|
|
Forget Winzip.
There's a million free zip command line tools out there
Davy
Weblog, Ramblings and more...
www.latedecember.com
|
|
|
|
|
look here in CP for a ATL project that have that functionlity...
Best regards
Carlos Antollini.
Pi Five[^]Creator
Sonork ID 100.10529 cantollini
|
|
|
|
|
First of all, I just want to say that I've recently started learning VB.NET. I'm making my first real program with it, and had a question for the more experienced .NET developers out there.
My program is just a simple desktop application, with an Access database for storing data. I also wanted to have a login system when the program is loaded, so that different users can use the same copy of the program. I've never implemented anything like that before, so I was curious if any of you had reccomendations on how to do it. Using another Access database, or perhaps some other way I don't know about?
Any comments would be greatly appreciated!
-Sean
|
|
|
|
|
My solution is maybe not the best, but when I had to implement a login system, I just had a table in my database storing user infos, as login name, password (actually a hashed version of the password), user access, etc... In this case, one database is enough.
Jérôme
|
|
|
|
|
I'm working on a form editor a.k.a like in Visual Studio and sharpdevelop. I save the forms out as xml mainly using to the .ToString methods and then try to convert them back on load.
I thought this would be the way to do it:-
Dim PInfo As PropertyInfo = ty.GetProperty(Nde.Name)<br />
If Not PInfo Is Nothing Then<br />
Dim t As Type = PInfo.GetType()<br />
PInfo.SetValue(ctrl, (CType(Nde.Value, PInfo.GetType())), Nothing)<br />
End If
but CType and DirectCast do not accept PInfo.GetType() . They demand a hand coded type e.g. CType(Value, Integer) . Does anybody know of a way to do this?
I look for the TagName via reflection :- Dim PInfo As PropertyInfo = ty.GetProperty(Nde.Name) and it returns fine, so it's found the property. But how do I then convert the value to the correct Type so I can set the property value?
Demo XML:
<code><VISIBLE>True</VISIBLE>
<Text>Caption :</Text>
<TextAlign>1</TextAlign></code>
|
|
|
|
|
can any one send me code/url for DES Encrypyion/Decryption in VB6.0
|
|
|
|
|
Is there a simple way to print the contents of a datagrid in VB.NET? Thanks for any help.
|
|
|
|
|
Does anyone know how to remove the items under the 'Recent' tab when opening a previous project? Right now I have like 50 projects under there and a lot of it is clutter.
Thanks.
|
|
|
|
|
Ok this is something
The problem I have is that when I'm calculating some values the sum is rounded and i dont want it
for example, here is some of my code
******************** code *******************
dim price, totalprice, tax as Long
Format TotalPrice, "$#,##0;;\Z\e\r\o"
Format Tax, "$#,##0;;\Z\e\r\o"
Format Price, "$#,##0;;\Z\e\r\o"
Price = 0
For i = 0 To 21
Price = Price + LBLSelPrice(i).Caption
Next
LblTotal.Caption = Price ' eg 125
Tax = (Price * 0.18)
LblTax.Caption = Tax 'equals 22.5, displays fine
TotalPrice = Tax + Price
LblGenTotal = TotalPrice ' Here it displays 148 instead of 147.50
*********************** code ******************
while debugging I noticed that the problem is not the labels problem but I was watching my variables and
I saw that the totalprice var. when I am summarizing the price and the tax vars is rounded. In the labels properties
I changed the format to number with 2 decimal points !!!
It s not workink, no way !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
HELP !!!
Mike Eco
|
|
|
|
|
Variables declared as Long cannot hold fractional parts, and will always be rounded.
Dim Price As Currency, TotalPrice As Currency, Tax as Currency, i As Long
Price = 0
For i = 0 To 21
Price = Price + CCur(LBLSelPrice(i).Caption)
Next
LblTotal.Caption = Price
Tax = (Price * 0.18)
LblTax.Caption = Tax
TotalPrice = Tax + Price
LblGenTotal.Caption = TotalPrice
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
I want to pass an Enum to a function like this:
Private Enum AnyEnum
a
b
End Enum
Public Sub Any(ByVal Enumeration As [Enum])
...
...
End Sub
..
..
Call Any(AnyEnum)
..
How can this be done?
Regards
Hardy
|
|
|
|
|
Firstly, you aren't able to expose a private member as a parameter of a public method.
Here's some working code:
Module Module1
Public Enum AnyEnum
a
b
End Enum
Public Sub Any(ByVal Enumeration As AnyEnum)
End Sub
Sub Main()
Any(AnyEnum.a)
End Sub
End Module Does this help you?
Cheers,
Simon
"The day I swan around in expensive suits is the day I hope someone puts a bullet in my head.", Chris Carter.
animation mechanics in SVG
|
|
|
|
|
Thank's a lot for your quick response,Simon.
I don't want to pass an enumerated value, but the enumeration itself, like this:
Module Module1
Public Enum AnyEnum
a
b
End Enum
Public Sub Any(ByVal Enumeration As [Enum])
End Sub
Sub Main()
Any(??AnyEnum??)
End Sub
End Module
Kind regards
Hardy
|
|
|
|
|
Try this:
Module Module1
Public Enum AnyEnum
a = 0
b = 1
End Enum
Public Sub Any(ByVal Enumeration As [Enum])
Dim myenum As AnyEnum = CType(Enumeration, AnyEnum)
Console.WriteLine(myenum.b)
End Sub
Sub Main()
Console.WriteLine("before")
Any(New AnyEnum())
Console.WriteLine("after")
Console.ReadLine()
End Sub
End Module
Hardy, I'm really interested to know ... why?
Cheers,
Simon
"The day I swan around in expensive suits is the day I hope someone puts a bullet in my head.", Chris Carter.
animation mechanics in SVG
|
|
|
|
|
Hi,
I'm having a strange problem trying to postmessage out of VB.NET.
I have PostMessage defined as
Public Declare Function PostMessage _
Lib "user32" _
Alias "PostMessageA" _
(ByVal hwnd As IntPtr, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long) As Long
The wMsg is arriving perfectly at hwnd, but wParam is always 0 and even stranger is lParam is always equal to the value that should be in wParam
The wParam is defined as a long and has the value 10 when posting, lParam is defiend as Long and has the value Me.Handle.ToInt64()
When the message arrives, though wParam = 0 and lParam = 10
Any ideas? This is driving me mad!
Many thanks in advance
Mark
|
|
|
|
|
In VB6, Long was a 32-bit integer. In VB.NET, Long is a 64-bit integer, and Integer is the 32-bit integer. Unless you're working on a 64-bit version of Windows, you need to use 32-bit integers:
Public Declare Function PostMessage _
Lib "user32" _
Alias "PostMessageA" _
(ByVal hwnd As IntPtr, _
ByVal wMsg As Integer, _
ByVal wParam As Integer, _
ByVal lParam As Integer) As Integer
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Hello all,
Is there a way in VB 6.0 to make the system wait for a bit.
Like system.wait(1000) where it will wait 1000 ms or something? I suppose I could write a for loop for 1 to SomeBigNumber and every 1000 do what I want to do, but this seems like a silly way to do things.
Let me know please if there is a wait command.
Thanks!!
Oh yeah one other quick question. When I run my VB program, the Focus doesn't automatically start on the command button, like I would like. I went to the form load area and wrote
cmd_calc.SetFocus (hoping that this would set focus to my command button)
It gives me an error sayign invalid procedure call or argument. How can I get the focus to start on my command button?
Again thank you very much!
NickOne
|
|
|
|
|
NickOne wrote:
Is there a way in VB 6.0 to make the system wait for a bit.
Look in the SDK for the Sleep Win32 API call
Look here for an example:
http://www.buygold.net/v02n11/v02n11.html[^]
NickOne wrote:
It gives me an error sayign invalid procedure call or argument. How can I get the focus to start on my command button?
Place the setfocus call in the formActivate event. The form load event fires as the form is being built and the control might not be available at that point yet.
It will also help if you have all the controls Tab orders and indexes set properly.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|
|
Hi, I 'm new to programming and I 'm having this problem with visual basic.
I have a DB combo which has a datasource. The datasource is an array eg. data(0)
I have set the rowsource and listfield property to fill up my combo.
When I 'm trying to change the recordsource of my data control writing for example
data(0).recordsource = "Select * From Products where Productname = CPU"
and then trying to refresh my datasource
data(0).refresh
i got the following error
Run-time error '3061':
Too few parameters. Expected 1.
Can somebody help me please ???
Best Regards
Mike Economou
|
|
|
|
|
;PI declare my procedure like:
Private Sub childTreeViewProject_DoubleClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles childTreeViewProject.DoubleClick
It doesn't work,
saying methods haven't the same signatures.
|
|
|
|
|
The event is Control.DoubleClick and is an EventHandler, meaning that the second parameter is an EventArgs.
"Well, I wouldn't say I've been missing it, Bob." - Peter Gibbons
|
|
|
|
|
i have successfully generated a report based on grouping. However, when i try to generate a report based on subgroups, i get returned with this error: "report sections do not match data source". why is this? here is my code in the form:
Load deTypeCustomerReport
With deTypeCustomerReport
.TypeCustomerReport_Grouping CDate(Text1.Text)
End With
rptTypeCustomerReport.Refresh
If rptTypeCustomerReport.Visible = False Then
rptTypeCustomerReport.Show
End If
i have placed 1 field (company) in one of the group headers, the other (ProductType) in a second group header and the remainder of the fields in the detail section.
any help would be greatly appreciated!
|
|
|
|
|
hello,
I am trying to learn how to call a subroutine at the beginning of a program, before anyone has to click on anything. I am writing a real simple unit conversion program, and I wanted to display this menu inside a picture box:
pic_unitDisplay.Print "1. inch", "2. fathom", "3. foot"
pic_unitDisplay.Print "4. furlong", "5. kilometer", "6. meter"
pic_unitDisplay.Print "7. fathom", "8. rod", "9. yard"
(oh yeah I am doingthis in VB 6)
So I placed that in a subroutine called unitDisplay. If I call subroutine on any of the click, like a command button or anything, it'll pop up like I want. BUT I want it to pop up first, right at the beginning of the program. How do I call a subroutine right at the beginning of program execution?
Thanks
Nick
|
|
|
|
|
hi..
write your code in the Form_Load() event..
make sure that AutoRedraw property of the picture control is set to true
|
|
|
|