blindi's Q&A profile
Visual Basic code for opening and attaching an image file
im only new in VB. I need a code how to open an image such as .jpg, .gif, .bmp. etc. ,and attach or diplay the selected image to the PictureBox. thanks! Very simple - use the load method on the picturebox and supply it with the filename you wish to display. PictureBox1.Load( "d:\blue.bmp" ) ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How to read a D3DFMT_A16B16G16R16 texture?
Hi, I had a a D3DFMT_A16B16G16R16 format texture I want to read. I did sth like this: float *dest = new float[size*size*4]; D3DLOCKED_RECT locked; HRESULT hr = ptex->LockRect(0, &locked, NULL, 0); assert(hr == S_OK); WORD *fPointer=(WORD *)locked.pBits; for (DWORD y=0; y<size; y++) { for (DWORD x=0; x<size; x++) { DWORD index=( x*4 + (y*(locked.Pitch/2))); dest[y*size*4+x*4] = fPointer[index] ...Show All
Visual Basic Add text to a text box from a module
I'm upgrading a program I wrote in VB6 to VB2005 and am having a problem with updating a text box. I have a module that manages serial port communications. When data is received in the serial port buffer, it should update a text box (txtSerialIn) on a form (frmSerialInOut). Here's the code: Public Sub Handler( ByVal strInMessage As String ) frmSerialInOut.txtSerialIn.Text = strRXData & vbCrLf & frmSerialInOut.txtSerialIn. ...Show All
Windows Forms Which Port is used by ClickOnce?
Which port is ClickOnce using when installing or upgrading an application if you know the port, you can configure the firewall / proxy properly (provided you are authorized to do that), so that ClickOnce -Deployment can be used from anywhere. Or is this a naive thought hope somebody can help me greetings daniel i may not have the question right but i will share anyway... with firewall on, the application will be block ...Show All
Visual Studio 2008 (Pre-release) HelloWorld logging problem
Hi, Well, I was working on this very simple yet useful tutorial. http://wcf.netfx3.com/content/BuildingHelloWorld.aspx Then everything was going well till I reached the "Setting Up Logging" section. I followed the instruction even though SvcConfigEditor looked a bit different especially there's no Create button nor Logging tab.But I opened the app.config fille of the service and Under Diagnostic, I checked Default Message L ...Show All
Visual Basic Btn nothing Event
I have a WForm with a button, this button pulls up a word document when a letter is chosen...great......now if a letter is not chosen and i click extract i get an unhandled exception error...any ideas on how i can solve this...so that when a letter is not chosen and i click extract a message box will come up and say no letter chosen....... thanks i got the app running now...All i need to do is get my code right so i can input the policy num ...Show All
Windows Forms mageUI.exe fails to sign manifest after adding files - HELP!!!
I am using VS.NET 2005 beta 2 ClickOnce deployment and need to add some data files to my manifest. So far, I have been unsuccessful in using mageUI.exe to add the files due to a signing error. This signing error stands in the way of a production point-of-sale deployment scheduled for next week . We would greatly appreciate any help you might give us. Here's the steps I took and the errors/warnings that I s ...Show All
Visual Basic Gonna make me sound stupid
I know this is gonna make me sound stupid, but I have to ask anyways because I have no clue. I new at creating programs in Visual Basic. And I was wondering how to complete a program so that you can run it without having to open it with Visual Studio. For instance lets say that I wrote and alarm clock program for my labtop. Now how do I make the program so that it will work as a stand alone program without the need for Visual Basic Remembe ...Show All
Visual Studio Express Editions win32 application
i have read abt this frm the forum and followed steps given in the following link : http://lab.msdn.microsoft.com/express/visualc/usingpsdk/default.aspx but still i am getting the following error: 1>c:\documents and settings\administrator\my documents\visual studio 2005\projects\test\test\stdafx.h(28) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory i am missing something . plz help Looking at http: ...Show All
Visual Basic System.Drawing - XOR?
Is there a way to XOR (invert) colors when lines of different colors overlay each other In VB6 I was able to help myself using the Shape control and set the DrawMode property to "XOR Pen". How to accomplish this in VB2005 Thanks! The .Net IDE must not use GDI+ because it XOR-draws its slider bars (when you slide them). We have a very graphic rich application whose next release we wanted to write in ...Show All
Visual C# How do I embed an SQL Server Express database with a C# application?
I haven't been able to find any decent tutorials for easily deploying a C# application with a bundled SQL server 2005 express database. Does anyone have any good information regarding this Using SQL express database is really simple, if you are already used SQL Server. There is only difference in connection string where instead of Setting Data Initial Catalog, you should set AttachDbFilename with file path t ...Show All
SQL Server data application blocks for windows mobile
I've read that microsoft.applicationblocks.data for .net v2 can't be deployed to a mobile app, and my experience bears that out. So I 'm wondering if there are application blocks for windows mobile 5 that would know how to both talk to sql server mobile and sql server 2005 . I see OpenNetCF has a port but as far as I can tell, they only address sql server mobile and not talking to a sql server 2005 remote database. I can use the OpenNetCF versi ...Show All
Windows Forms Easy Way To Format Text in a Texbox
Hi does anyone know of any easy way to make a textbox display a number in a currency format e.g. $128.37 in Visual Studio 2003 (c#). I have looked through all the properties but am unable to find an easy way to do this. I currently have this textbox bound to some data. I am unsure if this will cause any problems. Thanks in advance. Scott Basically you need to use the ToStri ...Show All
Visual Basic updating data from excel files to sql tables
Hi, I need to update sql tables based on input from excel spread sheets. For example one of the tables has 150 fields. I need to update about 10 to 20 fields at a time. The excel sheet will contain only the key with the required 20 fields. Can someone provide me with some sample code or provide any suggestions about doing this Thanks. If you have Office 10 or 11, simply use the OWC.Spreadsheet control to connect to your SQL Serve ...Show All
Visual Basic Using FileGet to read Array in Structure (VB.NET Express Beta2)
I encounter a problem when using FileGet to read structure that includes an array. The code is: Public Structure Test Dim a() As Integer Public Sub ini() ReDim a(3) End Sub End Structure The following code use FileGet Dim i As Integer Dim te As New Test te.ini() FileGet(1, te, 1) i = te.a(0) The error message is: System.IndexOutOfRangeException was unhandled "Index was outside the bound ...Show All
