|
i have been coding my 8 led's thru parallel port using visual basic and now i must sent the notification to PDA user..but i don't know to code it and using what language.
example : first led on, then the signal sent to PDA user appear as a message to tell user first led is on. anyone can help me to solve that problems.
help me plsssssssssssssss.......
thank you...
sweet honey
|
|
|
|
|
Hi folks I have a stored procedure which selects the following:
sbu_id
profit_id
sub_id
act_id
acct_id
acct_name
policy_nbr
policy_eff_date
netPremium
Now I have these names in the header of the datagrid. I would like to change this. This is a winform
application.
Looking at the below sub routine I tried to the mapping for one field. Nothing came out. Can someone help me.
Private Sub btnApplyBoundEDB_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnApplyBoundEDB.Click
'get connection string
Dim connstring As String = System.Configuration.ConfigurationSettings.AppSettings("FinSolMainDBConn")
Dim cnn As SqlClient.SqlConnection = New SqlClient.SqlConnection(connstring)
Dim cmd As New SqlClient.SqlCommand
Dim da As New SqlClient.SqlDataAdapter
Dim ds As New DataSet
Try
cmd.CommandText = "dbo.stp_NewRen_Override"
cmd.CommandType = CommandType.StoredProcedure
cmd.Connection = cnn
da.SelectCommand = cmd
'create parameters to pass to command
Dim prm As SqlClient.SqlParameter
prm = cmd.Parameters.Add("@sSbu", SqlDbType.NVarChar, 5)
prm = cmd.Parameters.Add("@dFirst", SqlDbType.DateTime, 8)
prm = cmd.Parameters.Add("@dLast", SqlDbType.DateTime, 8)
cmd.Parameters("@sSbu").Value = cboSBU.SelectedValue
cmd.Parameters("@dFirst").Value = C1PeriodFrom.Value
cmd.Parameters("@dLast").Value = C1PeriodTo.Value
da.Fill(ds)
Catch ex As Exception
MsgBox("Error: " & ex.Source & ": " & ex.Message, MsgBoxStyle.OKOnly)
End Try
'Dim dt As New System.Data.DataTable("testdatatable")
'Dim dc As System.Data.DataColumn
' Dim dr As System.Data.DataRow
Dim textboxc1 As New DataGridTextBoxColumn
Dim DataGridTableStyle1 As New DataGridTableStyle
textboxc1.MappingName = "sbu_id"
textboxc1.HeaderText = "SBU"
textboxc1.Width = 80
' Add table style to grid
DataGridTableStyle1.MappingName = ds.Tables(0).ToString
-----------------------------------------------------------------------------------------------------------------------------
I have also went though and changed the following below in hopes that this will work also to no avail.
C1TrueDBGrid1.DataSource = ds.Tables(0)
' sbu_id
'dc = New DataColumn
'dc.DataType = System.Type.GetType("System.String")
'dc.ColumnName = "SBU"
'dt.Columns.Add(dc)
' profit_id
'dc = New DataColumn
'dc.DataType = System.Type.GetType("System.String")
'dc.ColumnName = "ProfitId"
'dt.Columns.Add(dc)
' sub_id
'dc = New DataColumn
'dc.DataType = System.Type.GetType("System.String")
'dc.ColumnName = "SUBId"
'dt.Columns.Add(dc)
Basically I am testing it with one field and nothing is working as of yet.
Any advice on the code above will be appreciated.
Thanks
|
|
|
|
|
In treeview, add a key and a name.
treeview1.nodes.add("key","name")
How to get the key?
Thanks!
|
|
|
|
|
hrmmz
As the old days ... This isn't correct but you'll get the idéa
dim myNode as TreeNode
set MyNode = treeview1.nodes(Name)
msgbox(myNode.Key)
maybe .....
msgbox(treeview1.nodes(Name).Key)
//Maw
|
|
|
|
|
I need to generate barcode, but i only want the numbers of barcode, whitout images.
Someone can help me.
Thanks.
|
|
|
|
|
Generate it from what source ? There are some articles on barcodes on this site.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I’m trying to drag & drop listview items between two instances of my app. The actual data that’s passed in DoDragDrop is an arraylist that’s been serialized to a memorystream. The contents of the arraylist are objects of a simple, serializable custom class that allows the recipient listview to reconstruct the dragged listitems. (the contents of the arraylist actually don’t matter…they can be simple integers and the issues in this post remain the same)
When I’m dragging & dropping within an instance of my app, e.Data from the DragDrop event is a DataObject and I can extract my memorystream, deserialize it, and I’m good. However, when I drag & drop to another instance of my application, e.Data is a System.__ComObject. Attempting to extract my data with the normal e.Data.GetData method results in a memorystream that’s, according to the Locals window, a System.Runtime.Remoting.Proxies.__TransparentProxy, which is beyond the scope of my VB knowledge. Regardless, it doesn’t deserialize, and now I’m stuck.
So could someone kindly explain what I need to do to the __ComObject to get my memorystream out? Here’s my code:
If e.Data.GetDataPresent("System.IO.MemoryStream") Then
Dim Formatter As New BinaryFormatter
Dim Stream As New System.IO.MemoryStream
Dim DropList As New ArrayList
Stream = e.Data.GetData("System.IO.MemoryStream")
Stream.Position = 0
DropList = Formatter.Deserialize(Stream)
Any help would be appreciated.
Neil
|
|
|
|
|
I am trying to create a program for my company which will create new folders for incoming employees. This folder needs to be created and the sharing permissions need to be set programmatically (VB.NET). I know how to create the folder, but setting the permissions is posing a problem. If anyone has any advice on the matter, I would greatly appreciate it.
|
|
|
|
|
The .NET Framework BCL (1.0 and 1.1) don't have any support for doing this. The .NET Framework 2.0 does.
In the mean time, you can use a class library found here[^] on GotDotNet to do this.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Somewhere in the past couple years I heard that VB.Net has something built in that will copy a SQL Server table(including schema) to a file. Now that I want to use it, of course I can't find anything on it. Anyone familiar with this?
|
|
|
|
|
Could you be referring to the DataSet class' ability to save to an XML file?
DataSet.WriteXML()[^] method docs.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
I just want to have an idea on how can I read the data from a time-tracking device (everytime an employee swipes his ID card) and be automatically copied into a backend Access database of my VB.NET program. What should be the coding for that? I really can't imagine how and what code should I write in my VB.NET program to get data from the device shoot into my database. And not only that, the device is not directly connected to HR's PC but connected through the LAN network.Can anyone help me regarding this matter?...Please...Thanks...
|
|
|
|
|
The easy part is putting the data into the database.
The hard part is getting a notification from the "device" and communicating with it. Without knowing anything more about the "device", it's impossible to tell you anything useful, other than consult with the manuals and manufacturer of the "device" to find out what you have to do.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I'm developing an WinForms application in VB.NET where the user can specify custom formats for numeric data entry fields.
When I display data in lists, labels, editboxes, etc. I simply use Double.Format(strCustomFormat) to format the double values in the desired format - no problem here.
But I'm having a problem converting the strings back to a double since I basicly don't know if the user is using a 1.234.567,09 or 1,234,567.09 format.
So basicly I need a Double.Parse method where I can specify the format (similar to the ParseExact that DateTime has)... but this is not available as standard for Doubles
Is there any other way I can do this ?
Thanks you in advance.
/Bean
|
|
|
|
|
Hi,
Use string replace(",","") method for removing , commas
|
|
|
|
|
Please read my thread again... it's far more complicated than that; a simple "," replace/removal won't do the job.
For example... does "100,123" mean 100.123 or 100123.00 ... it's impossible to tell without actually knowing the format.
|
|
|
|
|
This is a complicated task especially since you are giving your user the freedom of customizing the formats. Like you have said:
MrBean wrote:
it's impossible to tell without actually knowing the format
Therefore, I would suggest giving your user a list of choices. That way you can create your Double.Parse function according to the formats that you have allowed the user the choose from.
I would suggest giving your user full freedom of specifying formats is a bad idea, especially when dealing with data.
|
|
|
|
|
Hi there,
I see the problem ur facing I had a similar one.You can do this little trick and I think the problem Should slove
you basically have two formats here
1) 1.235.567,09
2) 1,234,567.09
To what I have understood,If format 1 is used there would be only one comma in the string and if format 2 is used there will be only single decimal
So now you can parse the string and check how many decimals or commas exists in a string if decimals are more than one remove decimals and if commas are more than one remove commas.
Now the question if what if there is only one comma and one decimal in the string. then Whatever comes first remove that and you should be good
Hope this helps
Let me know abt it
Mandar Patankar
Microsoft Certified professional
|
|
|
|
|
My current solution (which is not 100%) works a lot like you describes : detects which comes first, "," or "."
But the case where there are no decimals but thousand delimiters... example :
123,456
It impossible to know if this means 123.456 or 12345.00 without knowing the input format.
I was just wondering if there was a ".NET way" of converting strings back to doubles and specifying a format string which the parser should use... just like the ParseExact which the Date type supports just fine. It seems this is a big oversight from the .NET team.
Unfortunately I can't limit the formats the users can enter to a predefined set - the users expect full freedom here and the old (non-.NET) version of the app had this functionality
|
|
|
|
|
hye .. your problem looks very critical. well if you have the mask for the format which user is using then it is fine like ##,##,##.00 or ##.##.##,00
then you can see which option is decimal like in first . represents decimal and in next , represents decimal. but if this is not the case and you dont have the mask then tell me what is this
12,0 $ and 12.0 $ .. you have to tell me which one is 120 $ and which one is 12 $.
now you cannot even visually tell which one is what and believe me I shall go opposite to your answer .So restrict your user to one mask other wise you will end up with a big money theft in company account.
|
|
|
|
|
Dear Friends,
I have installed my VB6 application package on the machines in my lan. But when I open the crystal report file it gives error like "No physical database found". Your quick response will be highly appreciated.
thanks
Murtuza
|
|
|
|
|
More details would be helpful in diagnosing this problem. Possibly this is a Crystal config/parameter issue? Where is the target file for Crystal located?
...Steve
|
|
|
|
|
Dear Steve
Thanks For help.
I am using MS Access as database and the .rpt files i m including in the package and it is installed on evry machine in c:\program files app folder. for file i am using the ODBC connectivity. and iside vb code i am using app.path to get the file path to display file on crystal viewer control.
thanks
murtuza
|
|
|
|
|
Murtuza,
I understand that you have an Access database and Crystal RPT files installed on each machine, and that these are all in the App.Path. Correct? Are you sure that the ODBC DSN is setup correctly on each workstation? Can you show us the code that you are using to load the file into the control?
...Steve
|
|
|
|