|
Some poeple just don't get it
|
|
|
|
|
recurring customers?
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
How would I make a timer click for me? EX. If i clicked a button that would start the timer then the curser would start clicking at the intervel on the timer/
|
|
|
|
|
click on what? your button? if so: in timer_tick-event: button1.performclick
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
In your button's click event handler, you should use YourTimer.Start , where YourTimer is the timer you created...
"That's the problem with a spell checker. It only helps with bad spelling, not stupidity." - Rob Graham
|
|
|
|
|
Hey,
I'd like to know how I can drag and drop controls during runtime.
I am using Visual Studio 2005 --> Visual Basic.
Thanks,
--Zaegra--
|
|
|
|
|
What do you have difficulty with? Be more specific.
You need Mousedown-Event for the control you want to drag to start Drag&Drop, and DragOver- and DragDrop-Event for your control you want to drop that first control in. But I am sure you figured that out yourself.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Hi All
I have created a DAL using datasource and added few function and it accept from and to Date. Then added a Report Viewer control to my Windows application. After that I added new item Report1.rdlc. Then I dragged field from Dataset on to Report1 and organized and set the Datasource .rdlc to the Report Viewer control after that I executed my application working fine. Now I decided to added two datetime parameter to my Report1 and added. When I try to run the .SetParameters it thrown error as 'An error occured during local report processing'
Could you please help me how to solve.
<code> Dim rsDataSource As New ReportDataSource("OT Applied Info", OverTimeEntryTable)
Me.Reports.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local
Me.Reports.LocalReport.EnableExternalImages = True
Me.Reports.LocalReport.ExecuteReportInCurrentAppDomain(System.Reflection.Assembly.GetExecutingAssembly().Evidence)
Me.Reports.LocalReport.DataSources.Clear()
Me.Reports.LocalReport.ReportEmbeddedResource = "OTApplied.rdlc"
Me.Reports.LocalReport.DataSources.Add(rsDataSource)
Dim params(0) As Microsoft.Reporting.WinForms.ReportParameter
params(0) = New Microsoft.Reporting.WinForms.ReportParameter("SDate", Format(CDate(dtpSDate.Text), "MM-dd-yy"), True)
params(1) = New Microsoft.Reporting.WinForms.ReportParameter("EDate", Format(CDate(dtpEDate.Text), "MM-dd-yy"), True)
Me.Reports.LocalReport.SetParameters(params)
Reports.LocalReport.DataSources.Add(rsDataSource)
Reports.Visible = True
Reports.LocalReport.Refresh()</code>
Thanks
Sonj<big></big><big></big>
|
|
|
|
|
Hi All,
No help from any one of them however I found that ReportEmbeddedResource is follows application name for example Me.Reports.LocalReport.ReportEmbeddedResource = "ReportProject.OTApplied.rdlc"
ReportProject is my Application Name.
- sonj
|
|
|
|
|
Good Morning All
i have the Following SQl Procedure
<br />
USE [ValRollClients]<br />
GO<br />
<br />
SET ANSI_NULLS ON<br />
GO<br />
SET QUOTED_IDENTIFIER ON<br />
GO<br />
ALTER Proc [dbo].[CheckExistance]<br />
(<br />
@username varchar(50),<br />
@OldPassword varchar(50),<br />
@OutRes int Output<br />
)<br />
as <br />
set @OutRes =(select count(*) FROM Login WHERE <br />
Username = @username And UPassword = @OldPassword)<br />
<br />
in my Query analyzer i test it like this
<br />
declare @OutRes varchar(5)<br />
Exec [CheckExistance] 'vuyiswa','5555',@OutRes Output<br />
select @OutRes <br />
<br />
if the User Exists it gives me "1" and if not "0"
and i use this Procedure from Vb like this
<br />
con = New SqlConnection(strcon)<br />
<br />
cmdselect = New SqlCommand<br />
<br />
cmdselect.CommandTimeout = 0<br />
<br />
cmdselect.CommandType = CommandType.StoredProcedure<br />
<br />
cmdselect.CommandText = "CheckExistance"<br />
<br />
cmdselect.Connection = con<br />
<br />
cmdselect.Parameters.Add("@username", "Username")<br />
<br />
cmdselect.Parameters.Add("@OldPassword", "strPassword")<br />
<br />
cmdselect.Parameters.Add("@OutRes", SqlDbType.Int)<br />
<br />
cmdselect.Parameters("@OutRes").Direction = ParameterDirection.Output<br />
<br />
Dim bolres As Boolean<br />
<br />
Dim intRes As Integer<br />
<br />
Try<br />
con.Open()<br />
<br />
<br />
intRes = cmdselect.ExecuteScalar()<br />
<br />
intRes = cmdselect.Parameters("@OutRes").Value<br />
<br />
<br />
Select Case intRes<br />
Case 1<br />
bolres = True<br />
Case 0<br />
bolres = False<br />
<br />
End Select<br />
con.Close()<br />
<br />
Catch ex As SqlClient.SqlException<br />
<br />
MsgBox(ex.Message)<br />
<br />
End Try<br />
<br />
Return bolres<br />
<br />
<br />
but my Boolean value will be false, that means it always brings "0"
what is the Problem
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
The way I always do this, is to create the parameter so I have a variable that points to it, then set it's direction and finally add that parameter by passing in the variable. Then I check the value on the variable. not sure how that would make any difference, but my code always works.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Hi Chris
i did that, ok, i have change this line to be like this
<br />
<br />
cmdselect.ExecuteNonQuery()<br />
<br />
intRes = cmdselect.Parameters("@OutRes").Value<br />
<br />
As for my Stored Procedure will deliver me a value of "1" when a user is Found and
"0" when a user is not Found. and after this i pass the value returned by an OutPut variable to a integer variable and test it like this
<br />
Select Case intRes<br />
<br />
Case 1<br />
<br />
bolres = True<br />
<br />
Case 0<br />
<br />
bolres = False<br />
<br />
End Select<br />
<br />
now this will always give me "False", but My Procedure will give me "1" as its Supposed to be true.
I dont know whats wrong here
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
I guess you didn't understand me.
EIther way, it seems unlikely that what you wrote shouldn't work. Have you stepped through, grabbed the values being passed in, passed them to the stored proc, confirmed your code is connecting to the same database, and still got a different result ? Are you sure your proc sets the value of outres, and just just return 1 or 0 ?
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Hi Chris
thanks again for your reply, again i have not assign values to my parameters. for me to Fix this i had to do the following
<br />
<br />
<br />
cmdselect.Parameters.Add("@username", "Username").Value = Username<br />
<br />
cmdselect.Parameters.Add("@OldPassword", "strPassword").Value = strPassword<br />
<br />
i was Supprised, how did i not see this
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Vuyiswa wrote: Select Case intRes
Case 1
bolres = True
Case 0
bolres = False
End Select
Your code is always falling through to the latter case. Either add a break statement after bolres = true or use an if...else construct rather than a select case
|
|
|
|
|
I didn't spot that, b/c C# does not allow that and I assumed VB did the same ( but perhaps more sensibly didn't have a break keyword, if it always works that way anyhow )
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
I was already developed crysatal report but i need how query pass to crystal report.now i am using vb.net and oracle
parthiban
|
|
|
|
|
Dear Friends..
I am having login screen form in my VB.Net windows application.I should be able to display that form only once in my PC.i.e i want to restrict multiple opening of the same login form.
I mean that only one instance of that form should be viewed in the screen.
Someone help in this regard as early as possible..
Regards,
Balaguru
|
|
|
|
|
Balagurunathan S wrote: Someone help in this regard as early as possible..
You can set a time limit when you're paying someone.
Do you mean you want your app to show only one login, or that you only want one instance of the app to run ? The former is entirely up to how you write the code, the latter, you can do a number of ways. Interestingly. when I did what all people in a hurry should do (try google), the first two hits were articles on this very site. Did you think to search the site or try google ?
http://www.google.com.au/search?sourceid=navclient&ie=UTF-8&rlz=1T4ADBS_enAU225AU226&q=vb%2enet+%22single+instance%22[^]
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
How can i change the icon of my Visual Basic exe file..
I tried to set the Icon Property of Form... But its
showing the Message Invalid Picture Property..
Can anybody plz help me
Thanx in Advance
|
|
|
|
|
in main menu project choose properties, there you can change the application's icon.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
hi friendz,
i hv a doubt in VB.Net
i hv a string as "jacab,martin"
i want to split it and assign it
in FirstName = jacab, SecondName = martin
i used "split" method, but for me it doesn't work,
is there anyother way t get my result?
self confidence+hard work=SUCCESS
|
|
|
|
|
Try this
Dim arNames() As String = Split("james,martin", ",")<br />
Dim sName As String = arNames(0)<br />
Dim fName As String = arNames(1)
|
|
|
|
|
THANKS A LOT,
THIS ALSO WORKIONG YAAR,
Dim memberName(2) As String
Dim memberLName As String
Dim memberFName As String
memberName = memberNameTextBox.Text.Split(“,”)
memberLName = memberName(0).Trim
memberFName memberName(1).Trim
self confidence+hard work=SUCCESS
|
|
|
|
|
Just a minor issue, this produces a 3 element array 0,1,2
Dim memberName(2) As String
This is not relevant to your current code but will trip you if you ever use memberName.lenght (which is 3 NOT 2)
|
|
|
|