|
Does anybody knows how to play an swf file inside a .NET form.
I tried to use the flash ocx component but it says failed to load activeX.
Is there any other means?
Thanks in advance,
Phil
|
|
|
|
|
You could use a webbrowser control and navigate to the swf file
Add the WebBrowser control to your form and call the navigate method from code
i.e. WebBrowser1.navigate("pathto swf").
Should work as long as a working swf player is registered with IE.
|
|
|
|
|
I need one example program for Keypress event.that is put on Ascii values.so pls tel me one textbox to another textbox.pls tell me the exmple program in VB.Net
Thanking You
somasundaram G
|
|
|
|
|
///6.0
If KeyAscii = 8 Then
Exit Sub
End If
If KeyAscii = 46 Then
If InStr(txtRate.Text, Chr(46)) = 0 Then
Exit Sub
Else
KeyAscii = 0
End If
End If
If Not IsNumeric(Chr(KeyAscii)) Then
KeyAscii = 0
End If
///.Net 2005
If Asc(e.KeyChar) = 8 Then
Exit Sub
End If
If Asc(e.KeyChar) = 46 Then
If InStr(txtRate.Text, Chr(46)) = 0 Then
Exit Sub
Else
e.Handled = True
End If
End If
If Not IsNumeric(e.KeyChar) Then
e.Handled = True
End If
End Sub
////
this is for trapping only numbersand 1 decimal point in a textbox on the keypress event. hope it helps
Love makes the world go round
|
|
|
|
|
All you have to do is handle the KeyDown event of the TextBox. I have no idea what you want to do with the Ascii value, so...
Private Sub TextBox1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
' The keycode is in e.Keycode.
Console.WriteLine("KeyCode value: " & e.KeyCode )
End Sub
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
vs.net ( vb ) 2005
I have a form which when loaded adds x number of checkboxes. In the function i have written to add the checkboxes i have included the folling lines
ACheckBox.Tag = Index
' Index being the number of the current Checkbox
AddHandler aCheckBox.CheckChanged, AddressOf MyClickHandler
How in the 'MyClickHandler' sub will i be able to find the index of the aCheckBox that was clicked ?
Thanks for any help
I really do need help..... all this computer stuff is way over my head !!
|
|
|
|
|
Sub MyClickHandler(sender as object,e as system.eventargs)
sender.tag ' checkbox that was checked.
end sub
|
|
|
|
|
To expand on the other posters answer... When you create the checkboxs in your code, set the Tag property of each CheckBox to the number you want. You can then look at that property in the ClickHandler code to figure out which one was clicked.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello,
I have some strings which I want to replace them with single quotes so that I can use them as arguments that are passed to a sql query.
Example, string variable Name:
"Peter John"
Should be replaced with single quotes
'Peter John'
so name should contain only 'Peter John'
Is there any possible way to do this.
I have tried doing the following:
name.replace(34, 39) 'unicode characters, did seem to work.
name.replace(" "" ","'") 'Not work either
I have been told to use the escape characters:
name.replace('\"','\'')' Syntax error expression expected
Many thanks for any help,
Steve
|
|
|
|
|
please tell us why u intend to do this
|
|
|
|
|
steve_rm wrote: I have been told to use the escape characters:
name.replace('\"','\'')' Syntax error expression expected
As you asked in the C# forum, you got C# code. You can't use escape sequences in VB.
---
b { font-weight: normal; }
|
|
|
|
|
Not totaly sure I understand your request, but if the value of 'name' variable contains the double quote, name.replace("""","'") should work.
Phil
|
|
|
|
|
hi,
Any one have an idea about making activation software.
Thanks,
|
|
|
|
|
Could you be more specific?
|
|
|
|
|
Hi,
I want to make a software for trail use of 30 days or 15 days etc.
Please give me an idea.
Thanks,
|
|
|
|
|
They way I would do it is, after you install your program, store the date that your program was installed for the first time, and use DateTime function to add the days since ran. Then, if your program has been installed for 30 days, set a Boolean value that locks the interface (or however you want to discontinue access to your program).
|
|
|
|
|
Where would you store the values?
Usual user settings locations would be easy enough to find eg: isolated storage.
A key in the registry? You could create an algorithm for generating a key in the registry and just store the date with no other identifying informaiton. And then just leave the key there until a full version was installed.
|
|
|
|
|
Leah_Garrett wrote: Where would you store the values?
In the program. Every time it starts up, it checks to see if it has been 30 days since it's been installed.
|
|
|
|
|
MatrixCoder wrote: In the program.
You mean as part of the binary? Have you got code samples or references?
|
|
|
|
|
Hi,
I have already tries this but there is one loose point.
If a user not changed his system date and runs our software at the same date in which date it installed, No way to increase run days.
Think about it and give me any more idea about this.
Thanks for your reply.
|
|
|
|
|
Dear Friends,
I have faced Big Problem in my Project Boecoz of Performance Issue,
in my application some forms have lot of controls that kind of forms takes too much time to open and process time.
"SO HOW TO IMPROVE THE PERFORMANCE IM MY APPLICATION"
Thanks and Regards
Ravi.G
-- modified at 9:46 Tuesday 5th December, 2006
Ravikumar
[Coimbatore]
|
|
|
|
|
I think you've answered your own question there - use fewer controls on a form & create more forms.
|
|
|
|
|
Yes it s true, bocoz i have used lot of tab pages, but thats is client requirements so i want some other solution,
Thanks
Ravi.G
Ravikumar
[Coimbatore]
|
|
|
|
|
Ravi kumar G wrote: but thats is client requirements
Putting hundreds of controls on a form takes forever to create and initialize them all. The TabControl is one of the most grossly overused and abused controls in the ToolBox.
This is where you work WITH the client to work out these issues. Either they put up with the pathetic performance of creating all these controls or they work with you to reorganize the form so it's a balance between what they "think" they wanted and what is acceptable perfromance.
The TabControl is great for bloating the code in a form as to make it nearly totally unsupportable when it breaks or you have to add more stuff to the form.
Save you and your customer the pain later on and solve these problems now by limiting your use of the TabControl.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
make a new form of your instance at the strting class and change its visible to false.
do this for all forms and whenever u want to view each form ,use form.show method and for closing wrtie form.hide and make a sub to update context of controls when it is going to be shown.
|
|
|
|