|
yogesh_kumar_agarwal wrote: Thanks for your reply. As you wrote i already check that my database is updated successfully wihout the prob.
And the another thing after database updation i use a msgbox to show the message that Invoice genrated successfully then i go for the receipt printing, now on to message box if i wait for a litle bit time hardly 1 second my receipts prints fine but if i am in hurry then the same problem occurs even when i remove the msgbox then on wait is there to print receipts so it always gives the wrong receipts the database is good because duplicate receipt print the correct one.
As I said, it probably takes a few milliseconds for the database update to finish, before which the report is already invoked... You have illustrated this yourself, when you say that having a message box before the report print works fine.
|
|
|
|
|
I think you are write, because an another fact i just came to know if i print the report directly to the printer (without showing it) it will genrate the correct reports (Receipts). any how could you plz sugges me the way to update database more quickly or any other way by which a user of the application has to wait for a second before printing the receipt.
Yogesh Agarwal
|
|
|
|
|
If you keep the DB updates on a separate thread, you could wait for that to complete before invoking the reporting thread...
|
|
|
|
|
i am asking the same how do i wait my application for a while till my database is not being updated
Yogesh Agarwal
|
|
|
|
|
Hi thanks for all of your replies, Now my problem gets solved.
Yogesh Agarwal
|
|
|
|
|
yogesh_kumar_agarwal wrote: Hi thanks for all of your replies, Now my problem gets solved.
You are welcome.
How about posting what you did to solve it then?
|
|
|
|
|
Hello, I encountered the following problem.
I have 2 forms and 2 textBoxes. Every form has 1 textBox and the program starts with form1. When I press a button, form2 opens and I can start to use it. On form2 is also a button, that needs to put the value from textBox2 on form2 to textBox1 on form1. But it won't do that. What am I doing wrong? I got the following code:
button.click event on Form2
Form1.textBox1.Text = textBox2.Text
|
|
|
|
|
What you're doing wrong is that you're not really understanding concepts of OO. Form1 obviously doesn't contain a reference to the Form1 instance that is running in your program. You're also failing in two other areas:
1 - textBox1 is a dumb name for a variable
2 - it should never be a public variable
This is what delegates are for, set up a delegate that passes the text back to form1, and let form1 update the textbox with that text.
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 )
|
|
|
|
|
u need delegates and events
Public Delegate Sub OnSelect(ByVal val As String) 'Create a Delegate outside of the scope of class.
Public Shared Event TextBox2Date As OnSelect 'Code on the Form to create an event of your delegate type
on click event of the button on form2
fire this event
TextBox2Date(textbox2.text)
On form1 handle this event
AddHandler form2.TextBox2Date, AddressOf ShowDatainTextbox1
sub ShowDatainTextbox1 (val as string)
textbox1.text = val
end sub
hello
|
|
|
|
|
I have a DataGridView from which users can preview two different reports via a link column in the grid. Due to lack of space, and to make the grid look better, I'd like to give these two preview columns a single heading. For example, users can click on the Rpt1 column to preview Report 1, or Rpt2 to preview Report 2 but instead of this:
Preview | Preview
Rpt1 | Rpt2
I want it to look like this:
Preview
Rpt1 | Rpt2
Anyone have any ideas of how to accomplish this? I work with VS2005.
|
|
|
|
|
Set up one column to render the two data items as links with the | between them.
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 )
|
|
|
|
|
Okay, so how do I go about doing that?
What type of column to I make it? My only options appear to be:
DataGridViewButtonColumn
DataGridViewTextBoxColumn
DataGridViewCheckBoxColumn
DataGridViewComboBoxColumn
DataGridViewImageColumn
DataGridViewLinkColumn
And if I use a Link Column, I cannot figure out how to add another link to the Cell. I know I've done something like this in a web project before, but PC seems to be different. Do you have some specific code that can point me in the right direction?
I would appreciate any help.
|
|
|
|
|
Hmmm.... I have to admit I've not used a datagridview, and I assumed you were asking a web question.
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,
I am using VB6 with Crystal Report viewer.
I wrote a function that adds a picture to the report in runtime using OLEObject.
here is the code I'm using:
<br />
Set CrPic = CRXReport.Sections(NewPicture.Section).AddPictureObject(NewPicture.Path, NewPicture.XLoc, NewPicture.YLoc)<br />
<br />
CrPic.Width = NewPicture.Width<br />
CrPic.Height = NewPicture.Height<br />
the picture appears where I told it to be and in the requested size.
However, it seems that when I first load the picture into the OLE, it "takes" the size of the original picture, and doesn't change it after I change the size. So I have a lot of blank space.
I'm looking for a way to either make the OLE take less space from the beginning, or force some sort of refresh of the report.
Any suggestions?
Thanks.
|
|
|
|
|
For each row in my datagridview I would to like my dropdown to have its own items in its list. How can this be done?
|
|
|
|
|
Can you clarify your specification ? what you want exactly ?
/***********************/
Parwej Ahamad
g.parwez@gmail.com
/***********************/
|
|
|
|
|
One column in my datagridview is a combobox type. The items in the combobox need to be different for each row. For example if you click on the combobox on the first row in the datagridview you would see blue, red, and green. If you click on the combobox on the second row in the datagridview you would see orange, yellow, and brown. The combobox needs to have its own items for each row in the datagridview.
|
|
|
|
|
Hi Friends,
Help me how to call batch file from visual basic.
i created batch file like....
net use \\serverl\saal1 /user:admin 123456
The purpose of calling the batch file is, when i connect to the application (VB) before giving login details it should connect to the above server. So i m creating that as a batch file and have to call when my application starts.
Please help me.
Regards,
|
|
|
|
|
If you're using VB6 then you can use the Shell statement.
If you're using .NET you can something like this :
<br />
System.Diagnostics.Process pcBatch = new System.Diagnostics.Process();<br />
pcBatch.StartInfo.FileName = sFileName;<br />
pcBatch.Start();<br />
|
|
|
|
|
Hi,
I need help with Autosizing the form controls on the page when the form gets maximized or minimized.
can any one provide an idea how to acheive it.
Any links or postings please...
Jats
|
|
|
|
|
|
Hi ,
Now i found out the While adding the powerpacks shape at design time also , the panel is moving .
here is description .
At the design time of VS 2005 ,
Add a SplitContainer .
1) In that SplitContainer ,set
Panel1.AutoSize =true
Panel1.AutoScrollMargin=30, 30
Now add New Panel to Panel1 of SplitContainer which is having More Size than the panel1 of split Container then
We can see the scroll bars
2) Now add a powerpacks RectangleShape on the Bottom Right of the Panel Which is added to Panel1 of SplitContainer .
Check the thng
The Shape control added is moving up automatically to some location .
Here if we add normal controls like textbox,etc is not moving .OnlyFor Shapes like LineShape, RectangleShape ,OvalShape is moving for the first ShapeControl .
2) Same like this i am creating at runtime .Here the page is moving automatically ,
Now i want the panel to set at tht position only while drawing the things .????
How ????????
|
|
|
|
|
Hi,
I am creating a stream :
stream = file.create(filePAth) 'And it pops up a message here saying : "Illegal characters in path"
I have searched high and wide for illegal character, in normal view and hex, and there is none.
The only thing I can think of is the space character, I have searched google and found some things that can be done to prevent this usign @ in front of the string, but it doesn't work in VB.
Any ideas?
Thanks!
|
|
|
|
|
hi
first try it by using the static path like c:\
if it works fine then go for filePath variable and in that if want to remove only tralling and starting spaces then use
Trim(filePath)
else you could go for a loop like this
<br />
dim a as string <br />
<br />
for i=0 to len(filePath)-1<br />
if mid(filePath,i,1)<>" " then<br />
a=a+mid(filePath,i,1)<br />
endif<br />
next<br />
now a will the string without spaces
Yogesh Agarwal
|
|
|
|
|
Yes I know that, but I cannot change the string, this is an absolute path. The path cannot be changed...
I just need to tell the compiler, or that function or someone... that there is a space in the PATH string. So it can handle the space...
The path cannot be changed!
any other ideas.
Thanks
|
|
|
|