|
How can I programmatically set focus to a cell in a DataGridView?
|
|
|
|
|
i have drawn a circle,
i want to have control on that circle?event?do action
anyhelp for that?
Regards
Ramy
|
|
|
|
|
charchabil03 wrote: want to have control on that circle
What do you mena by "control"? Do you want to convert that circle TO a control?? What are you looking to do with this?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
What i want is that :
i have drawn a circle,after clicking on that cirle do action (ex:open an other form..)
Regards
Ramy
|
|
|
|
|
About all I can tell you at this poiont is to handle the click event of the control that you're painting the circle on. Anything other than that and you'll have to supply a lot more detail.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i am trying to change the name of text boxes in vb.net as they are not in proper sequence 180 of them but it wont let me change name as invalid property textbox21 needs to be textbox40 and textbox40 needs to be textbox21 and so on any ideas
|
|
|
|
|
If I understand your question correctly, you are trying to change the name of a textbox to a name already in use.
If that is the case, change your naming convention: instead of naming them 'textbox1' through 'textbox180', use something like 'txtbox1' through 'txtbox180'.
Since these objects should not already exist, you won't have a problem.
Tim
|
|
|
|
|
kendo17 wrote: 180 of them
Well, your basic problem is that your UI sucks. Use a grid if you want a grid. Don't use 180 text boxes if they don't represent a grid.
The other problem is that your naming convention sucks, and that if you want to set the names of your controls, you should do it in the designer, or if you're dynamically creating them, you should put them where you want them in the first place.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I would bet you would be better off doing something like using an image of the seating chart as the background of the Form and handling the click event of the form. Get the mouse corrodinates to deterime which seat was clicked. You would have to do some math so you know how big the x and y range is for each seat but I bet you could figure if each seat is 10 X 10 points, for example, and your mouse click was at x y you could find which seat was clicked. I have never done this but that would be the first thing I look at.
|
|
|
|
|
how to beep an alert sound in vb.net?
i mean if an error occured beep a sound??
Regards
Ramy
|
|
|
|
|
Use the 'Beep' function.
Code sample from Help.
Dim I As Integer<br />
For I = 1 To 100 ' Loop 100 times.<br />
Beep ' Sound a tone.<br />
Next I<br />
|
|
|
|
|
thx...
and to change the Beep sound?
i should go to control pannel and modify the sound?
Regards
Ramy
|
|
|
|
|
Originally, you asked how to beep on alert. Question answered.
If you want to play a WAV file, use the following (modified from version in Help)
<br />
Dim player As New SoundPlayer<br />
<br />
Try<br />
' Assign the selected file's path to the SoundPlayer object.<br />
player.SoundLocation = "C:\Program Files\NetMeeting\TestSnd.wav"<br />
<br />
' Load the .wav file.<br />
player.Load()<br />
player.Play()<br />
Catch ex As Exception<br />
SendToLogText(ex.Message)<br />
End Try<br />
|
|
|
|
|
|
There is another way with Visual Studio 2005 that is really easy:
My.Computer.Audio.PlaySystemSound(Media.SystemSounds.Beep)
or
My.Computer.Audio.Play("C:\MySound.wav")
(So if you don't have VS2005 I'm sorry to waste your time)
|
|
|
|
|
does anybody know how to copy and paste text boxes when not in screen as it only copies the text boxes that are in screen
|
|
|
|
|
Don't tell me you're actually going ahead with 300+ TextBox's on a form? Bad, really bad, idea.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
how about Ctrl+A
And yes, it is indeed bad idea.
Shreekar
|
|
|
|
|
Hi
Is there a way in vb6 to convert a string to an integer. The string I have will always be numbers. I need to do some maths on the string.
|
|
|
|
|
Val[^] is what you're looking for.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks. There is also one other thing when I try get the filelen of a file that is about 3gb in size it returns a -value that is no were near the correct size. This is waht I need to do the math on but can't because of the incorrect value given by filelen
|
|
|
|
|
FileLen, since it's return value is a Long (32-bit signed Integer), will only work with files that are less that 2 GB in size. For anything larger, you'll have to call into the Win32 API to get the file size. Discussion[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks a million. This worked perfectly.
|
|
|
|
|
CInt or CLng will also work.
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
Hi
I have a VB.NET pgm which is reading 1,2,3... xml-files. For each xml-file, i wish to start another VB.NET pgm, WITH some information from newly read xml-file.
How will i do this ??
Kind Regards
Heino
|
|
|
|