|
First, if your using VB6, in your declares, you have to change the Integer references to Long . VB6 doesn't support the IntPtr type. That's VB.NET...
Declare Function ShowWindow Lib "User" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Declare Function GetWindow Lib "User" (ByVal hWnd As Long, ByVal wCmd As Long) As Long
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dear Dave,
Thank you very much for your quick response. But I am now getting new error as "File not found :User" at line of below code
OwnerhWnd = GetWindow(Me.hWnd, GW_OWNER)
Please I wanna get rid of this problem. Or else can you give any other way to make my vb application hidden from the task manger task list.
I want to make my application running in startup but I dont want that any one can stop my application while restarting computer before it started by stopping the app from the task manager.
Thanks
Mr. Murtuza Patel.
|
|
|
|
|
hi!
can anyone tell me how i can add a form to a windows service project that can make configuration changes to the windows service.
please let me know. thanks
regards
|
|
|
|
|
Well i know that this is not exactly VB.Net realted but because my idea is to use VB.Net i'm gonna post it here...
I'm gonna create a POS program for 3 branches of the company i work for... the thing is that they want to have only 1 DB on the Headquarters, and have all the computers get connected and disconnected to it to update Inventory, Sales, Etc, my question is... what will be the best approach to this?? how can i make the application to work disconnected ( in case that internet connection is lost ), there are any articles or examples or anything around the net that can help me to get some more ideas about what will be the best approach???
Thanks.
Alex.
|
|
|
|
|
There is really no one way to do it. All I can say is do a bunch of research on ADO.NET, disconnected record sets, design patterns, POS Systems, accounting practices, ...
This is all off-the-shelf standard accounting software that's been done over and over again for years. There is nothing special about your requirements that isn't standard in these applications. Just curious...But why not buy an off-the-shelf solution for your accounting? When you consider that this is going to take you 6+ months to design, write, test and implement even a simple system, wouldn't it be cheaper to pay the vendor than to pay you?
On top of that, any accounting mistakes made by your software can easily put the liability on you. Are you insured?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am running Visual Basic V6.0, and wish to take the current system time and store it in milliseconds into an 8-byte value for another system to use it. All the information I can find talks about converting into seconds, i.e. UTC, or getting the number of milliseconds since the machine was last booted up.
All I want is something that will give me the time expressed in milliseconds. I suppose I could just get the time in seconds and convert to milliseconds via * 1000, but that would not be exact.
Can anyone help me out on this one.
Thanks,
Simes
|
|
|
|
|
VB6 doesn't return the time using a milliseconds field, so you'll have to call into the Win32 API to get the time.
GetLocalTime[^] will get the system time in the local timezone.
GetSystemTime[^] will return the system time in UTC.
Both of these functions will require you to pass in a SYSTEMTIME[^] structure (ByRef) to get the time out of the function. The actual return value will tell you if the call failed or not.
The declare for both functions:
Declare Sub GetLocalTime Lib "kernel32" Alias "GetLocalTime" (lpSystemTime As SYSTEMTIME)
Declare Sub GetSystemTime Lib "kernel32" Alias "GetSystemTime" (lpSystemTime As SYSTEMTIME)
Private Type SYSTEMTIME
wYear As Integer
wMonth As Integer
wDayOfWeek As Integer
wDay As Integer
wHour As Integer
wMinute As Integer
wSecond As Integer
wMilliseconds As Integer
End Type
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
So I presume then that to get the SYSTEMTIME structure into the 8-byte data type, I will have to convert the SYSTEMTIME structure to a FILETIME structure and then convert that into the 8-byte data type that I wish to use. Is that correct?
|
|
|
|
|
That's right. Now all you have to do is make sure that the receiving system gets the bytes in the right order.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can anyone explain to me, What I need to do to create a data dictionary? The following is from the help section of Advantage. I don't know how to implement this into VB.Net code in my ASP.Net project.
Creates a data dictionary.<br />
<br />
Syntax<br />
UNSIGNED32 AdsDDCreate( UNSIGNED8 *pucDictionaryPath,<br />
UNSIGNED16 usEncrypt,<br />
UNSIGNED8 *pucDescription,<br />
ADSHANDLE *phAdminConn );<br />
<br />
Parameters<br />
pucDictonaryPath (I) Full file path of the data dictionary to create. <br />
<br />
usEncrypt (I) A non-zero value will cause the data dictionary data<br />
file to be encrypted.<br />
<br />
pucDescription (I) An optional description of the database in the data <br />
dictionary. If NULL, no database description is <br />
stored in the data dictionary. The database<br />
description can be added or changed later with <br />
AdsDDSetDatabaseProperty.<br />
<br />
phAdminConn (O) Returns a database administrative connection handle <br />
if the data dictionary is created successfully.<br />
<br />
Example:<br />
Create a data dictionary without encrypting the data dictionary data files, and then add a table to the database.<br />
<br />
AdsDDCreate( "n:\\MyData\\myData.ADD", 0, "This is the database of my tables and indexes.", &hDD );<br />
AdsDDAddTable( hDD, "Customer Information", "n:\\MyData\\customer.ADT", ADS_ADT, "customer.adi;customer2.adi",<br />
"This table contains information on all customers." )
Thanks in advance.
Beginner in VB and ASP.Net
|
|
|
|
|
hi
i am writing an application which maintains records of several clients. Each client has different settings. This is maintained in a XML file. When the user wants to update the data of a particular client changes have for that client.
this is what my XML document looks like.
<?xml version="1.0" encoding="UTF-8"?>
<config>
<client name="Cadbury">
<mcastg>222.23.342.1</mcastg>
<port>2222</port>
<path>c:\</path>
<repeat>4</repeat>
<spawn>4</spawn>
<ttl />
<profile>Custom</profile>
<custom>
<bw>1200</bw>
<dgsize>1024</dgsize>
</custom>
</client>
<client name="dabur">
<mcastg>222.23.432.23</mcastg>
<port>3333</port>
<path>d:\</path>
<repeat>5</repeat>
<spawn>5</spawn>
<ttl>4</ttl>
<profile>High</profile>
<custom>
<bw />
<dgsize />
</custom>
</client>
<client name="Vineet Inc">
<mcastg>222.23.43.4323</mcastg>
<port>5555</port>
<path>e:\</path>
<repeat>10</repeat>
<spawn>1</spawn>
<ttl>4</ttl>
<profile>Low</profile>
<custom>
<bw />
<dgsize />
</custom>
</client>
<client name="ICICI">
<mcastg>223.533.456.234</mcastg>
<port>54334</port>
<path>e:\hello</path>
<repeat>10</repeat>
<spawn>45</spawn>
<ttl>4</ttl>
<profile>Low</profile>
<custom>
<bw />
<dgsize />
</custom>
</client>
<client name="Vikram">
<mcastg>223.533.456.234</mcastg>
<port>5433</port>
<path>d:\vineet</path>
<repeat>10</repeat>
<spawn>45</spawn>
<ttl>4</ttl>
<profile>High</profile>
<custom>
<bw />
<dgsize />
</custom>
</client>
</config>
say i want to edit the settings for ICICI, how do i do from within the executing program. please give proper code.
Thanks
|
|
|
|
|
Dim ds As New DataSet
Private Sub btnGetData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetData.Click
ds = New DataSet
ds.ReadXml("c:\test.xml")
DataGrid1.DataSource = ds
End Sub
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
ds.WriteXml("c:\test.xml")
End Sub
|
|
|
|
|
thanks this worked for me
but only one thing, can i do this without the DataGrid. i know it is a bit more complicated but that would be really better
|
|
|
|
|
Hi there
I have a datagrid (with tablestyle-created from the properties window - winform) in my app that I need to format a certain way.
I need to be able to change the or highlight a row color or text if that row contains certain information. For example:
I have a grid that looks like this
ID | Item1 | Item2 | Item3 | Authors
01 | info1 |infor2 | info3 | name1
02 | info1 |infor2 | info3 | John Henry
03 | info1 |infor2 | info3 | name1
What I want to do is highlight or change the row color every where in the datagrid that the Author John Henry appears
Any help?
|
|
|
|
|
|
Try putting this in there. It's pretty flexible. The Cells index is zero based.
Private Sub MyDataGrid_ItemDataBound(ByVal sender As Object, ByVal e As DataGridItemEventArgs) Handles MyDataGrid.ItemDataBound
If e.Item.Cells(4).Text.ToString.Trim = "John Henry" Then
e.Item.Cells(4).BackColor = Color.Yellow
e.Item.Cells(4).ForeColor = Color.Blue
End If
End Sub
|
|
|
|
|
Hello,
Does anyone know how to format a particular column in Excel to an accounting style?
Here's my situation, I created a Excel accounting report in a VB.Net application, but I'm not sure how to format certain columns to the different styles for example, accounting or currency. How is this done in the VB code?
Thanks!
|
|
|
|
|
Hello Sir,
I wanna hide my vb application from the task manager. My application is in startup so when I restart the machine anybody can close it from task list before the OS is started. so it could not come on desk top any more.
Best regards
M urtuza Patel
|
|
|
|
|
Simple. You can't. Even the system processes show up in the TM...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I think no way to do that
I Believe I Can fly!~~~
|
|
|
|
|
Hello Sir,
I wanna hide my vb application from the task manager. My application is in startup so when I restart the machine anybody can close it from task list before the OS is started. so it could not come on desk top any more.
Best regards
M urtuza Patel
|
|
|
|
|
IIRC, you can't.
You could rewrite it as a Windows Service, but that still won't hide it from the Windows Task Manager, although it will appear in the Processes tab rather than the Applications tab. Also, a Windows Service can still be shut down by the user through the Task Manager (which is not recommended) or via the Services management console (in Administrative Tools-->Services).
Does this help?
To my mind it is also highly suspicious that there is a valid reason why a process absolutely must remain active and should never be shut down unless it is an integral part of the operating system.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
|
|
|
|
|
It is possible with the help of API but
with the perfect API u can hide the Apps from Task manager
but sorry i dont know the code...
But it is possible
|
|
|
|
|
I want to create a program that will intercept a file download, and compare it to a database of files i already have. I am not looking for someone to code this for me, just an idea of were to start. TIA!!!
|
|
|
|
|
What do you mean by "intercept"? If you are looking to do this inside of IE, you'll want to check out Browser Helper Objects (warning: Lots of COM Interop involved). You won't be able to see the actual download itself, but you'll be able to see the link that is clicked on and use that instead.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|