|
hi,
the first or only parameter for Process.Start should be a string pointing to:
- either an executable file (.EXE)
- or a document for which a file association exists (e.g. a .DOC assuming MS Office has been installed)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
thanks for the answer...
but it works with even a shortcut...n thats my requirement too
How do i achieve that?
-----------------------------
I am a beginner
|
|
|
|
|
It seems I'm not thinking so clearly today, so you want to start the application linked to a shortcut?
Motivation is the key to software development.
|
|
|
|
|
Your code is not giving any time for the process to start. After you call Start, you have to wait for the process to start before you call WaitForExit. Try calling WaitForInputIdle before WaitForExit.
|
|
|
|
|
hello everyone
i am having 2 textboxes now i display '0' values in both textboxes at design time
at run time i change the values of it like textbox1 has value 3 now i want that textbox2 should start from 1 when i enter any numeric value in textbox 1
for this example if i enter 3 in textbox1 then textbox2 should be 1 and inrement likewise.
for that my code is:
If Val(Me.txtbox1.text) > Val(Me.txtbox2.Text) > 0 Then
Me.txtbox2.Text = Val(Me.txtbox2.Text) + 1
Else
Me.txtbox2.Text = Val(Me.txtbox2.Text) - 1
End If
but this is not working
please suggest some another code
thank you all.
|
|
|
|
|
It seems like a pretty straight-forward question, but still I don't understand what needs to be done. Please explain it again so I might understand what you're trying to do
Cheers,
Zaegra
Motivation is the key to software development.
|
|
|
|
|
suppose there are two textboxes and button1 in form
textbox1- for no of documents
textbox2-is counter
now when i type '3' in textbox1
then this count which is another textbox2 should auto generate from '1'
now when i click on button1 then this count should have value '2' and all textboxes becomes clear
i.e there should be 2 in textbox2
now when i again click on button1 then this count which is textbox2 should have value '3'and all textboxes become clear..
please suggest some code for it
hope you got me...
please help...
|
|
|
|
|
suppose there are two textboxes and button1 in form
textbox1- for no of documents
textbox2-is counter
now when i type '3' in textbox1
then this count which is another textbox2 should auto generate from '1'
now when i click on button1 then this count should have value '2' and all textboxes becomes clear
i.e there should be 2 in textbox2
now when i again click on button1 then this count which is textbox2 should have value '3'and all textboxes become clear..
please suggest some code for it
hope you got me...
please help.
|
|
|
|
|
So you mean each time the button is clicked the value of TextBox2 needs to be increased by one?
Here you go:
(NOTE: Make sure the user only inserts a numeric value in TextBox1, if not, an exception will appear. Also, in the Designer set the Text Property of TextBox2 to "1")
Private Sub Button1_Click(..) Handles Button1.Click
Dim dec as Decimal = TextBox2.Text
dec+=1
TextBox2.Text = dec
End Sub
Motivation is the key to software development.
modified on Saturday, May 9, 2009 10:43 AM
|
|
|
|
|
any one please explain the following VB code
If Not COMMON_MainForm.rsdbinfo.EOF Then
COMMON_MainForm.rsdbinfo.Edit
COMMON_MainForm.rsdbinfo!Operationtype = "MREAM"
COMMON_MainForm.rsdbinfo.Update
COMMON_MainForm.sdboperation = "MREAM"
End If
Thanks
Willington
|
|
|
|
|
There's no way to know for sure with the tiny snippet you posted, but it looks like it's modifying records in a recordset.
|
|
|
|
|
I am doing a 200 marks project. However I have encountered some problems.
(1) I am using LINQ command to delete an entry from database in my application. After the code block is executed that particular entry is deleted from database however the binding navigator control or my application doesnot acknolodge the change. I tried to acknolodge the change by refreshing and/or updating the form and/or control.
(2) I also want to how to count total number of entries present in the database and the index of the current selected entry dynamically. After deleting or adding an entry the change is not acknolodged.
(3) I am doing a hardware project where I use a service which when activated will get my COM port(serial port) in passive open state. I am achieving this by creating a infinite for loop. However by doing this whenever my I start the service I am not able to use rest of application. I plan to overcome this problem by using threading. I plan to use one thread for the service but don't know if I should use thread for other elements. I only have one service in my application. I have no idea with any aspect of threading. Please guide me in this issue. I have a doubt if the signal arrives when the thread is not in focus then would the signal be lost.
Please guide me for these issue.
|
|
|
|
|
First, without seeing any code, it's very difficult to say what you did wrong.
But, I'll take some guesses.
Ishaan Karnik wrote: (1) I am using LINQ command to delete an entry from database in my application. After the code block is executed that particular entry is deleted from database however the binding navigator control or my application doesnot acknolodge the change. I tried to acknolodge the change by refreshing and/or updating the form and/or control.
This is probably because you bypassed the dataset/datatable the controls are bound to and made the changes directly to the database. You'd have to refresh the dataset/datatable, or whatever collection you used so it retrieves the new data from the database.
Ishaan Karnik wrote: (2) I also want to how to count total number of entries present in the database and the index of the current selected entry dynamically. After deleting or adding an entry the change is not acknolodged.
Again, you bypassed the local collection of records when you made the update.
You can get the current number of records from the DataSet/DataTable or collection that you used to hold the data. There are Count and Length properties you could use to determine this.
The currently selected record would be available from the BindingNavigator you have setup.
Ishaan Karnik wrote: (3) I am doing a hardware project where I use a service which when activated will get my COM port(serial port) in passive open state. I am achieving this by creating a infinite for loop. However by doing this whenever my I start the service I am not able to use rest of application.
Your description doesn't make sense. Are you saying that you're running your application as a service?? This is a REALLY bad idea. If not, then did you launch your actual work under a seperate thread in the services OnStart event? (This is where some code small code snippets would help a lot!)
Ishaan Karnik wrote: I plan to use one thread for the service but don't know if I should use thread for other elements.
What other elements?? What is this service supposed to do??
Ishaan Karnik wrote: I have a doubt if the signal arrives when the thread is not in focus then would the signal be lost.
COM port communucation is buffered, so it's unlikely that you'll lose anything.
|
|
|
|
|
You, sir, get a 5 just for attempting to sort that out.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
I try. Though, sometimes, it's just hopeless.
|
|
|
|
|
Hi guys,
I've question
for example I wana to fill the data field for customer who wana to rent from my office (cars rental)
after that I need to save report or documnet PDF
how I can do that ????
|
|
|
|
|
Take a look at the documentation for MicrosoftReportViewer and the links in there.
Or if that is overkill, extract the fields from your data-entry form and do your own layout. (look at the Printer, PrintDocument and PrintPreview classes)
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
You can Use Report Viewer and Crystal report for Generating Report and Export it to PDF Format.
Best Regard
If you can think then I Can.
|
|
|
|
|
Hi
I need to add 3702 items in to a list box.. but unable to do it I guess maximum number of items that can be added is much less than this .. don't know exactly though..
But I need to some how allow the user to select one of 3702 items.Can any 1 suggest some solution . Please let me know asap.. I am using vb 2005
Thank u sooo much in advance
|
|
|
|
|
3702 is a big number, but not big enough to make a listbox crash. I think you should reconsider the design.
जय हिंद
modified on Friday, May 8, 2009 12:00 PM
|
|
|
|
|
Let's see your code, I think you are allowed to have tens of thousands of items in a listbox item collection, may be wrong but let's have a peek just to see.. I just ran a test
private void button1_Click(object sender, EventArgs e)
{
for (int i = 0; i < 4000; i++)
this.listBox1.Items.Add(i.ToString());
}
Added all items fine...
|
|
|
|
|
Hi,
If there is a limit it is much higher than 3702. What effect are you seeing when you try to add your items. Is there an exception?
Alan.
|
|
|
|
|
I didnt add them dynamically.. was adding them at design time.. i added abt 2228 states
then i cudn copy any more items in to the items property..
|
|
|
|
|
|
so maybe the property editor is what is the limiting factor.
anyway, I would never enter such an amount of data through a poor editor.
Why not:
1. enter it all in a file, then at run-time read that file (will be easier and faster); if need be, you can add the file as an internal resource
2. come up with a better user interface, people don't like scrolling thousands of items to find the right one.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|