|
Hi,
Try this code.
Private Sub myDataGrid_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles myDataGrid.CurrentCellChanged
myDataGrid.Select(myDataGrid.CurrentRowIndex)
End Sub
Lata Agrawal
|
|
|
|
|
Thanks ! That works great.
I still have one question though. I can now select by row but
the datagrid still sets a cursor on the current cell in that row.
I've put the setting "allowedit" to false but this doesn't prevent
that you can select the text in a cell (for copying, etc.)
Also when I want to scroll through my data, it just scrolls a couple
of lines and then stops.
Can anyone help me out with this ?
|
|
|
|
|
Hi, i'm new to visual basic and just started my first program.
It's a messanger program for a Local Area Network, I need assistance or code instances of how to run it over a Local Area network.
Posted by JC Aussie
|
|
|
|
|
Anonymous wrote:
i'm new to visual basic and just started my first program
Why does everyone what to do a "Messenger" program first? You should learn to walk before you can run. Seriously - there is a heck of a lot to consider in a messenger type application. You have a client application and a server application (unless you are going p2p in which case you need some sort of "discovery" mechanism). You have to register users within the system and manages and so on and so forth.
Sorry that this doesn't seem to be a helpful reply to you, but there is a lot going on in an application like that and it would take far too long to explain in a forum post to someone who has "just started [their] first program"
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
Is this your first program in any language? If so, your taking on a HUGE project for such a beginner.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Does anyone know how I might be able to have a VB.Net program automatically recognize that a USB drive has been plugged into a computer. File watcher is the only way I can think of but I was wondering if anyone might know of another way.
|
|
|
|
|
Ignore the Demo folder in the zip
the one you want is the DeviceChangeNotify folder.
http://www.onteorasoftware.com/downloads/devicechangenotify.zip
|
|
|
|
|
Thank you. I will give it a try and get back to you.
|
|
|
|
|
That was very helpful and it worked perfectly. Thank you very much.
|
|
|
|
|
Your welcome, and good luck with your project.
|
|
|
|
|
i have a form in which there is a combo box .
i want to give user functionality to add and remove items from combo box at run time .
add method is fairly easy but is the any method to remove or delete selected item from combobox.
i want that user select an item from the combo box and when he press the remove button that item should be removed from my list.
plz help me in this context
sumit
|
|
|
|
|
Hello,
The code to remove an item from a combobox at runtime is:
ComboBox1.Items.RemoveAt(ComboBox1.SelectedIndex)
I hope this helps,
Programmer2k4
My sig:
"And it is a professional faux pas to pay someone else to destroy your computer when you are perfectly capable of destroying it yourself." - Roger Wright
I now use my CodeProject Blog!
Most recent blog post: March 24
|
|
|
|
|
i have a form in which there is a combo box .
i want to give user functionality to add and remove items from combo box at run time .
add method is fairly easy but is the any method to remove or delete selected item from combobox.
i want that user select an item from the combo box and when he press the remove button that item should be removed from my list.
plz help me in this context
sumit
|
|
|
|
|
Adding......................
Dim a As String = textbox1.text
cbo.Items.Add("a")
cbo.Items.Add("ja")
cbo.Items.Add("a")
Removing>>>>>>>>>>>>>>>>>>>>>>>>>
cbo.Items.RemoveAt(cbo.SelectedIndex)
or
cbo.Items.Remove(cbo.SelectedItem)
Clear<<<<<<<<<<<<<<<<<<
cbo.Items.Clear()
|
|
|
|
|
Hi All,
I am realy new to Crystal reports, but i need to know how to do Bitwise And on two numbers in the formula editor using the Basix Syntax!!!
Am using Visual Studio .Net...
Any comment will be very helpfull..
Thanks...
|
|
|
|
|
how can Conect to an Access database(DAO databas)with VB6?
|
|
|
|
|
how can connect to and Access XP database open database with VB6? code examplz plz.
|
|
|
|
|
Anybody using straight VB.Net (2003) coding to generate barcodes on printed documents through Crystal? If so, how????
Thanks
Larry
|
|
|
|
|
I would think that you can use a barcode font in the report...
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
My Blog[^]
|
|
|
|
|
I've never done it through Crystal but I did using ComponentOne Reports and I just used a font. I am at home right now, but I have the code at work and I will send it to you tomorrow and you can see if it will work for you.
|
|
|
|
|
draw EAN (8 and 13) barcodes
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=985&lngWId=10
|
|
|
|
|
How can I add system installed fonts in my combo box?
I also want to add color names in another combo box.
How can I show image in textbox if not through which tool i can add a text line & after that line an image. (like messenger, in which we enter any line & then smilly)
|
|
|
|
|
sam_pune wrote:
How can I add system installed fonts in my combo box?
There's a description of how to enumerate the installed fonts here[^] on MSDN.
sam_pune wrote:
I also want to add color names in another combo box.
Is there something wrong with ComboBox1.Items.Add("colorName") ? Or what are you looking for here?
sam_pune wrote:
How can I show image in textbox
You can't. TextBox doesn't support images or hosting other controls.
RichTextBox will support images though. There's an article by Khendys Gordon that demonstrates who to do this here[^] on CP. It's written in C#, but is easily convertable to VB.NET.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello
I'am trying to copy a folder to another drive. I'am doing this with the FileSystemObject fso. Now, I want that the progress of the copying is shown in a Progressbar. All that I get is that first the folder is copied and then the progressbar is shown. I'd like to have it at the same time.
Please excuse my English. I'm not used to speak it very often, but I can understand most of it.
Any help would be greatly appreciated.
Here is the code for copying the folder:
<br />
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
<br />
Dim md As String<br />
Dim di As String<br />
md = "C:\Eigene Dateien"<br />
di = "Laufwerk \i:"<br />
<br />
timer1.enabled = true<br />
<br />
Label1.Text = "Achtung: Datentranfer läuft. Bitte warten."<br />
Label1.Refresh()<br />
<br />
Dateien_Kopieren()<br />
<br />
Label1.Text = "Kopiervorgang ist abgeschlossen"<br />
MessageBox.Show("Der Ordner " & md & " ist nach " & di & " kopiert.")<br />
<br />
End Sub<br />
<br />
Private Sub Dateien_Kopieren()<br />
Dim fso As FileSystemObject<br />
<br />
fso = CreateObject("Scripting.FileSystemObject")<br />
<br />
fso.DeleteFolder("i:\Eigene Dateien", True)<br />
<br />
fso.CopyFolder("C:\Dokumente und Einstellungen\Christoph Schmid\Eigene Dateien", "i:\")<br />
<br />
End Sub<br />
Other controls on the form are a progressbar and a timer.
<br />
Private Sub Timer1_Tick()<br />
progressbar1.value = progressbar1.value + 1<br />
End Sub<br />
|
|
|
|
|