|
Dont really know much about this but could you give us the error/output that you recieve when you run the code.
Do you have Windows fax services installed and configured on the computer in the connect("mymachine") line?
|
|
|
|
|
yes
installed. is there any way any dll in .net to send fax
i don't wants to use com object
any example ?
|
|
|
|
|
Hello,
I want to Stop my printer after it finished printing. But when printing of a page (even it contains only one line) finished, the printer ejects the page. I want to have control on page-tracking.
Thank you
|
|
|
|
|
I am working on an app that allows me to enter items into a listview control, I also would like to add a image to that particular item how can I do that using the select case function? Or is there another way to do that? Also I want to be able to double click on any item in the listview control and it will display information about the selected item. I have been having trouble selecting item from the ListView control using Select Case.
Can you please let me know what I am doing wrong….
Thanks
Thanks cPod....
|
|
|
|
|
Hi!
1 - Concerning adding items and associating an image to them you could associate an ImageList to the smallImageList or largeImageList property of the class and then when you're creating the items do:
myListView.Items.Add(New ListViewItem("blablabla", myImageIndex))
myImageIndex is the imageList index of the image you whish to show in the item.
2- To show Info about ONE selected item you have to put this code in the doubleClick event of the Listview:
myListView = CType(sender,ListView)
ListViewSelectedText = myListView.SelectedItems(0).Text
With this you're getting the text of the item.You can also have for example some info in the tag property...
ListViewSelectedTag = myListView.SelectedItems(0).Tag
NOTE: If you have the multiselect property active then you'll have to iterate through the selectedItems collection and get the info you need
Never say never
|
|
|
|
|
Is it possible to bind images from a database into a ListView Control?
Thanks
Thanks cPod....
|
|
|
|
|
Hi!
I've never done that but maybe you should check out the bindingContext property.
Sorry i can't give you any more help.
Never say never
|
|
|
|
|
i have a big prob. i'm doing a mail filtering system but have no idea on starting to code it. my system need to get incoming mails then scan the mails to filter spam. one of the function is to limit mail's size. maximum mail size allowed is 10000KB. mails that exceed dis size will be considered spam. anyone knows how to code dis whole thing in VB.NET??
|
|
|
|
|
TIFC wrote:
anyone knows how to code dis whole thing in VB.NET??
Probably, if they expend a considerable amount of time to the problem. Your best solution if you want a reasonable response here is to break the problem down into smaller problems, and then those smaller problems in to even smaller problems still. If you get stuck on a small problem then it will probably be of a size where you can expect a more helpful response from people on this forum.
Most people who respond on this, and any forum, will only respond to things that they can immediately or very quickly answer. Your question requires several hours of effort just to begin to produce a response that would be useful for a question that is so vague.
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
i would like to know how to create a multithreaded server which listen to port 25 using vb.net.
urgent, pls help. 10s
|
|
|
|
|
Hi All,
how can i write the codes to read the input/output file and then send the printing command in the windows service????
can someone give me some guides.Please...i really need help....
besah
|
|
|
|
|
The fact that you're in a service should not matter, just look into the System.IO namespace for how to read and write files. There are also some articles on this site to do with .NET printing, I believe.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I want to search for a data in a table within an untyped DataSet, how do I obtain the row number or index of the datarow found with the following statement?
Dim drwObj As Data.DataRow
drwObj = dsObj.Tables("LocalTable").Rows.Find("MyData")
If Not (drwObj Is Nothing) Then
Dim intRowNo AS INTEGER
intRowNo = ???
End If
Or any other methods that could help me to identify the row number would do just fine. Thanks
|
|
|
|
|
The name DataSet should give you a clue. The information in it is a "set" of data. There is no concept of a row number in a "set". It may be possible to simulate a row number, but depending on the implementation that row number may change arbitrarily during the course of operation.
You can write a routine that scans through the dataSet looking for a row that is the same as the one you are looking for. However, this is a brute force operation and could take a considerable amount of time depending on how many rows you had to look through.
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
Anybody ever see these Bible Code programs?
I want a text control that will put circles of whatever color I want around whetever character I want it around all within the textbox.
Anything out there like that?
Even though I would call my self an experienced VB 6 programmer, .NET has me scratching my head a lot. I dread writing even the search algorithm, let alone making a custom textbox.
Thanks,
Jim
|
|
|
|
|
I'm rather new to this so I hope someone can help. After creating a new windows application and using Project, Add New Item then selecting the Data Form Wizard icon in the templates box I'm getting an error message "Could not run the C:\Program Files\...\WinDataForm.vsc wizard". I'm using Visual Studio 2002 in case that's of any relevance. If someone could point me in the right direction I'd appreciate the help.
Thanks
|
|
|
|
|
i'm using the find method of DataView to search for students using the student's id or student's last name, i have no problems using the student's id for search. my only problem is, when i search using the student's last name it seems that it is not working sometimes it will display the wrong student for example i'll put "Cross" as my student's last name then it will search and display "Mason". how can i resolve this?, is there something wrong with my code.
Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As_ System.EventArgs) Handles btnGo.Click
Dim i As Integer
Dim StudDV As Data.DataView = New Data.DataView(Dsstudent.student,_ "", "StudID", Data.DataViewRowState.CurrentRows)
Dim StudDV1 As Data.DataView = New Data.DataView(Dsstudent.student,_ "", "StudLastName", Data.DataViewRowState.CurrentRows)
If cboFind.Text = "Student ID" Then
i = StudDV.Find(txtSearch.Text)
ElseIf cboFind.Text = "Student Name" Then
i = StudDV1.Find(txtSearch.Text)
End If
StudentBindingSource.Position = i
End Sub
by the way i am using access database and have 2 indexes the student id as my primary key and last name as my second index.
thanks in advance
|
|
|
|
|
hellow to all
i am trying to run a code that access a DB find a value that was entered by user ..
for this code i am useing sql statments , but when i run the code i recive this error msg
No value given for one or more required parameters .
i had cheaked the code trillion time and the db connection is fine !
if any one have any idea how can i run an sql statment in vb.net to find a value please help ! , because when i run a regular select statment it show's to me the tabel fine but when i user the where statment ,i get errors .
here is the code
Dim sql As String
sql = "select * from Customer Where Customer_ID ="
Dim objconn As New OleDb.OleDbConnection(sConnection)
Dim objdataadapter As New OleDb.OleDbDataAdapter(sql & TextBox1.Text, objconn)
Dim objds As New DataSet("Customer")
Dim objdv As DataView
Dim objtabel As DataTable
Dim ds As DataSet
ds = New DataSet("Customer")
Try
objconn.Open()
Catch ex As Exception
Windows.Forms.MessageBox.Show(ex.Message)
End Try
If objconn.State = ConnectionState.Open Then
Try
objdataadapter.Fill(ds, "Customer")
objtabel = objds.Tables("Customer")
objdv = objtabel.DefaultView
DataGrid1.SetDataBinding(ds, "Customer")
' TextBox2.DataBindings.Add("text", ds, "Customer")
Catch ex As Exception
Windows.Forms.MessageBox.Show(ex.Message)
End Try
End If
End Sub
|
|
|
|
|
microuser_2000 wrote:
but when i run the code i recive this error msg
No value given for one or more required parameters .
So, where do you receive this error message? What line of the code generates it.
Also you should be aware that your code is highly susceptable to a SQL Injection attack. You are injecting the text value of TextBox1 directly into the SQL statement. What happens if the value in TextBox1 is blank? You SQL statement is incomplete. What happens if someone types the following into TextBox1:
0; DELETE Customers;-- What happens is that your full SQL Statement will look like this:
select * from Customer Where Customer_ID = 0; DELETE Customers;-- Which will go ahead and delete everything in your Customers table.
You might find the following article useful: SQL Injection Attacks and Some Tips on How to Prevent Them[^]
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
when i run the code i use IO Exception to generat the erros so i get this error as a messagebox and i do not get line of error ..
i know that it is not securie to run code like mine , but i will use a function the will filter input to textbox ...
but what i am looking for now is how to write a code that can pick a value from db !!!
thxx for ur help ...
|
|
|
|
|
Have you considered setting breakpoints and stepping through the code to find out where the exception is being thrown. You also get to see the state of variables as they are changed and so on.
Anonymous wrote:
i know that it is not securie to run code like mine , but i will use a function the will filter input to textbox ...
How good will your filtering be? Even although I filter the results of text boxes before passing them to database queries I still use parameters to pass the data to the database in order that, should I have missed something, the framework will protect me. At the very least I do my best to ensure that my application will fail safe. The idea is that you do everything you can to reduce the attack surface of your application.
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
i have a usercontrol made at design time. i want to load it on a form at runtime. can anyone help please
If i am adding that control at designtime its working fine. but i want to add it runtime.
|
|
|
|
|
At the click event or whatever :
Dim con = new myUserControl
with
.Location = new Point()
//and so on.
|
|
|
|
|
i have the similar problem except i want to the usercontrol develop in vb6.
when i user : dim ctrl as new myUserControl it give an error message as belows >>> myUserControl.Private Sub New()' is not accessible in this context because it is 'Private'. <<<
so how i want to define the 'Public Sub New()' in vb6.. it give error.
|
|
|
|
|
All you have to do is instantiate your control and add it to the form's Controls collection:
Dim newControl As New MyCustomControl
newControl.Top = whatever
newControl.Left = whatever
... set your controls properties here
' and to make it show up on the form:
Me.Controls.Add(newControl)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|