|
Dear friends...
ı had written a code at Wincc...Its
dim box as integer
dim fener
Set fener=ScreenItems("lorry")
...
for box=1 to 5
Fener.left=Fener.left-10
next
end function
...
but editor says its wrong...
so whats the differ VBS and Visual Basic 6
|
|
|
|
|
First, what is "Wincc"?
Next, what's the error that you're getting and on which line?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dear Kreskowiak
Wincc is a type of automation programme..It's of Sıemens....We use it for communicate PLC-COMPUTER and another electric and electronic devices....In that programme u draw some electrical devices and then u write some codes for give them moveable actions..
i show u a example picture from it..
http://www.resimekle.com/yukle/view/91764
|
|
|
|
|
How to read data from excel sheet
and how to insert it into microsoft sqlserver 2000.
|
|
|
|
|
|
i have tried much on for sorting a simple datagrid but yup!
Dim DV As DataView
Dim ds1 As DataSet
DV = ds1.Tables("tbl_emps").DefaultView
Me.DataGrid1.DataSource() = DV
Me.DataGrid1.DataBind()
this is the code what i have written..
the error is :
Object reference not set to an instance of an object.
can anyone help me out please
tirumal
|
|
|
|
|
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?
|
|
|
|