|
Thanks for the help. I got things working properly last night.
George
|
|
|
|
|
How To Creat MSG Box Whitch will be automaticly close after 2 to 3 sec.
s
|
|
|
|
|
Create your own form that looks like a message box.
---
Year happy = new Year(2007);
|
|
|
|
|
Hello,
U can use Senkeys function with timer control.
Regards,
Nilesh
|
|
|
|
|
Hi everybody,
I'm trying for a while (and my head is starting to become nuts) to do some animation on my PocketPC application (VB.NET with CompactFramework 2 under Windows Mobile 5), but I can't do what I would like.
I have some beautiful pictures I would like to load one after another, and in the same time I have some stuffs to do (like initializing a TCP Interface).
The problem is that I can't get an event that launch these 2 processes when the form is completely loaded.
I tried:
- Me.Load , but it occurs just before the form is displayed;
- Me.Activated , but the problem is that in my init process I have a form2.Show ; form2.Hide to allow the form2 to load background (this form2 is quite big);
- Me.Validated , but it seems to never happen.
Could you please give me a tip ?
Thanks a lot,
Ch'Portos.
-- modified at 10:03 Monday 29th January, 2007
Yop Yop !!
|
|
|
|
|
Can anyone give me the source code for vb 6 to delete the files from the temporary internet files folder in win xp, I`ve got lots of source code from various vb sites but none of it works, I just need a small proggy to delete my temp int files and cookies, I can delete the cookies but not the others.
Internet explorer and Firefox do not delete all the files which is why I need a proggy, the smaller the better sos I can understand it and use it in future programs
Thanx in advance
wullie
|
|
|
|
|
|
Im trying to get a global integer value from my vb program, into a certain point in a word document (for a certificate), anyone got any ideas.
Word will be 2003, vb.net 2005
|
|
|
|
|
|
The global part is easy, you can see it anywhere. Are you already interacting with Word ? Is this VB6 ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi, thanks for the reply.
It is just a simple program made within vb.net 2005.
All i am trying to do is get the global integer value already created via the users input, then when i click a button, input it in a word document, and print the word document...
Its gonna be for printing a name on a sheet!
Any help welcome
|
|
|
|
|
OK, you can download an MS SDK For controlling word from .NET, I think that's what you need. You will need Word on ay machine it runs on of course.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
|
Hi,
I have defined context menu. I need to make visible some menu items depending on which control in the form it shows(righ click).
How do i get the name of control, from where the context menu is displayed?
Any luck.
Be simple and Be sample.
|
|
|
|
|
what do u want to say i don't know. But as i know you want use same code whish u have written. as u write code on any click event and use same again. if u want so you can this.
oldbutton_Click(newbutton,e)
here oldbutton_Click is old button name "Which Code u want to call" & newbutton is new button name
& e is the event.
Thanks & Regards
Form :-
Vikash Yadav
|
|
|
|
|
Well unless your controls share events you can just modify the context menu in the mousedown event for your control. You know which control it is because it's the only one that fires it's own mousedown event.
If your controls are sharing events then you could check to see wich control it was by testing the sender object. You can see if the sender object is a certain control by doing this.
If sender is textbox1 then
'Modify context menu here
End If
If on the other hand you want all your textbox's to have a given menu you could do this.
If sender.gettype is gettype(textbox) then
'Modify context menu here
End If
and lastly if you really need to find out the name you could cast the sender object as a control and check it's name property.
dim ctrl as control = trycast(sender,control)
If ctrl isnot nothing andalso ctrl.name = "textbox1" then
'Modify context menu here
end if
|
|
|
|
|
In my first post I hadn't considered you were trying to figure out what control opened the context menu in the context menu's opening event. The sourcecontrol property gives you the control that opened it. This code shows some examples:
Private Sub ContextMenuStrip1_Opening(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ContextMenuStrip1.Opening
Dim source As Control = ContextMenuStrip1.SourceControl
'Example: Test it's name
If source.Name = "Textbox1" Then
End If
'Example: Test if it's a specific control
If source Is TextBox1 Then
End If
'Example: Test if it's a type of control
If source.GetType Is GetType(TextBox) Then
End If
End Sub
|
|
|
|
|
Thanks,
this is what exactly I needed.
Rams.
Be simple and Be sample.
|
|
|
|
|
Hey Everybody!
Well i need to display something like this on form:
15 + 10 = 10 + 5 + 10
now i tried gdi+ but i can't find a way to find out where like the 15 ended to start the + in another color so i thought the rich texy box would be easy'er but it seems it's been to long since i used it as well:
the code:
<br />
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
Dim varStart As Integer = 0<br />
<br />
rtBox.Text = "Hallo"<br />
rtBox.Select(varStart, Len(rtBox.Text))<br />
rtBox.SelectionColor = Color.Red<br />
rtBox.Refresh()<br />
<br />
MsgBox("Check 1")<br />
<br />
varStart = Len(rtBox.Text)<br />
<br />
rtBox.Text = rtBox.Text & " My Name Is "<br />
rtBox.Select(varStart, Len(rtBox.Text) - 1)<br />
rtBox.SelectionColor = Color.Black<br />
rtBox.Refresh()<br />
<br />
MsgBox("Check 2")<br />
<br />
varStart = Len(rtBox.Text)<br />
<br />
rtBox.Text = rtBox.Text & "BadBoyTazz"<br />
rtBox.Select(varStart, Len(rtBox.Text))<br />
rtBox.SelectionColor = Color.Red<br />
rtBox.Refresh()<br />
End Sub<br />
now the reason for the msgbox is just to force the pause of the code so that i can see how the rich text box refreshes! It does the same with or with out it!
What happens here is it writes the "Hallo" in red, then the " My Name " in Black & then it writes everything in RED after i add "BadBoyTazz"! What am i missing to get it to look like this: Hallo My Name Is BadBoyTazz
I can't see what the difference is between the first 2 words & when i add the "BadBoyTazz"
Thanx...
PS: If anybody can point me to a place where i can find the selution to the rich text box or gdi "version" please
-- modified at 6:52 Monday 29th January, 2007
I Live In My Own Little World! But It's Ok, They Know Me Here!
|
|
|
|
|
A while back I wrote some software to colour code a report that was displayed in an RTF box. Perhaps it will be of some use to you:
Private Sub Add_text_to_report(ByVal The_text As String, ByVal Style As System.Drawing.FontStyle, ByVal Colour As System.Drawing.Color)
Dim Font As New Font(rtBox.Font.FontFamily, rtBox.Font.Size, Style)
Dim Len As Integer = rtBox.Text.Length()
' Add the text
rtBox.AppendText(The_text)
' Now format it as specified
rtBox.SelectionStart = Len
rtBox.SelectionLength = The_text.Length
rtBox.SelectionFont = Font
rtBox.SelectionColor = Colour
' Clear the selection
rtBox.SelectionStart = 0
End Sub
Simply add this sub-routine into your form and whenever you want to add text to the RTF Box just call the routine, specifying the string to add, its format (i.e. bold, underline etc, and its colour)
Hope this helps,
Regards
Martin
|
|
|
|
|
Thanx will give it a try!
I see now what i missed "AppendText" just can't figure out why the example i've got works with out append but myne doesn't!
Thanx again!
I Live In My Own Little World! But It's Ok, They Know Me Here!
|
|
|
|
|
basically i'm not using VB.NET but an Access application with VBA code in it.
I posted in the vb.net forum as it's the nearest i can get to vba :P
my problem is :
i have a access database, and i want to export information into a MS Word file
this is to be done from access, as a button, that gathers data and makes a word file from it.
i have a working version, that uses a nicely written word file, with certain text named like "FIELD:01" etc.. and i have a button in my access application that (using vba) opens the word file (raw text) and does a string replace of the "FIELD:01" with the corresponding data.
The problem arises when the text to be replaced it either other than English, or funny characters (like the degrees celcius symbol)
Using mail merge features aren't good enough, because i want to insert 1 field of data, and not an entire table, and keeping formatting is important.
I've been playing around with other file formats to replace into, (such as htm, xml, rtf ..) but i still haven't found a solution that is good for both special characters and greek.
If this is posted in a terribly wrong place, please point me to the right direction.
Thank you for any help, it will be much appreciated.
Ericos Georgiades
|
|
|
|
|
i found a solution to my very own, confusing problem.
an article that was written for office 97!
http://support.microsoft.com/kb/131583[^]
posted the solution in case someone else has similar problems
Ericos Georgiades
|
|
|
|
|
Can someone answer this question for me.
Is the contains of this considered a type of collection?
textbox1.text
would like to use the FOR EACH on the text in the textbox1.text
|
|
|
|
|
Yes, a string is a collection. You can use for each to iterate over each char in the string.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|