M.Waqas Aslam 67 Posting Pro in Training Featured Poster

what do you mean by sliding forms ? do you want to move your form from one location to another or you want to change your forms size (width and height) ?

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

you can use registry values for this . here is a link having detail information and code. hope this will solve your prob :) Click Here

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

use selection formula option of crystal reports , and set your criteria.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

hello!
i am currently working on a simple file make application , this application read data from foxpro .dbf file , i want to get records between two dates , from date and to date , the invoice date field name is fl02 here is my query but this is not working properly and not showing any record.

select * from TRANS.DBF where fl02 >= '8/1/2012' and fl02<= '8/31/2012'

i this there is nothing wrong with it if i run it in mssql , but may be there is some thing not proper in this query for foxpro , please guide me.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

if your prob is solved then please mark this thread as solved.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

i think in order to create your own programing lang you have to know deep knowledge about assembly lang . complier , assembler.
every programing lang first convert in assembly lang before machine code. so you can simple make a text editor , define some reserve words like in every programing lang , and after that make convert all your reserve words to respected assembly code and execute your code.
this is simple over view i know to create a programming lang is not this much easy but this will give a little bit idea how it works , if possible first study about compiler , assembler. and as thines01 said it totaly depend on your commitment . you can create simple commands of your own by doing this.

hope this will help you and give you an idea.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

hello !
recently i complete my project management application in .net , now i want to make a attractive main form , i google alot and searching attractive interfaces of application of same domain. i want to you to guid me or if possible then give some links .
you know when a person want to create a web site then he can get ideas from soooooo many sites ,templates , etc , and after all this he can create something attractive , but in case of desktop application it is very difficult to design attractive interface .
every thing is completed , now i want to design main form ,

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

just loop your datagrid view and save values , you can do like this

for i = 0 to datagridview.rows.count -1 
'your code here
next 

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

you want to show output from the database and show it in your textbox ? if yes then you can use sqldatareader for this.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

you want to display files of that selected employee or data of file of that selected employee ?

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

hye try this .hope this time it works fine :P

select distinct fname , (select distinct mname from table1) as mname , (select distinct lname from table1) as lname
from table1

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

you can add column values line by line by doing this.

datagridview1.rows.add(val1,val2,val3......)
'this will add rows to your grid try this.
M.Waqas Aslam 67 Posting Pro in Training Featured Poster

saphiro did you tried this query

"select * from table1 where @yourDate between hiringdate and contractEndDate and id = @ID

'@yourDate and @ID are the variable fields.
M.Waqas Aslam 67 Posting Pro in Training Featured Poster

thanks all of you :) , and sir Acient Dragon on 14 Aug it is public holiday , prade of our Army is held at tomb of founder of Pakistan , Muhammad Ali Jinah , then so many functions in our colleges , schools , universities , and many tv Dramas about History of pakistan , lots of national songs , parties , most importantly every one use batch of pakistani flag .flags at home , lots of posters , face painting on faces . debates. my english is not good so if there is something you cant understand please dont mind.

and in simple words this day is celebrated in Pakistan as in any other independent country in the world.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

please post your full code here of submit button .

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

you have to first add columns to your grid in order to add rows to it , first add columns then add rows

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

and also this one.
Click Here

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

please check these links , hope you will find something usefull in them
Click Here

in my point of view you have to format part of the string here are some links please check them out

Click Here

Click Here
Click Here

Regards

joshl_1995 commented: Thanks for the help +0
M.Waqas Aslam 67 Posting Pro in Training Featured Poster

please visit this link , hope this will help you to solve your prob.
Click Here

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

linabeb. try catch block is used to handle exceptions , you can put any code inside try catch if there will be any error in your code it will give you msg about it .and if there is no error then it will execute your code normally.
now just simple change this

 Try

   If _Userid = 0 Then
conn.open()
 dim cmd as new OleDbCommand()
cmd.connection = conn
cmd.commandtext = "insert into Customer (Username, Password, Name, NumIC, Gender, Email, Address, PhoneNum) values (@Username, @Password, @Name, @NumIC, @Gender, @Email, @Address, @PhoneNum)"
cmd.paramerters.addwithvalue("@Username",txtusername.text)
cmd.paramerters.addwithvalue("@Password",txtPassword.text)
cmd.paramerters.addwithvalue("@Name",txtName.text)
cmd.paramerters.addwithvalue("@NumIC",txtNumIc.text)
cmd.paramerters.addwithvalue("@Gender",txtGender.text)
cmd.paramerters.addwithvalue("@Email",txtEmail.text)
cmd.paramerters.addwithvalue("@Address",txtAddress.text)
cmd.paramerters.addwithvalue("@PhoneNum",txtPhoneNo.text)
cmd.executenonquery()
con.close

                Else

    dim cmd as new OleDbCommand()
    conn.open()
    cmd.connection = conn
    cmd.commandtext = "update Customer set  Username=@Username, Password=@Password, Name=@Name, NumIC=@NumIC, Gender=@Gender, Email=@Email, Address=@Address, PhoneNum=@PhoneNum"
    cmd.paramerters.addwithvalue("@Username",txtusername.text)
    cmd.paramerters.addwithvalue("@Password",txtPassword.text)
    cmd.paramerters.addwithvalue("@Name",txtName.text)
    cmd.paramerters.addwithvalue("@NumIC",txtNumIc.text)
    cmd.paramerters.addwithvalue("@Gender",txtGender.text)
    cmd.paramerters.addwithvalue("@Email",txtEmail.text)
    cmd.paramerters.addwithvalue("@Address",txtAddress.text)
    cmd.paramerters.addwithvalue("@PhoneNum",txtPhoneNo.text)
    cmd.executenonquery()
    con.close



                End If


                    MsgBox("Success !!!", MsgBoxStyle.Information, "Khurasan Online")
                Catch ex As Exception
                    MsgBox("You can only register once !!!", MsgBoxStyle.Exclamation, "Khurasan Online")
                End Try




            End If
M.Waqas Aslam 67 Posting Pro in Training Featured Poster

linabeb. to find error use debugger , just place a break point then use f11 to check each line of code to find where is the error. this will help you in future , now to get the proper error you can use try catch , like this

try
'your code here
catch
msgbox(err.description)
end try

this will help you to get description of your error .
and a better way to write code is that every one can understand it . you can use insert can update commands as follows

dim con as new sqlconnection ("your string")
dim cmd as new sqlcommand
con.open()
cmd.connection = con
cmd.commandtext = "insert into Customer (Username, Password, Name, NumIC, Gender, Email, Address, PhoneNum) values (@Username, @Password, @Name, @NumIC, @Gender, @Email, @Address, @PhoneNum)"
cmd.paramerters.addwithvalue("@Username",txtusername.text)
cmd.paramerters.addwithvalue("@Password",txtPassword.text)
cmd.paramerters.addwithvalue("@Name",txtName.text)
cmd.paramerters.addwithvalue("@NumIC",txtNumIc.text)
cmd.paramerters.addwithvalue("@Gender",txtGender.text)
cmd.paramerters.addwithvalue("@Email",txtEmail.text)
cmd.paramerters.addwithvalue("@Address",txtAddress.text)
cmd.paramerters.addwithvalue("@PhoneNum",txtPhoneNo.text)
cmd.executenonquery()
con.close

'and here is a query for update 

dim con as new sqlconnection ("your string")
dim cmd as new sqlcommand
con.open()
cmd.connection = con
cmd.commandtext = "update Customer set  Username=@Username, Password=@Password, Name=@Name, NumIC=@NumIC, Gender=@Gender, Email=@Email, Address=@Address, PhoneNum=@PhoneNum"
cmd.paramerters.addwithvalue("@Username",txtusername.text)
cmd.paramerters.addwithvalue("@Password",txtPassword.text)
cmd.paramerters.addwithvalue("@Name",txtName.text)
cmd.paramerters.addwithvalue("@NumIC",txtNumIc.text)
cmd.paramerters.addwithvalue("@Gender",txtGender.text)
cmd.paramerters.addwithvalue("@Email",txtEmail.text)
cmd.paramerters.addwithvalue("@Address",txtAddress.text)
cmd.paramerters.addwithvalue("@PhoneNum",txtPhoneNo.text)
cmd.executenonquery()
con.close

i am not saying that you are doing wrong but these things will help you in you future.
i just type all this here to may be there is some spell mistakes , please check them and also use try catch and then tell me the msgbox so that i can better understand the prob , as there is …

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

you can also change the value by just double clicking in it . but this will not change value in your dataset or datatable

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

you can set the modifire property in property window of your control public from private , then you can access it on your second form like this

frmMain frm = new frmMain();
txtGetText.Text = frm.txtMyText.Text

hope this will help you.

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

Thanks jim .

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

to day is 65th independence day of pakistan . please wish my country a great future and piece , our soilders fighting for the global piece , even my elder brother captain Faiz also give his life for this noble cause .
40,000 + soilders of pakistan killed in this war against terror.

May God Bless All Of Us

Long Love Pakistan.

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

this code is working fine for me. i am using vs2010

     WebBrowser1.Navigate("C:\Users\JUNAID\Desktop\a.html")

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

to download from ftp you can use this

my.computer.network.download(ur ftp address+filename,username,password,destination folder+filename)
'as i just typed it here so may be the sequence of parameters may be different. so please advance sorry for this.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

just add web browser control to your form and use this code

webbrowser1.navigate(application.startuppath & "\a.html")

it will load that file in your web browser control.

hope this will solve your prob.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

hello !

i am working on a telerik reports , i worked on them in asp.net and we can just pass parameters to the report by by just doing this

Response.Redirect("rptReportViewerTelerik.aspx?report=rptInvestmentAnalysis&fromDate=" + txtFDate.Text + "&toDate=" + txtTDate.Text + "&doctorTypeID=" + txtDType.Text + "&investmentTypeID=" + txtSegType.Text + "&locationID=" + txtLocation.Text);

but now i am working in a winform application . i dont know how to pass values to my report of my textboxes and datetimepickers . please guid me through it , i have to complete this project as soon as possible.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

ok , please explain little bit more , if i am worng please correct me ,
you want that your id will start from 1 with each month and same with year ?

But the think is when the day is change from 25 to 26 the number will be 0001. also same for Month and year.

Please explain it .

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

everything has some basics , you should start from basics , first study about strings , constants , variables ,conditional statements , loops , functions , datatypes , arrays ,pointers,classes , objects etc.
along with it make some simple programs in c# which help you to get familier with practical environment of c#.
you know hazem . there is no one who teach you every one just tell you , you have to teach your self by your own.
wishing you a very succesful future in programming.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

can you please post your code which solved your prob to help others ?

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

you can make a view like this

select i.invoiceNo , (i.amount) as Amount
from invoices i 
where i.IsDeleted = 0 
union all
select i.invoiceNo , 0 as Amount
from invoices i
where i.IsDeleted = 1

and use this view in your report . this and then just add summary at the end of report of column Amount.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

try

cmd.parameters.addwithvalue("@param",value)

may be this will help you , but it is better to tell us what error you got at cmd.executenonquery()

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

brylle , please use your own thread for your question. do not post your questions in others thread.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

in order to add new row you have to define column in your grid then just add row like this
for example i have to textboxes txtName , txtFatherName and a grid with two columns , name and father name , a button , i want to add new row in my grid by clicking that button. use this code at the click event of the button

datagridview1.rows.add(txtName.text,txtFatherName.text)

this will add row to your grid.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

you can use replace like this

update table
set column1 = replace(column1, '|', ' ')

May be this will solve your prob.
Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

you dont have select permission for this database , try to use windows athentication in vb.net or you can call it trusted connection string , in that string there is no need to give id and pass .

Click Here at this site you can get connection string.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

thanks jim , my prob is solved .

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

thanks for your help mikey.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

just declare a variable of int datatype then use if statements to check conditions at your combobox selected index changed event.like this

dim totPoints as integer 

'use if condition like this 
if val(combobox1.selectedvalue)  > 20 then 
totPoints = totPoints + 3
elseif  val(combobox1.selectedvalue)  > 30
totPoints = totPoints + 2
Endif

hope this will give you an idea to solve your prob.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

yes you can do it just open connection complete your work and close it.

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

try this

int id ;
sqlconnection con = new sqlconnection("your connection string");
sqlcommand cmd = new sqlcommand();
con.Open();
cmd.Connection = con;
cmd.CommandText = "select  isnull(max(loading_record)) + 1  from testing ";
sqldatareader dr = cmd.executereader();

while(dr.read())
{
id = convert.toInt16( dr["loading_record"].toString());
}
string ID = "PA-"+DateTime.Now.Day+"-"+DateTime.Now.Month+"-"+DateTime.Now.Year+"-"+id;
dr.close()
con.close

i typed this code here so there are some typing errors , but hope this will solve your prob.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

smitty , can you please tell me you want to just change the database name or table name , ? i mean

conn.ChangeDatabase(ComboBox1.SelectedValue)

this is used to change the database not table , so when you select table from combo box .it gives error because there is no database of this name . if you want to change the table name just do something like this.

update " & combobox.selectedvalue  & " set field1 = @field1 where userid = @userid

hope this will help you .

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

ok here is a example , you can search your all emplyees by there names , do something like this first take a form with a grid and a textbox , now use this code at the textbox text change event.

dim con as new sqlconnection("your connection string")
con.open()
dim da as new sqldataadapter("select EmpName from emloyees where empName like '%" & textbox1.text & "%'" ,con)
dim dt as new datatable
da.fill(dt)
datagridview1.datasource = dt
con.close()

it will work fine :P Hope it will help you . if your prob will solved then please mark this thread solved.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

update your qty and minus your sold qty from main qty.

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

just go to file menu then new project ---> other project types ---> setup and development ---> give name and select path where you want save your setup --->press ok
after that a page will open having two columns , on your left side there will be there options 1-application folder 2-users desktop 3-users program menu ,
first click on application folder then on right side just right click select Add--->files---> browse your bin folder of your project select all files and folder in it and press ok
then click on users desktop option and then again right click on right side then select Create new shorcut ---> a window will open , select application folder and then select file .exe and press ok

then go to Build menu and there will 3rd option Build YourProjectName click it . Done :P
You have created your first setup.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

you can use timer control , as mikey said if you are working on winform application.
just add a timer control to your form , go to property window , set interval and call your function at timer tick event ,
HINT: in timer interval 1000 = 1 sec , so for 5 mint 5601000 = 5mint

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

hello !
i want to disable my usb port using c# or vb.net ,is it possible to do so using .net ? if yes then any idea how i can do this ?

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

hello !
i want to disable my usb port using c# or vb.net ,is it possible to do so using .net ? if yes then any idea how i can do this ?

Regards