|
Hi
My program should prevent certain processes' IO operations, and only perform them if the user clicks Yes in a Yes/No dialog. Can this be done?
And anyway how can I check wether those processes are running?
Probably there is an API or sg for that, but I'm new to this part of programming.
Much thanks in advance
|
|
|
|
|
The real $M@ wrote: Can this be done?
Not that I'm aware of. You could try and modify the security-attributes of the file, taking away or granting the read/write rights. You'd have to know in advance what file is going to be edited.
The real $M@ wrote: And anyway how can I check wether those processes are running?
Process.GetProcesses() (Source[^])
I are troll
|
|
|
|
|
Hello,
I having one windows application to be developed in VB.Net 2005 the reports requirement is in MS word so please suggest how shall i approach for the same.
I am having my database in Ms Access 2003 in that there is memo field which has one image in it I want to load that image from database to word file.
So please suggest how shall i do it.
Thank You.
|
|
|
|
|
nazimghori wrote: I having one windows application to be developed in VB.Net 2005
Why? use 2008 and target the .net 2.5 framework if you can't use the newer ones
nazimghori wrote: the reports requirement is in MS word so please
so you just have to create word docs?
nazimghori wrote: I am having my database in Ms Access 2003
Again why? there is a free sql server version, much more stable, faster,...
Unless you really have no other choice I wouldn't go for access (there are cases where its usefull but not many)
nazimghori wrote: memo field which has one image
Memo ??? surly it should be OLE-object field.
+ Storing an image in db is very space consuming. Better would be to store the path to the image in the db and the image on the hard disk just as any normal file.
nazimghori wrote: I want to load that image from database to word file.
Amazing isn't it what google can do for you[^]
|
|
|
|
|
dear all
i would like to use euresys library in vb 2008, but i dun know how to set it? any one can tell me how to set it and use it step by step. thanks a lot.
kindly sincerely
|
|
|
|
|
This library, it doesn't come with documentation? The creators don't have a website? Perhaps with examples or support forums??
|
|
|
|
|
You're going to have to contact the makers of that library to get any information about it.
Maybe this[^] is what you're looking for...
|
|
|
|
|
Hello,
I'm hoping that someone can help with two problems I currently have with databinding.
1. I have a couple of checkboxes bound to a form and if I clear my dataset before I change my application to point to another customer, any checkboxes with a checkedstate of checked are reset to unchecked and this is saved in SQL.
2. If I do not clear my dataset before I point to another customer in my application, the correct checkbox state is saved in SQL, however, my databound controls retain customer A's data rather than refreshing with customer B's.
I am connecting to SQL using:
Public Sub SetupDataConnections(ByVal strSQLSelectString As String, ByVal myDataSet As DataSet, ByVal myDataSetName As String, _
Optional ByVal mySQLParameters As SqlParameter() = Nothing)
Try
mySQLConnection = New SqlConnection(_connectionString)
mySQLConnection.Open()
' -- Check connection state
If mySQLConnection.State = ConnectionState.Open Then
myDataAdapter = New SqlDataAdapter(New SqlCommand(strSQLSelectString, mySQLConnection))
' -- If we have some parameters, add them to our command
If Not mySQLParameters Is Nothing Then
myDataAdapter.SelectCommand.Parameters.AddRange(mySQLParameters)
End If
If Not myDataAdapter Is Nothing Then
Using myBindingSource
myDataAdapter.Fill(myDataSet, myDataSetName)
myBindingSource.DataSource = myDataSet
myBindingSource.ResetBindings(False)
End Using
Else
CatchError("You must first create a SQL connection before calling this function")
End If
End If
Catch ex As Exception
CatchError(ex)
End Try
End Sub
Following this Sub, I proceed through:
Public Function SetupBindings(ByVal myDataSet As DataSet, ByVal myDataSetName As String, ByVal myForm As Control) As Dictionary(Of String, Date)
myBindingSource.DataSource = myDataSet
For Each myControl As Control In myForm.Controls
Try
myControl.DataBindings.Clear()
If (TypeOf myControl Is TextBox OrElse TypeOf myControl Is ComboBox) AndAlso Not (myControl.Tag Is "" Or myControl.Tag Is Nothing) Then
myControl.DataBindings.Add("Text", myDataSet.Tables(myDataSetName), myDataSet.Tables(myDataSetName).Columns(GetColumnNameFromControlTag _
(myControl.Tag.ToString)).ToString, True, DataSourceUpdateMode.OnPropertyChanged)
'-- Bind data to associated textbox control
ElseIf (TypeOf myControl Is DateTimePicker OrElse TypeOf myControl Is DateTimeControl) AndAlso Not (myControl.Tag Is "" Or myControl.Tag Is Nothing) Then
'-- ... CONTINUE FOR EACH TYPE OF CONTROL BOUND TO THE FORM ...
ElseIf myControl.HasChildren Then ' -- Recurse back in to function if there are children
SetupBindings(myDataSet, myDataSetName, myControl)
End If
Catch ex As Exception
CatchError(ex)
End Try
Next
End Function
And those two subs set up my data binding. Each control's tag contains the DATABASE.COLUMN mapping.
I would greatly appreciate any assistance.
Cheers,
James
|
|
|
|
|
Hi,
I'm developing an application which uses some additional files ( like images,templates etc).
I have made folders in bin/debug/ dir so that i can access them relative to exe.
Is this a correct way?
As now i am switching to release configuration, I need to copy all these files with dlls which i refer to bin/release directory also.
What should be done ideally?
Mithun Shitole
"Free Your Mind"
http://www.technoyaari.com
|
|
|
|
|
Ideally you add an installation / setup project to your solution. Such a project will allow you to add additional files, like drivers, images, etc., and it will allow you to determine where these files will be copied to, during installation.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Thanks for this quicky,
I already have an installation project in solution. But if i add those files only in installation project, How can i access these files/folders while debugging my application?
As my code uses path of exe+path of folder to access those files, folders must be inside application folder.
Mithun Shitole
"Free Your Mind"
http://www.technoyaari.com
|
|
|
|
|
Mithun.Shitole wrote: I have made folders in bin/debug/ dir so that i can access them relative to exe.
As long as you only read these files that is acceptable.
From the moment you actually need to alter (write into)/ create these files it's not, and vista won't even allow you to (well it will but it will be in the virtual drive).
Mithun.Shitole wrote: need to copy all these files with dlls which i refer to bin/release directory also.
As suggested you can do this in the setup project.
Just go to where you add the exe ('application folder' if I'm not mistaken), add the folder with the correct name, add the files need into the folder.
Watch out that you add at least one file to each folder created otherwise the setup sometimes doesn't create the folder, don't ask my why but its something I found out the hard way
|
|
|
|
|
Make a function: openfile(path as string)
if the bin directory is in the same parent
directory as the .exe file then do this
call openfile("bin\sample.jpg")
similarly call other files.
TheMrProgrammer
TheCalcMan: A no-mouse required Calculator supporting constant operator and visual effects
Try it once, its awesome!
Just 17.1 KB download.
No installation required. No dlls. Just unrar and go. And its a freeware.
http://www.hotlinkfiles.com/files/2642094_kjwr0/TheCalcMan.rar
|
|
|
|
|
If the files are read only you should be able to include them in your VB project and set the "Copy to output directory" option to "Copy always". That way, the files will always be copied to the bin directory automatically.
|
|
|
|
|
Hi all,
I have several Crystal Reports in my application. Of course, I have Visual Studio loaded on my machine so the reports run fine. But my client doesn't have any Crystal stuff loaded so she can't see the reports. I know it's pulling together the data because I can see the XML files that are used as a datasource being created. I'm pretty sure this is some kind of a DLL problem.
So I googled it and everything I found talked about using Crystal's Merge Modules in my installation project. Only one problem... no installation project for this application. All we do is straight build the EXE and then include all the files in the release directory in the virtual application building configuration. So now I have to figure out how to include the Crystal stuff in the virtual app. I've tried including the following DLLs as but that still doesn't allow the user to see the reports:
CrystalDecisions.CrystalReports.Engine
CrystalDecisions.Enterprise.Framework
CrystalDecisions.Enterprise.Infostore
CrystalDecisions.ReportSource
CrystalDecisions.Shared
CrystalDecisions.Windows.Forms
I don't know if I need registry tweaks or what. Anyone else encountered this? Thanks!
Denise "Hypermommy" Duggan
|
|
|
|
|
You could have them manually install the crystal reports stuff by giving them the redistributable that would otherwise have been a part of the installation project. I believe it's called: CRRedist2005_x86.msi
That said, I know it's kinda gross to learn how to make an installation program, they aren't very intuitive. But once you've learned it they are very nice and make things a lot easier for your user. They only have to click one setup.exe and they can get all prerequisits and your program. Less hassle for them. So I recommend breaking down and creating the setup project.
|
|
|
|
|
Thanks!!!
Unfortunately, installation is not an option. This program runs on a stick and has to be darn near instantly accessible to whatever machine the stick is put in.
Thanks again.
Denise "Hypermommy" Duggan
|
|
|
|
|
I don't think you'll be able to use Crystal without installation.
When you install the Crystal runtime it installs hundreds or thousands of files in different directories.
Tosch
|
|
|
|
|
as a newbie to VB.net Forms development and a student, I'd like some advice on
the following.
I want to use the tabcontrol and created tabpage then I want to close tabpage by add button Close to tab title(tabpage.text).
Thank for your reading and Hope you'll can help.
|
|
|
|
|
|
thank but I would like to do that on VB.Net not C#
|
|
|
|
|
So convert the code. There's plenty of online conversion utilities. All you have to do is Google for "vb.net c# code conversion".
|
|
|
|
|
There are plenty of convertors available on net, or you can convert it on your own. Or try your luck with Google.
|
|
|
|
|
You will benefit more if you do the C# to vb conversion yourself (with Googles help on Keywords)
I don't speak Idiot - please talk slowly and clearly
I don't know what all the fuss is about with America getting it's first black president. Zimbabwe's had one for years and he's sh*t. - Percy Drake , Shrewsbury
Driven to the arms of Heineken by the wife
|
|
|
|
|
Thank all that you help I can get it. but I need to add it by other ways Like the tab on Mozilla Firefox tab page can you give me some advice about it? one a gain thank you for all your useful answer.
|
|
|
|