|
PaulC1972 wrote: You beat me to it
Feel free to go and tell him anyway.
|
|
|
|
|
Rmesh wrote: i have used the following coding but i got error
new sqlcommand("Select * from tblcom where date between d1 as d2 and name='"+s+"'")
There are a number of reasons for an error, but you don't tell us what the error is. You seem to think we can guess.
Possible errors for the above code:
* The table tblcom doesn't exist
* The column date doesn't exist
* d1 is not a valid column name
* d2 is not a valid column name
* the keyword as is use incorrectly. Should this be and ?
* the injected value s is causing a problem somehow.
Please also read up on SQL Injection Attacks and how to prevent them[^]
|
|
|
|
|
Hello
I have created a custom installer that will display a form after the installation is completed.
There is the code for the installer class
<br />
Protected Overrides Sub OnAfterInstall(ByVal savedState As System.Collections.IDictionary)<br />
MyBase.OnAfterInstall(savedState)<br />
Dim myform As New Form1()<br />
myform.Show()<br />
End Sub<br />
I have added the project outputs on both the install and commit nodes in the custom actions.
When the installer finishes installing it will quickly flash the form and then disappear.
Can anyone tell me where I am going wrong.
Thanks in advance,
Steve
|
|
|
|
|
Your code doesn't block and wait for the form to return, so, when the OnAfterInstall event finishes, Windows Installer is pretty much done and quits. You have to show your form using .ShowDialog() , not .Show() .
.ShowDialog() is a blocking call, so that code will wait until the dialog is closed before continuing.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I want to whether there is any option to make a picturebox parent to a Text box in vb6.0 or vb.net.
regards
G RK
|
|
|
|
|
WPF can do this. otherwise, no.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
You can't add controls to a PictureBox in VB6. You would normally use a Frame control for that.
In VB.NET, you can add controls to a PictureBox (it's does implement a Controls collection), but a Panel is much better suited for such things. More on it here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am creating an application in which user will give user id and password and then type the web address like mail.Yahoo.com
Application will pass that userid and password to that web page and will opens its mail box.
I am not able to pass the userid and password to the web page.
Does anyone know how to do it?
|
|
|
|
|
Sir/Madam,
I am facing problem in split function.
The problem is
Dim str as string = "12/12/1200"
dim str1() as string = str.split("/")
now i want the output in the form
str1(0) = "12"
str1(1) = "12"
str1(2) = "1200"
I am not getting this output.
Please help
Thanks and Regards
Pankaj
|
|
|
|
|
What output are you getting ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Sir/Madam,
I am getting error when i am writing the code line
dim str1() as string = str.split("/")
Please help.
|
|
|
|
|
Have you thought to read what the error is ? To check MSDN to make sure you're calling the function properly ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Christian Graus wrote: Have you thought to read what the error is ?
Surely that would be just too obvious!?
|
|
|
|
|
I ran your code and it worked without error.
|
|
|
|
|
in vb.net how to use controlcollection to group all similar controls
|
|
|
|
|
A ControlCollection is not used for that. The Controls property of a control, which contains the children of the control, is a ControlCollection.
In what way do you want to group the controls?
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
I am making a button control. It is inheriting UserControl. I have everything complete except the damned click event, I can't seem to get it to fire. Any suggestions?
Tibmeister
|
|
|
|
|
Hi, I've had the same problem. This is how I solved it :
The click event from the button isn't reachable outside the usercontrol.
But inside the usercontrol it is. So you have to handle the event inside the usercontrol and throw up a new event which is reachable outside the usercontrol.
A little code:
- create a control whith a button on it and add the following code to it:
- handle the event and raise a new one
Public Class UCButton
...
Public Event buttonKlik(ByVal sender As System.Object, ByVal e As System.EventArgs)
...
Private Sub Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)_
Handles Button1.Click
RaiseEvent buttonKlik(sender,e)
End Sub
...
End Class
- in the class or whatever where the new event has to be handled :
...
AddHandler Me.btnCommit.buttonKlik , AddressOf Me.commit_klik
...
Public Sub commit_klik(ByVal sender As System.Object, ByVal e As System.EventArgs)
...
do what you have to to
...
End Sub
Ron
|
|
|
|
|
Okay, I think the problem I may be running into the is there is no actual button control on the usercontrol. My "button" is actually a Panel with some custom drawing happening to it. I'm trying to capture the click event of the Panel, then pass it through.
|
|
|
|
|
And in looking at stuff, that is exactly what was happening. Thanks for the tip, you got me thinking in the right direction.
|
|
|
|
|
I'm glad you could use it.
Ron
|
|
|
|
|
Hello.
I need to create application using VB.NET that will parse csv file and import data into the database. I tried to read csv file but it returns funky characters. Did anyone had experience with this.
Thanks in advance.
Alex.
|
|
|
|
|
Perhaps if you posted your code, we could tell you why it's broken. In VS2005, there's static methods on the File class in System.IO that will read an entire file as a string array, and the split method on the string class will turn a string with commas in it into a string array also.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
The problem is I don't have code. I just used something I used in the previous project to read a text file. If you can kindly point me into the right direction I woudl really appreciate that.
Thank you,
|
|
|
|
|
alexfromto wrote: If you can kindly point me into the right direction I woudl really appreciate that.
I thought I'd done that ?
http://msdn2.microsoft.com/en-us/library/db5x7c0d.aspx[^] is a good starting point for the reading of text. Use the method that returns a string []. Each string is a line in your file. Iterate over these, and use the split method on each string, using the , as a delimiter, you'll get back a new string []. Each string is now a field.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|