|
Hello Martin.
Thank you so much for your help. I could build the code from the logic you have provided and that worked. So, I appreciate your concern.
Ravi.
|
|
|
|
|
your very welcome
Martin
life is a bowl of cherries
go on take a byte
|
|
|
|
|
I user Enter key to move from textbot to another ..
but when I press it ... system send Beep ...
can I prevent it from doing Beep ?
jooooo
|
|
|
|
|
on keypress ( isuggest putting the form's keyprievew on and using the form keypress):
If e.KeyChar = CChar(13) Then<br />
e.Handled = True<br />
Else<br />
MyBase.OnKeyPress(e)<br />
End If
If this disables enter also then just put your normal enter actions after e.handled = true .
|
|
|
|
|
it's good
thanks my fried . but there's a small edit on the last code
If e.KeyChar = CChar(ChrW(13)) Then<br />
e.Handled = True<br />
Else<br />
MyBase.OnKeyPress(e)<br />
End If<br />
jooooo
|
|
|
|
|
Hello all,
Heard some great stuff about the code project so I decided to join the community and hope to be able to help others in the future as well.
Not yet there though since i'm fairly new to vb.net
Anyway: I need to print PDF files that are on disk to a network printer.
I searched for some printing code on the net and found several similar approaches.
However printing only seems to work to local printers, not network printers.
Even on local printers it sometimes fails.
I used the following code:
Dim PD As New System.Drawing.Printing.PrintDocument
Dim DefPrint As String = PD.DefaultPageSettings.PrinterSettings.PrinterName PD.DefaultPageSettings.PrinterSettings.PrinterName = .PrinterNaam
Dim NP As New Process()
NP.StartInfo.FileName = "c:\test.pdf"
NP.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
NP.StartInfo.Verb = "Print"
NP.Start()
NP.WaitForExit(9000)
If Not NP.HasExited Then
NP.Kill()
End If
PD.DefaultPageSettings.PrinterSettings.PrinterName = DefPrint
any way to improve this piece of code ?
it launches the print command to acrobat, but maybe there is a better trick to do the printing.
How comes this doesn't work for network printers ?
Thanks in advance,
Nick
|
|
|
|
|
I am having a time trying to get my tabindex right on one of my forms.
I have about 40 controls mostly text boxes and combo boxes. THey are all grouped inside of groupboxes and for somereason the tabindex does not stop on the text boxes just the combo boxes.
Humble Programmer
|
|
|
|
|
the tab order includes those controls that have TabStop=true; and it does that
in order of increasing TabIndex.
If, while modifying TabIndex with Visual Designer, you create a conflict (say you reuse
a TabIndex value), Designer will adapt the other one silently. So you may want to check
them twice !
Also I am not sure how it works for nested controls (as in a GroupBox); I expect there
to be a "local" world of tab indices.
Hope this helps.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
there is a very handy tool in visual studio 2005 (I think it exist in 2003 too but not sure about that)
go to menu view and choose tab order
then you get to see the taborder for each control
if you want to set them just click the number on the control (you will have to click in the correct order)
it's a very easy way to set the taborder on a form
|
|
|
|
|
I actually found this same information at another forum but when I tried it I am still having the same troble. I am wondering if it may have something to do with the type of controls on the form for exampe textboxes and Combo Boxes.
Humble Programmer
|
|
|
|
|
normally it should effect the tab order
the only thing I can think of is that the controls ar disabled if that is the case the tab will not stop at those controls (but you probably knew that already)
perhaps checking the tabindex property will clear things up a bit (make sure no control has the same tabindex)
|
|
|
|
|
in Menu There is TabOrder option select that it will shows the current tab position of u r controls , u adjust the taborder position and finally execute the programme then only u r changes will be accepted. unless u execute the programme u r changes will not get effect
prabumj@gmail.com
|
|
|
|
|
Hello,
VS 2005 + SQL Server 2005
I have created a PDA application that uses typed datasets. It connects to a web service that is connected to a SQL DB.
The PDA will sometimes be used offline, and the user will add, update, and delete the data on the pda. When the user goes online, how can I make the data that has been updated on the PDA be in sync when the user connects to the SQL db?
There many people using the same database concurrently.
Many thanks for any suggestions,
Steve
|
|
|
|
|
You will have to write a method that checks every once and a while to see when the last sync was, and then sync again. You will probably have to create another table in your database that stores information about when different tables were last update or keep a history of the changes that have been made or something along those lines. If you can trust that the user will shut off the program before shutting of the PDA, you can do this sync check in the Load event of your first page. If you don't feel comfortable using that event, you could set up a timer control that runs every half hour or hour or whatever. Is this what you were asking?
|
|
|
|
|
Hi all,
I want to enter some ids (4 or 5) into a new address group in outlook express thru VB. Can anyone help me out..??
Thnx in advance.
The name is Sandeep
|
|
|
|
|
Hi guys, I'm having a pretty simple problem, but I guess I don't have the skill to solve it yet.
I've wrote a string to get information from a database and put it into a label, all of that works fine but one of the fields is an Integer, and another is a datetime, so where I'm using "+"s it gives me an error, how can I solve this?
Here is a shorted version of the line of code.
txtMenu = txtMenu + "<tr>" + "<td>" + " User's ID " + usrid + "</td>" + "<td>" + " State is " + State + "</td>" + "<td>" + " Date Opened was " + dateopen + "</td>" + "</tr>"
The HTML code is just for setting up a table, the error occurs between 'usrid' and 'dateopen', atleast, that's my best guess.
Here is the exact error I get: "Operator '+' is not defined for types 'Double' and 'Date'.".
Any suggestions would be a big help.
Thanks,
aqzman
|
|
|
|
|
use '&' instead of '+'
in vb.net '+' has the math value
|
|
|
|
|
Worked like a charm, I knew it was only simple.
I tried "+ & usrid & +" too, haha.
Thanks a lot for the help!
|
|
|
|
|
Hello,
Their is a Traditional way, for all variable(different datatype).
i,e. Consider,
Dim str As String = "Iam a string"
Dim integ As Integer = 0
Dim da As Date = "#6/22/2007#"
Dim ss As String
ss = "'" & str & "' " & integ & " '" & da & "'"
Answer = 'Iam a string' 0 '6/22/2007'
I thing u got the answer. If hve any problem msg me friend...........
|
|
|
|
|
Hi, i have a list box with some items in it. I would like to know the sample code that I could determine whether any item in the listbox is select or not?
Thank in advance
|
|
|
|
|
You can try .SelectedIndex method of list box
Regards,
Nilesh
|
|
|
|
|
Thank you for your reply. I will try to test it.
|
|
|
|
|
Hi,
depending on ListBox.SelectionMode you can use some properties:
either SelectedItem and SelectedIndex
or SelectedItems and SelectedIndices
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Thank you for your comment. But I do not want to know the selection mode. What i want is whether any item in my listbox is select or not. My list box selection mode is set to select only one item only.
Thank you for your support
|
|
|
|
|
as I said it depends on the selectionmode which two of the four properties I mentioned
you should use.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|