|
Oy thats not fair, i bet sometime you were a beguinner aswell
Anyway i have looked at all the links and i cant find anyhting that is what i want, i just want the code so that when you press a button the text in that button is sent to the selected window(application) somebody please help me
thanks in advance
Jamie
|
|
|
|
|
In order to press a button in one application, it needs to have the input focus. Since your keyboard now has the focus, what was the last control to have the focus??? Hint: There's no function or method that will tell you that. So where do you send the key stroke??
|
|
|
|
|
Please help me i've seen it done before i just dont know how to code it in i think possibly you could set it so when a button is pressed it opens a microsoft word document and then all the other buttons simply Word.Application = Word.Application & button1.Text but word. Application does not seem to work in vb 2008 express edition.
Can no one help me
Please
|
|
|
|
|
This should be a softball for some of you.
I want to have all of the text in a textbox highlighted when I enter (click, tab, etc) into it. How do you do that?
Thanks in advance!
|
|
|
|
|
Use the selectionstart and selectionlength properties, set them to 0 and the length property of the text.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
TextBox.SelectAll()
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Create a handler for the GotFocus event & use SelectAll method. This works for tabbing between controls. Select all on click is a difficult, because the control uses mouseDown to set the caret. You could handle the MouseDown event in the same way as GotFocus & see if you like the result.
Rob
"An eye for an eye only ends up making the whole world blind"
|
|
|
|
|
Hi every body ,
i have a problem ??
i have a list view control in windows application , and i set its chcek property to true
i want if the user Check an item to make all other items unchecek and i don't know how ? i try too much but it doesnot work
Can You help me how to do it ??
Thanks
Mona .
LA ELAH ELA ALLAH MOHAMED RASOL ALLAH
|
|
|
|
|
You'd have to handle the ItemChecked event of the ListView, which will give you the item that was clicked on. You'd then have to set a static flag in the event handler that will signal that you are changing check marks. Iterate over the items in the list, changing each check mark, then reset the flag. Since changing the check mark will fire the same event again, the handler code has to start by check that flag. If it's set, then the handler code can exit without making any changes.
But, wouldn't this be a job for RadioButtons?? After all, this is exactly what they do.
|
|
|
|
|
thanks for your replay
but can you mak it more simple , sorry i am new in vb so can u explain with code , it'll be better and easy to understand
Thanks a lot
Mona
LA ELAH ELA ALLAH MOHAMED RASOL ALLAH
|
|
|
|
|
Hello,
Please try this code. I believe this should assist you.
<br />
Private Sub ListView1_ItemCheck(ByVal sender As Object, ByVal e As System.Windows.Forms.ItemCheckEventArgs) Handles ListView1.ItemCheck<br />
<br />
For i As Integer = 0 To Me.ListView1.Items.Count - 1<br />
<br />
If i <> e.Index Then<br />
<br />
Me.ListView1.Items(i).Checked = False<br />
<br />
End If<br />
<br />
Next<br />
<br />
End Sub<br />
<br />
Regards,
Allen
Allen Smith
Software Engineer
ComponentOne LLC
www.componentone.com
|
|
|
|
|
or another one
<br />
If Bloading the exit sub<br />
bLoading = true<br />
For each oItem as Listview item in LVData.items<br />
oitem.checked = true<br />
next<br />
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
sorry for my english...jejeje
i can't create my UserControl With opacity.
somebody knows like doing it?
I thank for your aid....
CODEPROJECT is my favorite WebSite.
thanks!!!
OrLaNdO HeRReRa
«« MEXICO »»
|
|
|
|
|
rammsteinohr wrote: i can't create my UserControl With opacity.
No, you can't. Opacity only applies to the entire form, not controls. Currently, you'd have to use WPF to do this.
|
|
|
|
|
I am developing in VS2008 Express Edition using ASP.net and VB.net. I would like to record the local time when something happens in the application (say a button is pressed). If you use the Now() function, it returns the Servers time. I want the time on the local computer. I have searched high and low and am baffled this is not needed more often. There is practically no mention of it on the web. Any pointers would be appreciated.
Thanks,
Karl Tomecek
|
|
|
|
|
This question really belongs in the ASP.NET forum. It has nothing to do with VB.NET at all.
There is nothing that the browser sends to your ASP.NET code that will tell you what timezone the client is in. You'll probably have to use JavaScript code in the page to set a hidden field with the clients time when the form is submitted back to your server to get the client time, or at least the timezone the client is in. Your ASP.NET code would then have to parse the date time value found in the hidden field to get at this information.
|
|
|
|
|
I beleive it is available in the environment variables which can be got at via JS
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Does that also apply to JavaScript running in a browser on a *nix box??
|
|
|
|
|
I see what you mean, I may be thinking of the win env vars. Is there a equivalent to the var set in *nix is probably the relevant ?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I think it would be possible via the Javascript. First get the time via jscript and then submit the form.
Parwej Ahamad
R & D with IIS 5.0/6.0
|
|
|
|
|
Thanks for all your input. It helped me find a great website with a video that more or less shows you how to do this. In the end, it was done with Javascript storing the date in a hidden variable and then the app has access to that data. Here is the link in case anyone ever needs to learn how to do this:
http://www.asp.net/learn/videos/video-275.aspx
Thanks to you all once again...
Regards,
Karl
|
|
|
|
|
i'm having an major performance issue with a concatination query i wrote against a datatable and was looking for a way to either speed up the query or a whole nother way of doing it which performs better...
at present my app spends 2 min processing this one loop, while i can do the two loops individually in about 5 seconds.
Here is the code:
<code>
For Each dr As DataRow In Main.DS_New.Tables(RightTable).Select(filter, "location,type desc")
Dim CATValues As String = Nothing
If dr.RowState <> DataRowState.Deleted And dr.RowState <> DataRowState.Detached Then
Select Case dr("name").ToString.ToLower
Case "value"
For Each DRsameLocation As DataRow In Main.DS_New.Tables(RightTable).Select(filter & " AND PK<>" & dr("PK") & " AND Location='" & dr("Location") & "' AND type='" & dr("type") & "' AND Name='" & dr("Name") & "'")
CATValues += Chr(215) & DRsameLocation("loc") & Chr(214) & DRsameLocation("value")
DRsameLocation.Delete()
Next
If CATValues = Nothing Then
dr("value") = dr("loc") & Chr(214) & dr("value")
Else
dr("value") = dr("loc") & Chr(214) & dr("value") & CATValues
dr("loc") = "MV"
End If
End Select
End If
Next
</code>
|
|
|
|
|
This would probably be better done on the database side with a stored procedure. Look into the COALESCE sql function.
|
|
|
|
|
unfortunatly since the data is in a datatable, and not in SQL, that is not an option.
|
|
|
|
|
Can someone tell me if I have to end up w/ my mail merge template open when creating a new document. I don't want to spend a lot of time trying to figure out how to close it, if it's not possible. Thanks!
|
|
|
|