|
Hi,
Here is the situation. I have a C++ code that generate reports and send them to the default printer. Now what I would like to do is instead of sending to print I would like to generate the report as either MDI or PDF. As you know, when you try to print to MDI printer it ask you for the name and file location(the standard Windows Save As dialog box). I have hundreds of reports to be created and I dont want to enter the name for each one of them. I would like to automatically save all the reports as MDI. The idea is to create a loop and call the VB scrip within my C++ program passing the file name as parameter.
I hope this helps explan better my situation. If not, feel free to let me know.
Thanks a lot.
Flavio
|
|
|
|
|
Ahh! It's not going to work. There's no way to get rid of the Save As dialog in the print dialog because there is no way to set the filename of the printed document.
|
|
|
|
|
I want to see if it is possible to change a font color of one row of a datagrid given a certain value is in the row. Is this possible? How?
|
|
|
|
|
For the .NET 1.0 and 1.1 DataGrid, see this FAQ[^]. There's a bunch of tidbits on using the DataGrid.
Or were you talking about the DataGridView in .NET 2.0??
|
|
|
|
|
I have developed a database project using sql server2000 and vb.net.now i need to create a setup file like any other readymade software which will create a database and also the program setup file and may run in any computer which have no vb.net or sql server2000. How can i do this?
PLEASE HELP ME....................................
|
|
|
|
|
Using Visual Studio (2005, 2008, maybe 2003):
Short answer (quick):
Build > Publish <project name="">
Long answer (thorough):
Solution Explorer > My Project > Publish (it's a tab) > enter paramaters > Publish now.
If your VS is not recently updated, you will not be able to do this. You must get the newest version (I use SP1).
|
|
|
|
|
|
I am using a Component C1DateEdit. I commonUpDownButtonClick and a CommonValueChanged Handles on all of those controls. After either UpDownButtonClick or CommonValueChanged is executed it calls another routine that figures out which C1DateEdit was the sender if it was datDischargeDate then it calls sAbleDischargeReason().
Private Sub sAbleDischargeReason()
Dim bStatus As Boolean
If IsDBNull(datDischargeDate.Value) And datDischargeDate.Text = String.Empty Then
bStatus = False
Else
bStatus = True
End If
lblDischargeReasonNum.Enabled = bStatus
cboDischargeReasonNum.Enabled = bStatus
End Sub
The problem that I am having is that when it hits the if in sAbleDischargeReason() it is always true because this code is being executed before the value is in either datDischargeDate.Value or datDischargeDate.Text
I am not sure how to make this execute after the value is already there.
Any help is much appreciated.
Thank you
Humble Programmer
|
|
|
|
|
That's going to be a question for Component1's website. That's a functionality issue with their controls. ComponentOne site[^]
|
|
|
|
|
Is there not something I can do with pre or post validation. I have not used them but that seems like it could some how work.
Humble Programmer
|
|
|
|
|
Again, that's exposed entirely by the control in question. Validation could work, but how you have to do it is dictated by whoever wrote the control.
|
|
|
|
|
Thank you,
sorry if I have wasted your time.
Humble Programmer
|
|
|
|
|
It's not my time that's wasted. Most people who answer questions regularly here have never used ComponentOne controls. The base of experience on any one third-party control is going to be very low. The best source of information, and the great knowledge base, is going to be the support forums of the manufacturer of the controls.
|
|
|
|
|
I'm doing a project in VB.Net 2003 (I don't think the method and code would really change in Vb.Net 2005) and the client wants to be able to change the database location at any place on his computer. In VB.Net 2003, I'm using the data adapters with datasets, along with a connexion, but my problem is how can I connect the controls to the database and manipulate the data if the location is changed? It's all done with a few lines of code only. Should I forget this method and do it all in code, or maybe someone have a better solution for my problem?
Thanks!
|
|
|
|
|
You connect to the database using a connection string. You can change that string to look for the database in just about any location you want.
|
|
|
|
|
By changing only the connection string, the datasource of my grids will still be ok? I won't even need to change it? Well, thanks a lot!
|
|
|
|
|
|
I have a very weird problem. I'll try to be specific, but I'm just beginning VB.NET programming.
I built a SQL Server 2005 database from the ground up. Currently I'm building a front-end in VB.NET. I'm using a Janus GridEX 2 to make a hierarchy of projects, assemblies, and parts. For some reason, the projects and assemblies update fine, but the parts and "Assemblies to Assemblies" (used to make nearly infinate levels of hierarchy) tables create an error saying it can't update the Id. The Id is required to make the program work, so I can't just remove it.
The first two lines work. The last two do not.
Me.ProjectTableAdapter.Update(Me.ProjPurch2005DataSet.Project)<br />
Me.AssemblyTableAdapter.Update(Me.ProjPurch2005DataSet._Assembly)<br />
Me.Assy2AssyTableAdapter.Update(Me.ProjPurch2005DataSet.Assy2Assy)<br />
Me.PurchaseTableAdapter.Update(Me.ProjPurch2005DataSet.Purchase)
Is there a blatent reason that I'm just not seeing?
|
|
|
|
|
`Drew wrote: create an error saying it can't update the Id.
The Data and Table adapter require that the table's they are working on have primary keys. If your table doesn't have one, you can't do any updating of the tables until you put one in and update the DataAdpter or TableAdapter SQL statements to return that key field in the query results.
...or did I miss something in your post??
|
|
|
|
|
Is an IDENTITY column the same as a primary key?
|
|
|
|
|
Nope. Far from it. Read[^]
|
|
|
|
|
In my application I have a process that can take quite a bit of time to run (so I have it in it's own thread so I can display progress to the user). In the event that a 2nd process starts I need to pause the thread, then restart it once the 2nd process is complete. When I use Thread.Resume to restatt it it displays a warning
Public Sub Resume()' is obsolete: 'Thread.Resume has been deprecated.
Please use other classes in System.Threading, such as Monitor, Mutex, Event, and Semaphore, to synchronize Threads or protect resources.
What are the acceptable replacements for .Resume as I have Google'd it and cant find the answer
"It's only that urgent if you have to pee."
Dave Kreskowiak
|
|
|
|
|
Psycho-*Coder*-Extreme wrote: I need to pause the thread, then restart it once the 2nd process is complete
How did you "pause" this thread?? I hope you didn't call Abort() on it. Once a thread is stopped, that's it, you can't restart it. You have to destroy it and create another one.
Your thread should be checking for a flag set by your main thread to tell it to "pause". Once the 2nd process completes, you can reset this flag telling your first thread to resume.
|
|
|
|
|
For pausing it I use
'Put the thread to sleep for as long as I need it
Thread.Sleep(System.Threading.Timeout.Infinite)
'Set the flag
bIsPaused = True
Then to resume it I use
'Check the status of the thread
If thrdAgentStatus.ThreadState And ThreadState.Unstarted <> 0 And Not bIsPaused Then
thrdAgentStatus.Start()
Else
thrdAgentStatus.Resume()
End If
My problem is that the .Resume gives a warning that it is depreciated and I was trying to find an alternative so I can get rid of this warning.
"Okay, I give up: which is NOT a real programming language????"
Michael Bergman
|
|
|
|
|
Psycho-*Coder*-Extreme wrote: 'Put the thread to sleep for as long as I need itThread.Sleep(System.Threading.Timeout.Infinite)'Set the flagbIsPaused = True
OK. That's not going to work. The flag is never set because the thread sleeps, or Blocks, immediately. Start and Resume will not "wake up" a blocked thread. You have to call the Thread object's Interrupt method to unblock a blocked thread.
Dim oThread As System.Threading.Thread
oThread = New Thread(AddressOf Me.Fill)
oThread.Start()
oThread.Sleep(System.Threading.Timeout.Infinite)
Dim retValue As MsgBoxResult = MsgBox("Wake Thread?")
If retValue = MsgBoxResult.Yes Then
oThread.Interrupt()
End If
|
|
|
|