Jakein2006's Q&A profile
Visual Studio Express Editions Dynamic assignment of data type within a structure...?
I'm wondering if there is a way to assign a datatype to a variable within a structure dynamically at runtime. For example: Structure test Dim a as Integer End Structure Is there a way to make variable "a" dynamic at runtime, so that it could be "as Single", or "as Byte" based on conditions at runtime Meaning, each instance of the structure may have variable "a", but representing a different data type... If not, any suggestions on a way to implement something like this Maybe ... Public Class Form1 Structure test Dim x As Object End Structure Private Sub Button1_Click( ByVal sender As System.Object, _ ByVal e As System.EventA ...Show All
Windows Forms interacting text boxes & events question
hello: I have a user form in vb.net 2.0. When a user enters a price in one of 10 price fields, their corresponding percent fields and dollar fields(which are read only fields) are computed based upon the change in price. These computations involve a cost and a quantity field also on the form. In addition when either the cost or quantity fields are changed, all read only fields of the 10 price fields must change since these computed fields involve cost and quantity. So I have an event each time a price is changed to compute that price's read only fields, and I have an event to change the read only fields of ALL the prices if the cost or quantity fields are changed. I was thinking of putting these in the validating event routines ...Show All
Visual Studio about IIF(), if the denominator is zero, report view will show #ERROR
I use the expression in the text box, eg. =IIF(Fields!FA.Value=0,0,Fields!FB.Value/Fields!FA.Value) it meams if the value of the FA field is zero, the expression equal 0, else, equal (Fields!FB.Value/Fields!FA.Value), but when the FA is zero, the expression isn't 0, it shown #ERROR, why IIF is a function call, so all argument expressions are evaluated before IIF is called. Try something like this: =IIF(ISNULL(y), NOTHING, x/IIF(ISNULL(y), 1, y)) ...Show All
Visual Basic count
hi, i am very new to vb and have been looking for a solution for this problem for hours! i think that i have been looking at it for to long and have just completly lost the point of it, so any reply will be greatly appreciated!! anyway, here it is... i have a project where i must display the total number of items from 4 textboxs in between a certain range. for example if 10, 3, 4, 11 are entered into the textboxes, i want to display the total of numbers in between 0 and 5, thus 2 would be displayed. i know the answer will probably be something simple that i have overlooked, but i am near the end of my rope mentaly due to this !!!!!!!!!!!! Dim Count as integer = 0 For each c as control in me.controls if ty ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Anyone using IDirectInputJoyConfig8?
I'm trying to use IDirectInputJoyConfig8 to configure joystick settings on a joystick device I've written a driver for. My intention is to integrate with the control panel and provide custom test/calibration property sheets for the joystick. I'd like to use the IDirectInputJoyConfig8 interface to set the DIJOYTYPEINFO.clsidConfig and .dwFlags2 values by using the SetTypeInfo method. However, when I call Acquire(), I get an E_FAIL result, which is both undocumented (as a return code from Acquire) and not very helpful. I'm toying with the idea of abandoning doing things 'the right way' and just writing registry values to REGSTR_PATH_JOYOEM. I can set the clsidConfig this way, but I don't know about the dwFlags2 (I want to set JOYTYPE_M ...Show All
Software Development for Windows Vista How Vista detects antispyware or firewall from third-party firms?
And what I must do to Vista detect my program as antispyware I search in web, but not find answer. Thank you very much From http://support.microsoft.com/kb/883792 Q: How does Windows Security Center detect third-party products and their status A: Windows Security Center uses a two-tiered approach for detection status. One tier is manual, and the other tier is automatic through Windows Management Instrumentation (WMI). In manual detection mode, Windows Security Center searches for registry keys and files that are provided to Microsoft by independent software manufacturers. These registry keys and files let Windows Security Center detect the status of independent software. In WMI ...Show All
Visual C++ EDITTEXT resource to HWND
Hi, Is there any way that I can retrieve the HWND handle of an EDITTEXT resource for use in messages Thanks in advanced. ---Dan I'm actually using pure Win32 SDK...No MFC, ATL, etc (partially becuase I am using Dev-C++)...Anyway, an EDITTEXT control is a resource type for a text editing area within a dialog box. It is apparently a member of the EDIT class. I am trying to retrieve the HWND handle of it...Is there a way ...Show All
SQL Server multiple tables
hi, I have 3 tables: Unix , Windows & Sybase there are 3 dropdownlists in .asp page, dropdown1=<displays the lists of table> (Unix, Windows & Sybase) variable as @table dropdown2=<displays the list of Columns from the dropdown1 selected table> variable as @server dropdown3=<displays the list of Row Header from the dropdown1 selected table> variable as @user how shal i define the select statement for this: it should be something like, Select * from @table WHERE Server= @server AND Row-Header = @user I appreciate if you could kindly help me in getting the correct syntax, thanx in advance. hi, Thanks a million Jens, I have done the same way as you explained ( First line: DECLAR ...Show All
Windows Search Technologies wds v3.0b2 and xp/w2k indexing service - any dependancies? and more...
Hi, I have looked at the wds FAQ, the wds Wiki, and the MSDN doc's for XP indexing, but still don't know answers to the following: 1.) I am wondering if wds 3.0 relies on any of the built-in XP indexing service and that service's settings and registry entries Using a default XP sp2 install, I found the XP indexing service set to use a catalog 'stored' on a DVD-RW drive location (!) as per the key at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ContentIndex\Catalogs\System The default catalog named 'system' was pointing to F:\System Volume Information even though my %SystemDrive% is C:\ Why I want to understand this better: wds3.0 added the behavior of needing to 'enable' indexing per drive or f ...Show All
.NET Development Impersonating
Hi! After impersonating an account, via the use of Advapi32.dll LogonUser, in a windows application (done i an button click eventhandler), everything stalls and takes a lot of time. Such a simple thing as showing a messagebox takes some seconds. If I do the impersonation in the form_load everything works fine. How-come //Daniel I presume you are using the Platform Invoke API to use Advapi32.dll. This will potentially pin memory and cause memory fragmentation which may slow down things. Instead try using the System.Security namespace available. You can find more details at http://msdn2.microsoft.com/en-us/library/system.security.aspx . The WindowsIndentity.Impersonate() method may be of interest to you. h ...Show All
.NET Development Connecting to Informix database with VS2005
I’m trying to connect to an Informix 7.30 database using Visual Studio .NET 2005. The ODBC driver is Informix-CLI 2.5 (32 bit). I can connect with the Server Explorer in VS2005, however when I try to open a connection programmatically I get the following error. ERROR [S1000] [INTERSOLV] {ODBC Informix driver} Insufficient information to connect to the data source. ERROR [IM006] [Microsoft] [ODBC Driver Manager] Driver’s SQLSetConnectAttr failed ERROR [01000] [Microsoft] [ODBC Driver Manager] The driver doesn’t support the version of ODBC behavior that the application requested (see SQLSetEnvAttr) Any ideas on how to resolve this error I tried numerous different connection strings inclu ...Show All
Visual Studio Express Editions MS Word - Book Marks
I want to use a Word doc that I have allready created and insert a few words in. This is a work document that says that work is completed on such and such order number. How do I grab a word doc and insert "123456" as the order number and then place this into a word doc at a bookmark Thank you all nhaas, There is an article in Code Project on B uilding Simple Word Processor Around an Extended RichTextBox Control will give you much help for your project. The following link shows this article: http://www.codeproject.com/vb/net/WordProcessingPackage.asp I believe it will give you enough information! ...Show All
Visual Studio Express Editions why can't form control be multi thread
i red on some article said that to have it will cause use alot system resource. but with current tech (2 core) and upcoming 4 core and many pc with 1 gb ram . is this still not enough I getting piss of keep getting exception of cross call and have to go through long way to do simple things. Google with search terms like "MapReduce", "functional programming", Lisp, Haskell... ...Show All
Visual Studio Express Editions Can't send an email using Gmail.com
Visual Basic 2005: Haven't been able to send an email using smpt.Gmail.com. Getting "The SMTP Server requires a secure connection or the client was not authenticated." I am using my correct UserName and Password. Dim Email As New System.Net.Mail.MailMessage(FromTextBox.Text, ToTextBox.Text) Dim mailClient As New System.Net.Mail.SmtpClient() Dim basicAuthenticationInfo As _ New System.Net.NetworkCredential( "UserName@gmail.com" , "Password" ) mailClient.Host = "smtp.Gmail.com" mailClient.Port = 587 mailClient.EnableSsl = True mailClient.UseDefaultCredentials = True mailClient.Credentials = basicAuthenticationInfo mailClient.Send(Email) ...Show All
Visual Basic error. "Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key colum
Hello im new to vb.net 2003 but have used vb 6 for years and dabbled with 2005. A program that would usually take me a few hours to make i am on day 5, 4 and a half of which have been trying different ways to get it to update, and not one of them will post the information back to the SQL 2000 database I am actually going insaine. Please Please can somebody help me!! The best i can get out of it is this error. " Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information " I have googled it and come up with the fact the primary key isnt set right, but i still cant get that to work. Here is the peices of code that are relevant. Dim strSQL As ...Show All
