|
How can i find the Cdrom drive(e:\ or f:\ or G:\ , etc)
Is there any API function or property do this
MNG
|
|
|
|
|
Hello,
I am new to vb.net and wanted to know how to generate database for my application while i deploy it. and how the database will get created as .exe or .dll while its getting installed on clients computer. I have connected my application to sql server 2000. The small application is ready, now its time to deploy it. Please provide me the information as soon as possible.
-- modified at 12:24 Sunday 3rd September, 2006
Nikhil Bandekar
Mumbai,
India
|
|
|
|
|
Hi ,
The easyest way is copy the database file and attact it in client machine.
This example attaches two files from pubs to the current server.
EXEC sp_attach_db @dbname = N'pubs',
@filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf',
@filename2 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs_log.ldf'
Hava a nice day.
!alien!
|
|
|
|
|
hi,
how to export an excel file to an informix table using VB.Net
|
|
|
|
|
I was looking at my laptop's touchpad drivers and noticed, that it came with a program called MoodPad. This program just showed a black box that, when you touched the touchpad would change color, similar to a mood ring, on the window. I was wondering if anyone knew any of the APIs i could use to write code that could use a touchpad? I was thinking a game using the touchpad to draw symbols for spells or something...
|
|
|
|
|
I guess you would have to get into mouse gesturing, i'm afraid i don't have any experience in this feild, but a google search on mouse gesturing might help. I think gesturing means drawing shapes that respond to predefined shapes, you may be able to adapt this for your touchpad.
Posted by The ANZAC
|
|
|
|
|
Hello All!
So I am making my first attempt at .Net Remoting. I have been reading alot on it, and going through some examples. And yest, I can't seem to do what I want to do. Maybe I'm trying the wrong approach. Here what I need to do. The server application has three buttons, "Form1", "Form2", "Form3". You click button Form1, and Form1 pops up on the client application. There will be a main form always running on the client app. The same with the others, seems pretty straight forward.
I know I have to make a remotable class. But when I make something like
Public Sub OpenForm()<br />
Dim myform As New Form2<br />
myform.Show()<br />
End Sub
It gives me an error on Form2, saying it can't define it.
Am I doing this right, or is there a better way to approach this?
TIA!
Rudy
|
|
|
|
|
Are you doing this via remoting just to give it a try or do you NEED to use remoting?
The reason I ask is that this would be done a lot simpler just using two apps and some messages passed over a socket.
Either way, depending on how you are trying to do remoting, have a look at events over remoting. It might help. If you are trying to actually push a class over the wire and have it start on the client and popup windows that is going to be next to impossible.
|
|
|
|
|
Hi Ray!
I don't need to use remoting for this, I just thought it was the best way. Explain what you mean by sending message over a socket between two apps. How is a message going to display a form window?
I'm up for anything to get this to work, just so I can have it show a form when a button is click from a diffrent application.
A little background. I'm making a game. Depending on the how the dice is rolled, bring up a diffrent situation. Timing is also a factor, so when a situation comes up, that form window will pop up. But there is no way to predict which form comes up based on the roll of the dice, and the timer. Trust me on this. So I have to have somebody control what forms come up on at least 10 or more client computers. He controls all that by the server. It's on a small network. I'm hoping there is some way to do this?
Thanks for your help!
Rudy
Thanks!
|
|
|
|
|
This is really simple.
The application running on each of the client machines calls out to the server when it stats up and establishes a connection. This way the server knows about each client system. It is each of these client applications that is capable of actually displaying stuff to the screen (opening up windows) but it only does it under control of specific messages from the server.
When the server application wants to open up a specific window on the client machine it just uses the already established socket connection to send a simple message to that client (known by the IP address of the client). This can be as simple as a string like "OpenWindow:WindowName".
When the client gets this message it parses it apart, determines that the message is a command to open a window and then determines what window it should display and then shows that window.
Of course if this is a game at which people are going top win money you may want to do something over the wire like some encryption and secure identification to be sure that a client is one of your apps and not some rodent application just sneaking in on your data stream to get cash.
|
|
|
|
|
Hi Ray!
That sounds great! Forgive me for my ignorance, I have never done anything like this before. So if I understand correctly, I create a tcp socket between the two apps. Does the client call to the server automaticly or do i need to put some code there?
And then I just send a simple string to the client, based on that string, it will open a form. Right?
I guess I'm a little confused because I have never worked with client/server apps before. I understand how the string could work in the same application, but it's a little like voo doo right now with two diffrent apps.
Would you have a simple example that I could look at. I just need to take a look at how the could would look. Do I still need to build a shared class like I would in .net remoting?
Thanks for all you help with this!
Rudy
|
|
|
|
|
rudemusik wrote: I create a tcp socket between the two apps.
Right. You can also use UDP if you want but for something like this TCP is probably better.
rudemusik wrote: Does the client call to the server automatically or do i need to put some code there?
You have to code the request for connection from client to the server and then code the connection request form the client on the server also. Can't expect to have the framework do it all for you
rudemusik wrote: Do I still need to build a shared class like I would in .net remoting?
Nope, no shared classes at all. Two completely separate application projects that just talk to each other over a socket connection. Look at this setup to be like and FTP server and client. Each one can be made by different people and as long as the follow the same language (FTP commands) they can talk to each other. All any network system really is just a socket connection and commands sent over that connection. It's just that some of the connections use well known port numbers like 110, 21 or 80.
Examples of basic socket stuff:
TCP/IP with VB.NET
http://www.codeproject.com/vb/net/VbNetSendReceiveTcp.asp[^]
VB.NET TCP Client - Server Socket Communications
http://www.eggheadcafe.com/articles/20020323.asp[^]
VB Express Socket help
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=139466&SiteID=1[^]
Hope this helps.
|
|
|
|
|
Thanks Ray!!
It helps quite a bit! I appreciate your time explaining this to me. I think I should get it now.
Thanks again!!
Rudy
|
|
|
|
|
hello
i need some free component (dll activex controls and etc..)for validating input ,for user login and for scanning and printing and for user interface (in vb.net 2003)
can any body give me a refrence link
thank 's a lot
|
|
|
|
|
aspnet_22 wrote: i need some free component (dll activex controls and etc..)for
aspnet_22 wrote: validating input
Look in the ToolBox. VS comes with Validation controls.
aspnet_22 wrote: for user login
In 2005, there is a pre-written form that you can add for this. Otherwise, it's quite easy to put your own form togther. The hard part will be writing the account database and encrypting passwords properly. I don't know of any component that will do this for you.
aspnet_22 wrote: printing
Again, this stuff is already in the ToolBox. Even if you found a component to do this, you still have to supply all the printing code.
aspnet_22 wrote: user interface
Huh?? takes a second look... What?????? You want a control to generate a user interface for you??
aspnet_22 wrote: scanning
A little Google goes a long way...click[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
thanks for your reply,
i mean that i want the component that the professional programers use to create their very big project fastly.are they only use .net toolbox component and nothing else.?
|
|
|
|
|
No. For stuff like you mentioned, they write their own controls because most of the code you have to supply to get this stuff to work is custom written for each app.
Validation is very data-specific so there is no "generic" control that does it for you. You have to supply most of the code anyway to validate your own data so why would anyone try and sell a control that only supplies 15% of the code?
Same thing for user login. All that requires is a couple of TextBoxes, one of which should be backed by a SecureString. Again, you have to supply most of the code because on you know how your user database is stored and, hopefully, how you encrypted your passwords.
Printing - again, you have to supply just about all of the code because only you can possibly know how your application is going to print what it needs to. The ToolBox supplies the basic controls you need to get a consistant interface in picking a printer and supplying a print preview, but that's about it. The rest is entirely up to you.
User Interface - I have no idea what you meant by this one...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
In VB.NET 2005, INSERT, DELETE, UPDATE Staments for a TableAdapter can be generated automatically by the TableAdapter Configuration Wizard; but not for the two related tables.
I find it very hard creating these statements manually. I request the members of this forum to help me with some examples.
My question is more explained as below:
I am using the following SQL statement:
SELECT tblDrugs.DrugID AS DrugID, tblDrugs.DrugName, <br />
tblDrugs.PriceID AS PriceID, <br />
tblPrices.* <br />
FROM tblDrugs LEFT JOIN <br />
tblPrices ON tblDrugs.PriceID = tblPrices.PriceID
When my VB2005 program executes the following statement:
Me.taDrugs.Update(Me.myDataSet.tblDrugs)
The above Update method expects the relevant Update statement, which has to be provided manually in this case - because TableAdapter Configuration Wizard does not generate this statement for the SELECT with 2 related tables (joined).
What I want is the Update statement, which can satisfy the Update method of the TableAdapter - taDrugs in the above code.
|
|
|
|
|
Sir,
I want to make a program that generates the password.The program that generates password on any file or folder in the hard disk.I want to start it from the scratch.
Can i get the help .I mean from where should I start.
Please help.
Thanks.
|
|
|
|
|
This is the second time you asked this question... Try reading the reply to the first one.
I take it you want to password protect any file or folder on the hard disk.
Basically, you have to have black-belt level knowledge of NTFS and how to write device drivers and file system extensions. This is because you'll have to intercept and process every single request to open a file, system wide.
VB.NET and C# are NOT good candidates for writing something like this. But, they are good for writing the management application you'll need to set/remove these passwords.
You'll also need to come up with some way of recovering a lost/forgotten password.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am working in migrating my cr application to 10th ver from the existing 8.5 where we have to explicitly make a query in query builder and then attach it. I was using dsn in ms odbc for oracle driver to connect the DB. Now in 10.0 i have removed the query file created using 8.5 query builder and trying to write directly to command editor. the report as stand alone is working fine. but when i try to generate the pdf using my vb application then on .export option it is giving error as "Logon failed.
Details: 01S00:[Microsoft][ODBC driver for Oracle]Invalid connection string attribute". i think the problem might be with cddb_oracle.dll or crdb_oracle.dll file as i am using a evaluation version of crystal report 10. as input to dsn i am providing
1.dsn
2.usid
3.database
4.password
what else is missing . plz help.....
prashant
|
|
|
|
|
I wonder if it is possible to have a string variable that has many "child values". I mean, is it possible to declare
Dim saved(i) as String
and then save different string values to saved(1), saved(2),..., saved(n)?
I have tried this, but without success.
I have declared string and an integer
Dim i as Integer
Dim saved(i) as String
Then I have a wrote a loop that adds 1 to i and then saves a value to the string variable:
Do
i = i + 1
save(i) = StringVariableX.SubString (0,i)
Loop
The error I keep getting is: "Exception System.NullReferenceException was thrown in debuggee:
Object reference not set to an instance of an object."
|
|
|
|
|
Yes, you can create an array of strings, but no, you can not hook up the number of items in the array to a variable.
When you create the array, the number of items is decided from the value that the variable has at that moment. Changing the variable afterwards doesn't change the size of the array.
If you don't know when you create the array how many items you need, use a list instead of an array.
---
b { font-weight: normal; }
|
|
|
|
|
I don't know how many items I need to save. Do you mean I insert a listbox or is there a variable class "list"? How to use it? How to retrieve a particular value from it? How to clear the list?
Thanks in advance!
|
|
|
|