|
Salman Sheikh wrote: http://www.codeproject.com/cs/miscctrl/winwordcontrol.asp
Go to that article and ask the author for help. There is a message board at the bottom.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Use VB2005
I have "Class1.vb" and "Form1.vb", "class1.vb" contain in my Text and want to show in "Form1.vb" ,How to implement it?
thank you
|
|
|
|
|
your question seems to be unclear .. please ask clearly what you want to do
Salman Sheikh
|
|
|
|
|
Sorry, I contain text in class1. and how to get text form class1? now i working in Form1
|
|
|
|
|
if u mean u want the text in the label to appear on the form caption, then you say
form1.text = label1.text
if u want the file under the solution explorer called form1.vb to be called class1.vb then make sure u change the one thats called class1.vb currently to something else then click form1.vb and rename it to class1.vb
otherwise if thats not wat you want to do then u need to re-phrase your question and make it a bit clearer, its a bit confusing
|
|
|
|
|
First of all, give your classes meaningful names. Then, it depends. Is code being called in the class, which needs to send text to the form ? Use a delegate in this situation, the odds are that the class does not contain an instance of the form. If the form is being called and needs to pull the text, then myTextBox.Text = myClassInstance.TheText will do it, where TheText is a property you define. You could also return it from a method, if this is appropriate.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi guys,
I am writing a system that should connect to varied database systems (currently MS SQL 2000, 2005 and MySQL). I decided to use Oledb.net provider for my connections. For the different versions of MSSQL it works fine but I am having a problem trying to run commands on MySQL connection. I got the following connection string from the net
Dim myCommand As New OleDbConnection("Provider=MySqlProv.3.0;Data Source=th911;User Id=root;password=root")
From my analysis of the connection string there is no database name (Initial Catalog). How then does MySQL know the database i am interested in or how can i make it known without having to enter the credentials every time i open the connection?
Thanks for your assistance guys.
-Mbire-
I can resist everything else except temptation...
-- modified at 8:24 Monday 10th September, 2007
|
|
|
|
|
Mbire wrote: How then does MySQL know the database i am interested in or how can i make it known without having to enter the credentials every time i open the connection?
You will need to specify the database name. http://www.connectionstrings.com[^] has many different database connection strings that you might find helpful.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
What is there to elaborate? The value of the townId is in the ComboBox's SelectedValue property. That's the value that you update the Person's record with.
Where's the problem?
|
|
|
|
|
Helo dear!
I want to install two projects and two third party softwares with one setup programme. want to start one project wait to complete then start another but fails. please help me.
I will be grateful
Julian
|
|
|
|
|
I have an mdb file that has vb code in my PC. I want other users to use it from their PCs'. But a copy the file should not work on their PCs'. I can not check it with any hardware ids' because each instance would run diffent h/w ids in different PCs'. What else is left for me as options?
|
|
|
|
|
you can split you're mdb file into a front-end and a back-end
front-end would have linked tables and forms and everything else
back-end would have only tables
an other option is terminal server (if you have the funds for it) but then you have the problem of locking and still need the front-end and back-end solution
an other option is just put a shortcut to the mdb on the netwerk on every pc but once again problem with locking can occure here
as to restricting the users from copying the file that's probably going to require permisions settings on the OS (not shure about it since I haven't tryed it)
hope this helps
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
Thank you TD. I want the file residing only in on machine and I have it ready. Now I want it to be accessible from any PC in the n/w. But that file should be coded in such a way that it will work only in my PC. A copy of the file should not work in any other PC. But others could access my copy over the n/w. While a person access it remotely the new instance should generate an ID specific to my PC. But Hardware IDs' are generated on the PC's h/w that access it so i can not use those.
If I could detect all the pc's in the n/w by hostname or IP that also would help. So that I can track whether the access is through n/w or is it a direct access.
Thank you once again.
|
|
|
|
|
tonymathewt wrote: If I could detect all the pc's in the n/w by hostname or IP that also would help
I wouldn't exactly know how to do what you want but I can give you the .net code to detect all pc's in the n/w (at least by tommorow I can normally get it) but I don't think it wil work in access
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
How to retreive the Application path. For eg. d:\MyApp\ is the main dir. which contains sub dirs like Templates, bin etc.
<br />
My.Application.Info.DirectoryPath Gives me d:\MyApp\bin\Debug
I want is just d:\MyApp. I don't want to hard code it as user may have different path. Any idea, how to retreive it.
Thanks
Terry
|
|
|
|
|
My.Application.Info.DirectoryPath gives you the path of the application folder. When you are running the code from Visual Studio, you get a path like "d:\MyApp\bin\Debug". This is the application path, and if you try to get outside this folder, it won't work when you deploy the application.
If you have files in your project that you want in the application folder, show the properties for the file, and change the "Copy To Output Directory" property from "Do not copy" to "Copy if newer".
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks Guffa,
I want to access MyApp\Templates dir while run time. It contains files in it. The TEmplates folder is not added into the project.
So how do i end up retreving it in the app. at run time. Is ther any other way to get path of MyApp? Should I copy the Templates folder into the Debug folder? Can you please give me a direction to achieve the goal. I am using VS 2005.
Thanks
Trupti
Thanks
Terry
|
|
|
|
|
Trupti Mehta wrote: I want to access MyApp\Templates dir while run time.
No, you don't. That path will not exist if you deploy the application without including the files in the application folder.
Trupti Mehta wrote: The TEmplates folder is not added into the project.
That is the problem. Follow my instructions in my previous post.
Trupti Mehta wrote: Should I copy the Templates folder into the Debug folder?
That's done automatically when you mark the files to be included in the application.
Trupti Mehta wrote: Can you please give me a direction to achieve the goal.
I already did. If there is something that you don't understand about it, you have to say so.
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks. I got the solution.
My.Computer.FileSystem.GetParentPath(My.Computer.FileSystem.GetParentPath(My.Application.Info.DirectoryPath())) + "\Templates\"
This takes me to MyApp, & then I set to Templates dir.
Thanks
Terry
|
|
|
|
|
Trupti Mehta wrote: Thanks. I got the solution.
No, you didn't. You missed the entire point of my previous post.
If you go outside the application folder, as you just did, the code will not work when you deploy it.
Change the properties for the files that you want included in the application, just as I explained in my previous post.
---
single minded; short sighted; long gone;
|
|
|
|
|
Oh Thanks, Guffa.
As you mentioned, I added the Templates folder in the Project - "Inclided in the Project". But on Properties on the Tempaltes Folder, I can't find anything like Copy.... Their is just Folder name proeprty. The Files in it has such property. If I update those properties for all files in the Template dir., then when user adds new files (Programmatically), how can the property be set for that newly created file by the user.
Thanks
Terry
|
|
|
|
|
Trupti Mehta wrote: then when user adds new files (Programmatically), how can the property be set for that newly created file by the user
Do you recompile the application whenever a user adds files to the folder?
---
single minded; short sighted; long gone;
|
|
|
|
|
No. I was just saying that for the folder "Templates", their is only Folder Name property. I have included in the package, now how do i access it.
While Deploying, I created a Setup package, I have added "Templates" folder in the "Application...". I tried adding the Templates folder itself, but wasn't able to add it. So did this way. Did i do rgt or no! If no, can you tell what to do.
Thanks
Terry
|
|
|
|
|
Hi all
I have created crystal reports in vb.net using SQLEXPRESS database. I have now converted the SQLEXPRESS database to a normal SQL SERver database. This new database has all the same tables and table names but the database name is different (Cannot be changed). I have changed the database source for the reports via Datbase expert but when running the report it still gives the error that it cannot find the datasource and references the old database name.
Can anyone please tell me how to fix this error or where to change the reference to the old database?
Dazz
|
|
|
|
|
Where is the data source/connection string being stored?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|