|
This is such an amazing question - how would a software SDK get a TV signal unless you have the hardware to recieve/decode it ?
The answer is no, you need a TV card to recieve a TV signal.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
Im trying to get computer information of all PC's on a domain.
I got the following code from Microsoft:
Dim TheDomain As IADsDomain
Dim Computer As IADsComputer
Dim strDomain As String
Dim iMousePointer As Integer
'Accept the Domain name
strDomain = InputBox("Domain Name: ")
'Use the WinNT Directory Services
strDomain = "WinNT://" & strDomain
'Create the Domain object
Set TheDomain = GetObject(strDomain)
'Search for Computers in the Domain
TheDomain.Filter = Array("Computer")
For Each Computer In TheDomain
List1.AddItem Computer.Name
Next Computer
My problem is that this is VB6 code and I need a working dotNet equivalent.
All works fine up untill the Array("Computer") function, VB .NET doesn't support this function.
Can anyone help me with an alternative way to build this collection so that I can use is in the "For Each" loop?
I'm guessing Active Directories will be the answer but I cant seem to get it right.
Thanx!
|
|
|
|
|
I got it right afterall.
I wrote the code in VB6 and built it as a DLL.
Then referenced the DLL in VB .Net, works like a bomb!
|
|
|
|
|
hi,
i have to set timer in my windows application.
if date of set_timer column in database is equal to system date time then a beep should be generated.
i am unable to write exect code for retrieving that perticular date where set_timer= system.datetime.now()
i had write sql query in adapter, all were failed to get data from data set.
select * from case_details where (set_timer= dt)
select * from case_details where (set_timer= 'dt')
select * from case_details where (set_timer= '&dt&')
where dt was declared as
dim dt as system.datetime
dt= datetime.now()
i had also use convert function
as
select * from case_details where (set_timer= CONVERT(DATETIME,dt,102))
it is also not woking plz help me.
hi this ajay bharti
|
|
|
|
|
A datetime runs right down to the millisecond. You need to make your query so that it has less granularity, by either stripping info from all datetimes you store ( for example, set all milliseconds to zero ), or by using a range in your query.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have a class library written in C#. I have use it using "Add Reference" in a VB.NET windows application. Is there any way to lock the class library(dll) in such a way that no further "Add Reference" is possible ? Basically I want to prevent the reusability of the dll file for any other application except the VB.NET application, I told above. Is there any way to do such things?
Thank you in advance.
Anindya Chatterjee
|
|
|
|
|
Well, if you created a DLL meanted to be incorporated somewhere else ... there's no way to lock it. Different if you have a class inside your assembly, than you can use the private/friend/protected/public clause to set visibility/usability.
If you're concerned about blocking third party uses ... well then a way of doing it is to put a "secret code" in the constructor that work as an enabler. Than only who knows that code (you) can "activate" the class.
Briga
|
|
|
|
|
how to print the form in vb.net as well as to print the site
in asp.net i need some sample code for it
himanshu
|
|
|
|
|
Tons of sample, just search here / MSDN / or even google.
|
|
|
|
|
Dim bmpBitMap As New Bitmap(Me.Width, Me.Height)<br />
Dim gGraphics As Graphics = Graphics.FromImage(bmpBitMap)<br />
Dim sSize As New System.Drawing.Size<br />
sSize.Width = Me.Width<br />
sSize.Height = Me.Height<br />
gGraphics.CopyFromScreen(Me.Location.X, Me.Location.Y, 0, 0, sSize) <br />
<br />
e.Graphics.DrawImage(bmpBitMap, New Point(10, 10))
|
|
|
|
|
Hi,
I can actually create an RTF file correctly formatted (more or less...) with vb.net (winforms), but I'd like to put into the doc some equations like the equation editor's ones, is there a way to do it?
I'm not using word libraries, just coding the rtf file.
does anybody have any advice?
thanks in advance,
cheers!
Fuel2Run
|
|
|
|
|
Hi,
i'm making an application in vb.net which is similar to enterprise manager of sql server 2000.in enterprise manager there is facility to generate script of created table.the same thing i want to do in my application.i want to dynamically generate the script of the tables created the name of the tables and its column names are stored in database.i need a vb.net code to generate the script dynamically by taking the information of the tables from the database.
Thanks in advance.
Please help me out!!!!!!!
Anya
|
|
|
|
|
hi there,
below is my idea on this:
1. You have to get the info about the table (table's name, columns and datatype of each column,...). Then generate script that would be something "create table..."
2. Read all records from table and generate a script "insert into..." for each record
<< >>
|
|
|
|
|
I want to transform the array from Code to Crystal Report . Code:
CrystalReport1 cr = new CrystalReport1();
string[] ar1 = {"HUNG","DUNG"};
string[] ar2 = {"1","2"};
cr.SetParameterValue("col1",ar1);
cr.SetParameterValue("col2",ar2);
this.crystalReportViewer1.ReportSource = cr;
crystalReportViewer1.Show();
//Run OK but just one row appear!!
??????????????
How can I do that??
Hung
|
|
|
|
|
do anyone knows how to use OpenGL with VB.net Running on WinXP ?
Marvin N. Guerrero
- Magbigay Makihati Makiisa
|
|
|
|
|
http://nehe.gamedev.net/[^] is the best GL site. They have C# versions, I assume a VB.NET port would be easy enough.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Another dimension it is!
Thanks a lot.
Marvin N. Guerrero
- Taje Kage_bunshinNunJutsU
|
|
|
|
|
Hi dear all,
In an attempt to tweak Microsoft word, I would need to choose programmatically a certificate (with filters on the signer.name, Certificate.issuer and certificate.expiration.date) from the dialogbox selectcert which pops up when adding this code within a vba routine :
dim sig as signature
set sig = activedocument.signatures.add
I have seen some infos in selectcert structure at msdn but cannot figure out how to achieve the proper hook. (ideally as well I could bring the proper timestamp to digitally sign (which actually is the local time by default ) If any of you knows how to achieve it (Code snippet is a must) you are very welcome.
MSDN Home > MSDN Library > Win32 and COM Development > Security > Cryptography > Cryptography Reference > Cryptography Structures
Platform SDK: Cryptography
CERT_SELECT_STRUCT
The CERT_SELECT_STRUCT structure contains criteria upon which to select certificates that are presented in a certificate selection dialog box. This structure is used in the CertSelectCertificate function.
typedef struct tagCSS { DWORD dwSize; HWND hwndParent; HINSTANCE hInstance; LPCTSTR pTemplateName; DWORD dwFlags; LPCTSTR szTitle; DWORD cCertStore; HCERTSTORE* arrayCertStore; LPCSTR szPurposeOid; DWORD cCertContext; PCCERT_CONTEXT* arrayCertContext; DWORD lCustData; PFNCMHOOKPROC pfnHook; PFNCMFILTERPROC pfnFilter; LPCTSTR szHelpFileName; DWORD dwHelpId; HCRYPTPROV hprov;
} CERT_SELECT_STRUCT, *PCERT_SELECT_STRUCT;
Members
dwSize
The size of this structure in bytes.
hwndParent
The handle to the parent window of any dialog boxes that CertSelectCertificate generates.
hInstance
The handle to the module whose executable file contains the dialog box template.
pTemplateName
If the CSS_ENABLETEMPLATE flag is set in the dwFlags member, set pTemplateName to a pointer to a global memory object that contains the template that DialogBoxIndirectParam uses to create the dialog box. A dialog box template consists of a header that describes the dialog box. The header is followed by one or more additional blocks of data that describe each of the controls in the dialog box. The template can use either the standard format or the extended format.
If the CSS_ENABLETEMPLATEHANDLE flag is set in dwFlags, pTemplateName specifies the dialog box template. pTemplateName is either the pointer to a null-terminated character string that specifies the name of the dialog box template or an integer value that specifies the resource identifier of the dialog box template. If the specifies a resource identifier, its high-order word must be zero and its low-order word must contain the identifier. One way to create this integer value is to use the MAKEINTRESOURCE macro.
dwFlags
This member can be one or more of the following values.Value Meaning
CSS_HIDE_PROPERTIES Hide the Properties button.
CSS_ENABLEHOOK Pass a hook procedure in pfnHook.
CSS_ALLOWMULTISELECT Enable multi-selection of certificates.
CSS_SHOW_HELP Show the Help button.
CSS_ENABLETEMPLATE Cause CertSelectCertificate function to call the DialogBoxIndirectParam function to create a dialog box. For more information, see pTemplateName.
CSS_ENABLETEMPLATEHANDLE Cause the CertSelectCertificate function to call the DialogBoxParam function to create a dialog box. For more information, see pTemplateName.
szTitle
A pointer to a string that contains the text for the title of the dialog box.
cCertStore
The number of certificate store handles in arrayCertStore.
arrayCertStore
A pointer to the array of certificate stores that the dialog box enumerates and displays.
szPurposeOid
A pointer to a string representation of an object identifier (OID) for an enhanced key usage (EKU). If an OID is provided, only certificates that include this EKU will be displayed.
cCertContext
The number of certificates in the arrayCertContext member.
arrayCertContext
A pointer to an array of CERT_CONTEXT structures. The certificates represented by these structures are selected when the dialog box displayed by the CertSelectCertificate function initially appears.
lCustData
A pointer to an array of byte values that hold custom data that is passed through to the filter procedure referenced by pfnFilter. This custom data is not used by the CertSelectCertificate function.
pfnHook
A PFNCMHOOKPROC function pointer to the Hook callback function. This function is called before messages are processed by the dialog box. For more information, see Hooks.
pfnFilter
A PFNCMFILTERPROC function pointer to the filter callback function. This is called to determine which certificates will be displayed by the dialog box.
szHelpFileName
A pointer to a null-terminated string that contains the full path to the Help file.
dwHelpId
The context identifier for the topic. For more information, see WinHelp.
hprov
A handle to the Cryptographic Service Provider (CSP) to use for certificate verification.
Requirements
Client Requires Windows "Longhorn", Windows XP, or Windows 2000 Professional.
Server Requires Windows Server "Longhorn", Windows Server 2003, or Windows 2000 Server.
Header Declared in CryptDlg.h.
Unicode Implemented as CERT_SELECT_STRUCT_W (Unicode) and CERT_SELECT_STRUCT_A (ANSI).
Best regards
herve cadieu
|
|
|
|
|
I have been trying for a week now to use VBA to send commands to cmd.exe input buffer. I've been able to send text to its screen buffer using writeconsole and writefile along with the std_output_handle. But whenever i use writefile with the std_input_handle it doesnt write any bytes. Also, i'm having trouble figuring out writeconsoleinput, because of the INPUT_RECORD datatype. Basically, i dont know how to create an INPUT_RECORD datatype, along with a KEY_EVENT data type in VBA.
Any help on how to use these functions would be great. here is what i have for writefile:
Private Const STD_ERROR_HANDLE As Long = -12&
Private Const STD_INPUT_HANDLE As Long = -10&
Private Const STD_OUTPUT_HANDLE As Long = -11&
m_StdInput = GetStdHandle(STD_INPUT_HANDLE)
m_StdOutput = GetStdHandle(STD_OUTPUT_HANDLE)
i = m_StdInput
WriteFile(i, ByVal Text, Len(Text), BytesWritten, ByVal 0&)
This works when i substitute m_StdOutput for 'i', but not for m_StdInput.
finally, this is for a program that askes for a username/password in sequence after being called from cmd.exe. I want to find a way of inputing the username/password. Ive tried redirecting with <, but that only works for the username.
Any suggestions/help would be greatly appreciated!
Nik
|
|
|
|
|
:(Hi,
I would like view the remote system files and select some of them for processing, similar to OpenFileDialog box for local/network files. I downloaded the FTP Client from www.enterprisedt.com, and it works great for uploading and downloading files by providing path. How can I browse the files?
Thanks
|
|
|
|
|
I think an FTP Client already had ability of browsing files on FTP server
so just select file and download it to process
is it ur mean?
<< >>
|
|
|
|
|
I'm looking for a way to countdown between two dates which will yeild "Years" "Months" Weeks" and "Days" to go.
EG(10/22/2005 to 10/26/2005 would yeild "0 Years" "0 Months" "0 Weeks" and 4 Days")
Been playing with datediff, dateadd and can't seem to find a way.
Any help would be appreciated.
Regards
|
|
|
|
|
Check out TimeSpan. It should provide you with the information you need.
|
|
|
|
|
Checked it out. Doesn't seem to do the trick. It will return in days but I need to count down.
IE(10/22/2005 to 11/22/2006 is 1 year 1 month 0 weeks and 0 days)
|
|
|
|
|
You can easily do this with just DateDiff and DateAdd.
Just create a function that first calculates the difference in years using DateDiff. Subtract that value from the original End date using DateAdd. Then calculate the difference left in months from the new temp End Date. Subtract that value from the new temp date to recalculate a new value for the temp end date, which should now only be different by days. Take the days left and split them into weeks and residual days left.
|
|
|
|