|
Private Sub box_Keypress(KeyAscii As Integer)
'if you enter ALT+0176
'then KeyAscii = 176 normaly, but on some WinXP machines
'KeyAscii = -23583 (because character not in range [0,127]).
'Also note that if you try to convert this value to a character,
'you'll get a range error (of course).
End Sub
Does anyone know why we receive an invalid character code on some WinXP machines and not on others?
Why are only characters in the range [0,127] being properly passed to Keypress?
Signed: John R. Shaw
|
|
|
|
|
|
Note: UNICODE uses same extended character codes as windows extended codes.
The problem only happens in VB code.
I think the problem only occurs on WinXP, if more than one language is installed.
On Win2000; if you select Chinese (Taiwan):
ALT+0176 translated to 162 = '¢'.
ALT+0177 translated to 161 = 'í'.
ALT+0178 translated to 50 = '2'.
|
|
|
|
|
Well if u say that MSN messenger is a service then how was it made when .NET was not introduced.How did the developers made it a service without .NET platform.
|
|
|
|
|
Services pre-date .Net by years. Look at the article here: http://www.vbrad.com/pf.asp?p=source/tip_service_vb.htm
It should have the answers your looking for.
Joe.
|
|
|
|
|
Ever here of Visual C++? It can generate ANY type of application for Windows. Including Windows itself! Think about it -- How long has Windows been around? Services, as we know them today, have been around since Windows NT 3.1, LONG before the .NET Framework came around...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am trying to delete a whole table using vb.net oledbadapter, not individual records within the table. Does anyone have an example snipet of code to give me a clue. I can access the table and all the records, I just can't seem to pull off deleting the table.
Thanks.
|
|
|
|
|
This is one of my favourite SQL commands.
TRUNCATE TABLE <table-name>
All your data disappears, but the table with all indexes and integrity constraints, is still there waiting for some inserts. Be aware however that the command requires administrative type priveleges and is not transactional. ie. you can't rollback if you want the data back. Use with caution.
Chris Meech
I am Canadian. [heard in a local bar]
Gently arching his fishing rod back he moves the tip forward in a gentle arch releasing the line.... kersplunk [Doug Goulden]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
Dim DS As New DataSet
Dim query as string = "SELECT * from DAP"
Dim OLEConn = New OleDb.OleDbConnection("connection string goes here")
Dim adapter As New OleDb.OleDbDataAdapter
adapter.SelectCommand = New OleDb.OleDbCommand(query, OLEConn)
adapter.Fill(DS)
THIS IS THE POINT OF TROUBLE...
???? DS.Tables().Clear() ???? 'not this
???? DS.Tables().Remove() ???? 'not this
I want to delete the table "DAP" and I know the code above is not the correct way to just connect to a database, select a table, then delete the table. Does anyone have a snipet of code that 1. connect to a db. 2. selects a table. 3. deletes the selected table?
Thanks.
|
|
|
|
|
HRusaw wrote:
Dim DS As New DataSet
Dim query as string = "SELECT * from DAP"
Dim OLEConn = New OleDb.OleDbConnection("connection string goes here")
Dim adapter As New OleDb.OleDbDataAdapter
adapter.SelectCommand = New OleDb.OleDbCommand(query, OLEConn)
adapter.Fill(DS)
Dim query as string = "TRUNCATE TABLE DAP"<br />
'or if you need to log the action - but truncate will be faster<br />
'Dim query as String = "DELETE FROM DAP"<br />
Dim OLEConn = New OleDb.OleDbConnection("connection string goes here")<br />
dim cmd as OleDbCommand = New OleDb.OleDbCommand(query, OLEConn) <br />
cmd.ExecuteNonQuery
|
|
|
|
|
Scott and Sumit21,
Thank you for your help. The snippet's you two submitted helped a lot and were exactly what I was looking for.
Thanks Again,
Helen
|
|
|
|
|
in SQL (structured query language) there is a command that deletes the whole table: DROP Table (tablename) - I'm not sure the exact syntax of the VB.NET version of that command, but that should give you a place to start. Also you might check out the MSN group at http://groups.msn.com/VisualBasic/ (go to "Message Board" in the left frame and they have "Databases" and "VB.NET" message boards). You have to get a (free) msn passport in order to join the group, and then get approved by a manager or assistant manager (I am an assistant manager, so once you get the Passport, e-mail me @ rhenerlau@hotmail.com and I will approve you.)
Hope this helps!
Richard Henerlau
|
|
|
|
|
use oledbcommand
//con is oledbconnection
dim com as oledbcommand=new oledbcommand("drop table tablename",con)
con.open
com.executenonquery();
con.close
hope this will work
|
|
|
|
|
Scott and Sumit21,
Thank you for your help. The snippet's you two submitted helped a lot and were exactly what I was looking for.
Thanks Again,
Helen
|
|
|
|
|
Scott and Sumit21,
Thank you for your help. The snippet's you two submitted helped a lot and were exactly what I was looking for.
Thanks Again,
Helen
|
|
|
|
|
Hi,
I'm inheriting a base form we have written that mostly handles button arrangements. Every time I disable/enable the derived form it gets moved behind any other windows that are currently open. There is no code in either form that should be causing this behavior. We are not overriding or altering the enabled code in the base form in any way. Has anyone else encountered this problem or know how to fix it?
Thanks,
Joe
|
|
|
|
|
i want to know how to start application just like the msn or yahoo msngr which start whenever the computer starts.
second i want to know where r they placed in the windows xp. if i want to do that through code of vb6 what i have to do.
|
|
|
|
|
They are service applications, which VB6 cannot create. There is a seperate application that communicates with the service app that handles the user interface when someone logs in.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hold on there Gnome boy, you CAN run VB6 apps as services. If you Google "VB6 Services" you'll find tons of examples of this. Such as....... http://www.vbrad.com/pf.asp?p=source/tip_service_vb.htm
Joe
|
|
|
|
|
Hold it there, wiseass. Read the post again and the history of his other posts concerning the very same topic. The link you just gave me, I originally posted as my first or second reply to him!
Now, I said that VB6 could not generate a windows service. This is exactly right! I know perfectly well that you can take a VB app and run it AS a service within a service WRAPPER, but you can't generate a TRUE service app with it. The VB6 compiler will not output the correct service entry point...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
how to make a process a service in VB.
i am seeking help in VB to make my application's exe run without being tirggered just like worms.
The payload of my application is Just MessageBox stating "Welcome From Usman".So there are two main issues ,
1)How to execute exe without tirggering it
2)Where to place and how so that every time windows starts(not user logs in) , it executes it self and show the message box.
I hope that you will help me.
Regards
UsmanMir
|
|
|
|
|
so...you're gonna make a virus...
TERRORIST
Never say never
I think i can help you with the first requisite the second one i only know how to do it manually (put the shortcut in the Startup folder... :P)
use the Process class and its Start method:
Dim myProcess As New Process<br />
myProcess.Start("myApp.exe")<br />
(...)
|
|
|
|
|
A windows service has to be installed. VB6 doesn't come with anything to do that. There are, however, 3rd party utilities that do. I already posted a link for you to follow that contains instructions on how to do it.
Next, you have a huge problem that you can't resolve. Since your application is running as a service, it runs under a completely different desktop than the one the user sees. This mean, that unless your service is tagged "Allow interaction with desktop...", the messagebox you put up will never be seen by the user.
Now, having solved that little problem, you have a second problem. You said you want to put up a dialog box while no user is logged in. Not going to happen. Since there is no desktop when a user isn't logged in, there's no way to put up a visible message box.
On top of that, your VB6 app is not a true service. This means that you don't get the notification messages that the user session is being terminated or started, so you can't tell when someone logs on or off.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to select and rename the column name to PROD_ID( to product) and QTY( to total) in vb form and show resulting table in vb form
SALE_ID PROD_ID QTY
1 Tomatoes 30
|
|
|
|
|
I have created a cpp program. I want to run its exe from visual basic.I want to pass some parameters to the main function of cpp program through visual basic program variables.Can anybody tell me how to do it?
Thank u.
SHYAMALA LOKRE
SAMRAT ASHOK TECHNOLOGICAL INSTITUTE ,
VIDISHA.
|
|
|
|