syhzaidi's Q&A profile
Visual Basic Adding a sheet from a template in Excel
Hi, Lots of references on how to use Excel from VB .Net, can get most of it working but cannot get Excel to add a new sheet to a workbook from a template. Looked on MSDN and found details on the sheets.add() method but it does not give examples it just says "you can add a sheet from an existing template" but does not say how...sigh. http://msdn2.microsoft.com/en-us/library/microsoft.office.interop.excel.sheets.add.aspx Here is the example I am taking apart to attempt this: Public oexcel As Excel.Application Public obook As Excel.Workbook Public osheet As Excel.Worksheet Sub Main() Try 'create new excel application oexcel = CreateObject("Excel.Application") oexcel.Application.DisplayAlerts = False ...Show All
Visual Basic how to access msdn library from the help menu in visual basic 6
i recently installed visual basic 6 stand alone, and then installed msdn library. however, from the help menu in vb, i was hoping to access msdn library. but it was not possible. any ideas or suggestions as to how to reference the library from vb. thanks in anticipation. T hese forums are for VB.NET and there are better places to find answers for older versions of VB. Maybe the VB6 newgroups - http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.vb.general.discussion&lang=en&cr=US Or perhaps the VB6 resource center http://msdn.microsoft.com/vbrun/ or perhaps www.vbcity.com may be useful places to search for answers on VB6 related questions. The MSDN CD was incl ...Show All
SQL Server Filtering on padded or non-padded varcvhar makes no difference
You use SQL Server for years then one day something comes along and you wonder if you really know anything at all. I have the following two queries that both return the same row of data: select * from Element where ElementName = '192538' and select * from Element where ElementName = '192538 ' --ElementName is a VARCHAR(50) --Note the spaces on the end of the literal here If I do a LEN ( ElementName ) on this row it returns 6. Can anyone explain this I'm utterly baffled - as are other people on my project. I validated with them that I wasn't missing something really stupid. Thanks in advance. -Jamie Phil Brammer wrote: Cast ElementName to 10 characters, not 6, and ...Show All
Visual Studio Team System UI improvement - collapsable code regions
I use #region...#end region directives in Visal Studio quite alot. I like the ability to hide code so I can concentrate only on what I am working on. It gave me two ideas for data-dude: In a script, hide queries in a script that I'm not currently working on. This is analogous to #region...#end region that I just talked about. Hide parts of a query that I'm not currently working on. I have a great use case for this: If I am using a derived table in a query and I am happy that that derived table is returning what I need then I don't to see that derived table anymore - I only need to see the alias. Similarly if I am using a CTE I don't need to see the body of the CTE, only its name. Comment regions could also be col ...Show All
Visual Basic Displaying hexadecimal data as float. What sort of result are you after?
My setup is: SQL Server 2005, Visual Web Developer 2005 Express (VB) I have a SQL Server database that gets a large C++ data structure that contains longs and floats serialized as an ASCII string where all bytes were converted to hex. The bytes have to be reversed because of endieness. I have been tasked with creating a page to dispaly the parsed data. I know that I can extract the data in groups of 4 (for the longs) and 8 (for the floats). I can convert the hex to decimal, but it is converting to a very large integer type value instead of the expected decimal. I have tried to search the web, but have found very little to aid. The closest used a function similar to the C++ memcpy. This did not seem to be available in my case. A sample of t ...Show All
.NET Development Sending Chr values to connect to a server
Hello I am in need of some help, im creating a chat client for my personal use and having a bit of trouble with the connection and what not. To connect: IP of server, Port of server I know how to set up all that and what not but here is my problem Imports System.Net Imports System.Text Imports System.Net.Sockets Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Sock As New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) Sock.Connect(IP.Text, Port.text) End Sub ----------------------------------- This is what I have to send to connect to the server 42 00 02 62 C7 85 C7 16 70 1A ...Show All
Visual J# J# Serial Port Example
Hi, i'm a 17 year old student from South Africa with school level Java skills. At school we're currently using Ready to Program, that is not capable of manipulating the serial port. I am using J# 2005 for my radio dispatcher project. Being a novice at programming, could anybody please post me an example of sending and receiving a couple of characters or a string via the serial port. Any help will be appreciated...Thanx Hallo Reyes This example is exactly what i needed to get started. I want to thank you for all your trouble and time. Thanks again. Geoff ...Show All
SQL Server Recover data from .mdf and .ldf file?
Hello! Hopefully someone can help me with the following (potentially huge) problem: We've got a simple database application running on microsoft sql desktop engine. This database contains two tables. Up until now all worked fine, but probably due to a programma that crashed part of the database seems to be corrupted or broken while today only one table contains/returns data and the other table does not return any values! When I open the .ldf and .mdf files in notepad I see that there is data belonging to both the tables. But how do I recover it The max. size of the database has not been reached by far (it's only 9Mbs), the sql queries are correct. This .ldf file is a log file ( ) I can't find detailed info about the princi ...Show All
Windows Forms Finding a the related row position in a datatable form a dataview
Hi All, Sorry about the complexity of the following. I have a DataSet containing a number of tables, one table SLAWarnings is shown in a DataGrid through the DataView dvWarnings. Attached to the table is a BindingManagerBase bmWarnings which is used to fire the PoistionChanged event. On this event I set up a temp relationship within the dataset to another table. I then use the .Position of the bmWarnings to GetChildRows of the related table and loop through them adding the rows and other stuff to a tree view. The problem I have is if the DataGrid has been sorted, the .Position then applies to the DataGrid row and NOT the DataTable row needed for the relationship. Can anyone give me some help/advice on how to get the underlyi ...Show All
Visual Basic Graphics Flicker in Program
I am sure this has already been asked, yet I couldn't find any such thread that helped my case. In my game the character and objects flicker occasionally. The character flickers from being animated a lot, same with the objects. This is my paint code for the game: Private Sub DrawGraphics() Dim intCounter As Integer Dim background As New Bitmap( Me .Width, Me .Height) Dim rectClear As Rectangle background = Me .BackgroundImage 'Clear First If strCharacter(2) = "YesClear" Then 'the rectangles keep track of the graphic locations rectClear = rectCharacter(0) rectClear.X = rectClear.X - intAnimaLeft rectClear.Y ...Show All
Visual Studio 2008 (Pre-release) Final Release Version
Hi, I would like to get further information about the future dates for the RC2 and the RTM versions. (MS sites or MS documentation will be better) Why My team need to raise a new version to production at the end of the year, but we would like to do this only with the RTM. Thanks. Shani. Thanks for the inquiry Shani. WCF and the .Net Framework 3.0 are part of Windows Vista so we inherently are on the same schedule. The most recent guidance that I know of on Windows RTM is here . We plan to release downlevel on Windows XP and Windows 2003 Server simultaneously. I hope that helps your planning. Ford McKinstry WCF Program Management ...Show All
Software Development for Windows Vista CopyFile() Issues in Vista
Does any one tried to copy a file to Windows\system32 folder programatically. My app. is trying to copy a dll into System32 folder but Copyfile() returns error code 5(access denied). Also this is not a install app. Any suggestions please let me know. I don't want my app.to Run as Admin. I just wanted to copy a dll and register it if it is not present. Thanks Aaron for your feedback. I am trying to check the compatibility of my app. on vista which was working fine on XP and 2K systems with out any admin rights. Looks like i have to bundle the steps which require admin rights to a seperate install package:( ...Show All
SQL Server Destination resets when changing selected databases
I discovered that everytime I need to add a database to my backup Maintenance Plan, after I select the new database from the drop-down of databases, the Destination automatically resets back to a default location. I'm assuming this is a bug that will be resolved at some point, but in the meantime, I need to see if there is a way I can deal with this permanently. I am not the only one adding databases to the backup routine so I can't verify that this setting is properly changed every time we have a new database (which is about once a week). Thanks in advance. But is Microsoft going to fix this bug I submitted it via the feedback site and was told they couldn't reproduce it. We don't add databases as ...Show All
Game Technologies: DirectX, XNA, XACT, etc. What's fails??:(
hello! I'm programming a game in dx9/C# and there's a bug that I can't understand. It happens 50% of the time and it's something to do with the textures: sometimes on the DXFonts and on the TransformedColoredTextured I get small dots/points/pixels. Here are two screenshots. Any idea Normal: Whit bug: ( points in the circles.. ) Thanks!! It looks like a texel alignment problem. The DirectX documentation topic Directly Mapping Texels to Pixels explains how to draw 2D graphics correctly using transformed vertices. If you think you're offseting your vertices correctly then check your video cards control panel settings to see if you have "Alternate Pixel Center" set or changed the "Texel ...Show All
Windows Forms Change publish path by ClickOnce?
Hello, Can I change the publish path by ClickOnce application. For example I want install my ClickOnce application into C:\Programs\MyApp\ or on share ( W:\Share1\MyApp ). Is this possible Thanks for any Answers. Regards, simon Neither external program needs to access my application (or my application an external program)! It's so: I have an application and deploy it with ClickOnce. But ClickOnce install my application to the default path C:\Documents and Settings\Local Settings\Apps\2.0\... Now I want to change it from C:\Documents and Settings\Local Settings\Apps\2.0\... for example to the C:\Program Files\MyApp\... (or in my case to the C:\Other Programs\... ). Is there any par ...Show All
