|
What do you mean? What is the problem, really? The autonumber property only affects how the value of the field is created, not how you read the field.
---
b { font-weight: normal; }
|
|
|
|
|
Hello there,
I am developing a windows service in vb.net. everything is going fine but one thing. My service starts as soon as computer starts(means without any user even login, which i know is normal for service). What i want to achieve is that i want to get a notification when some user login to the system, and great if i get the user logoff notification but it is not necessary. I want to monitor few programs when they are running and they only run when some user is login. So i want to get notification when some user login so that i can start my monitoring of those programs. Some example code is more then welcome!!
Qaiser.
|
|
|
|
|
One thing you might consider, since it sounds like your not concerned about it running if nobody is logged on, is change the account that the service runs under. So instead of having it run under the local system account, have it run in a user account.
If that is not an option because you want to continue monitoring certain events even if nobody is logged on, then (I dont know of any Loggedon or off events) I would start a new thread and start an infinite loop to check what user is logged on. When you get a different name or you dont get a valid name then raise an event.
-Jason
|
|
|
|
|
Hi,
I have made a website using vb.net (visual studio .net 2003) with a MySQL database. I have built, setup and run the web application in my college as a project. Now I want to deploy the web site on the internet. What are the basic steps I need to know to do so. I have tried to copy all the files from the FTP i am using currently to the FTP server of the hosting company but the website doesnt work on the hosting company's server. It is working absolutely fine on my college server. I have also changed the connection string for the MySQL database connection. What am I missing out... what steps need to be taken in order to get my web site up and running on the hosting company's server? Please help... I am in urgent need. Thanks a lot.
Karan
|
|
|
|
|
We're not the best people to ask about that since each hosting company supports different things.
Your best place is to ask the support staff of the hosting company. This my be a stupid thing to ask, but do they support MySQL?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi there, the hosting supports MySQL and ASP.Net. They do not provide with the setup of the website. I have already transferred my files and code on thier FTP server. Everytime I run the website from the internet, I get a Runtime Error.
I am a student and I am deploying a website for the first time. There must be some modifications that need to be done before I try to run an application on another hosting server/company.
Please help if possible. I will really appreciate any help.
Karan
|
|
|
|
|
Like I said, the best source of help is the hosting company itself. After all, you're paying them aren't you?
You have to determine what the host requires as far as configuration, .NET Framework requirements, and directory structure. We can't possibly tell you that.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for your help Dave. I'll probably get hold of the hosting company and extract as much help as they can provide me. Thanks again.
|
|
|
|
|
Hi
I want to create a desktop (using CreatDesktop API) and then give the user the ability to move some of the running programs in the Default desktop to that newly created desktop.
I can do it by a CreatProcess to run new files in the created desktop. but how can I move the previously running processes to tthe new desktop?
(I am writing my program in VB6 and I still have not found any way to enumerate the handles of processes in vb6 also.)
Thanks.
|
|
|
|
|
If I read the API docs correctly, you can't move a process to another desktop once it's been created and has made a USER32 or GDI function call. The desktop to use must be specified in the Startup parameters structure before CreateProcess is called to start the app.
Only the process itself can change its desktop using SetThreadDesktop.
You can read more about Window Stations and Desktops here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 10:44 Sunday 22nd January, 2006
|
|
|
|
|
Thanks for the answer.
Yet an other method comes to my mind:
What if a dll is injected into the process? Is that possible then to use the SetThreadDesktop to change the dekstop of the process?
(I don't know much about dll injection, and I would be glad if someone could introduce me some point to start...)
Thanks
|
|
|
|
|
In VB6 code?! Yikes! You're looking at a very rough time doing this.
The problem with Injection is that your code is injected into the Process. You're still not running on the proper thread to call the function. There's just no way to do it that's using any documented methods.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
how i chang culture in control panel in runtime in my program
I WANT chang clender type and short date format
22222222222
-- modified at 8:38 Sunday 22nd January, 2006
|
|
|
|
|
Unless your writing a utility to specifically do this and nothign else, you have no business doin this.
Remember, your app is running on a SHARED system. That means your app has to work and play nice with other applications. Changing system-wide settings to overcome deficiencies in your code is just extremely bad practice.
There is no reason to change the culture or short date format in the system. Your code can do anything required by this change itself, if written correctly.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello everyone,
My problem is regarding the conversion of tiff JPEG compression image to LZW. Infact, i know that how can i convert the compressions of tiff image. But the JPEG compression tiff image is the only one which doesn't load in the system.drawing.image class.
Can anyone help me that how can i convert the tiff JPEG compression image to other compression.
Waiting...
|
|
|
|
|
Hi Guys,
If we have a password for the windows (for example), when we try to write the pass, if we had the Caps-Lock Button active, we see a message in a yellow "box", to inform as for this active button, which can make problems in our password!
In one of my programs, I ask somewhere for a password..so I want to show this message to the user,
if his keyboard has the Caps Button active...
I must use tooltip?
Please, give me a solution (with some lines of code if its possible and necessary)
Thanx in advance...
|
|
|
|
|
Why does everyone come around wanting pre-written code all the time?
A simple Google search for "vb.net capslock" comes up with an example here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Sorry, but I am beginner...and I dont understand this exaple and its use..Can you help me more?
|
|
|
|
|
All the examples are going to be just like this. They all have to make calls directly in the Win32 API to get the current status of the lock keys, CapsLock, NumLock, and ScrollLock.
Your best understanding is going to be putting your code together and calling one of the functions, such as GetLockStatus, and step through the code in the debugger.
In the posted example, all you need to worry about calling is GetLockStatus.
Dim status As Boolean
status = GetLockStatus(ToggleKey.CapsLock)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanx Dave Kreskowiak..now I understand! Before, I have problems with the returning value of function (I didnt understand that its boolean) and the way of calling!
And I use google as good as I can..I try.. Thanks again..
|
|
|
|
|
I want the VB.net code for capture of an image taken by a web camera.
-Shonan Vora
|
|
|
|
|
If you're just going to post a demand for code, a Google[^] search for "capture webcam image vb.net" is your next stop.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 10:28 Sunday 22nd January, 2006
|
|
|
|
|
Hi ,
I am sending "MyReport" direct to printer using .NET 2003
//////////////////////////////////////
Dim crobj as New rptMyReport
crobj.PrintToPrinter(1, False, 0, 0)
////////////////////////////////////////////
I need to get the total page count in this case.
I need immediate response.
Thanks
Madni Abbasi
|
|
|
|
|
I have a user control which includes a Datagrid that needs one column for each hour of the day for five categories... so my datagrid would have 5 rows and 25 columns. The 1st column is the category name and is no problem. Columns 2-25 store the hourly figures and what I want to do is use a custom DataGridColumnStyle on these but when I try to cast the DataGridTaleStyles.GridColumnStyles for each of these columns to my custom DataGridColumnStyle it gives me an invalid cast error.
Since that's probably as clear as mud here's the code I have:
Public Class vbsDataGridTextBoxColumn
Inherits System.Windows.Forms.DataGridTextBoxColumn
Public Sub New()
'This is just to get it working - we'll set more properties later.
Me.Alignment = HorizontalAlignment.Right
Me.TextBox.MaxLength = 6
Me.Width = 50
End Sub
End Class
That's the custom Column Style (we'll set more properties later)... and here is the method that runs in the user control to change column types on the fly as the DataGrid is populated. (We need to do this as the DataGrid can switch from being editable or not depending on which day's data is being edited) I've commented the line in red that throws the exception.
Private Sub vbsDataGrid_DataSourceChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles vbsDataGrid.DataSourceChanged
Dim i As Int32 = 0
Dim cm As CurrencyManager = Me.BindingContext(Me.vbsDataGrid.DataSource)
Dim ts As New DataGridTableStyle
ts.MappingName = DirectCast(cm.List, DataView).Table.TableName
'Make the dataGrid use our new tablestyle and bind it to our table
Me.vbsDataGrid.TableStyles.Clear()
Me.vbsDataGrid.TableStyles.Add(ts)
'Now create a ColumnStyle for each of the hourly figure columns (1-24) in the datagrid using our custom class. Note the first column (0) doesn't need a custom style.
Dim tbc As New vbsDataGridTextBoxColumn
For i = 1 To 24
'***THIS IS WHERE I GET AN INVALID CAST ERROR***
tbc = CType(ts.GridColumnStyles(i), vbsDataGridTextBoxColumn)
tbc.HeaderText = "Hour " & i.ToString()
Next
End If
End Sub
Anyone know why this would happen? If I create 'tbc' as a normal DataGridTextBoxColumn the cast has no problem - it's only when I use my custom DataGridTextBoxColumn class I get the error.
Hope someone can help - I'm darned if I know what's going on!
Mike
|
|
|
|
|
I think you're looking for something more like:
For i = 1 to 24
ts.GridColumnStyles(i).HeaderText = String.Format("Hour {0}", i)
Next
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|