xcvzzzzcv's Q&A profile
Smart Device Development SMS application
Hi, I’m working on a Pocket PC application in VB.Net on Compact Framework. It is required that we develop a SMS module. What is the functionality (code )that should be provided to the Click event of the SEND button. Thanks, the correct code is: Dim smsAddress As IntPtr = Marshal.AllocHLocal(smsAddressTag.Length) The Marshal class is from NetCF.Runtime.InteropServicesname space, which is included in demo VB project Public Shared Function AllocHLocal( ByVal cb As Int32) As IntPtr Try Return WinApi.LocalAlloc(WinApi.LPTR, cb) Catch ex As Exception End Try End Function System.Runtime.InteropServices.Marshal.Copy() is a from d ...Show All
Visual Studio Tools for Office Call macro from C#
Hello: I have an Excel Workbook Project withs VSTO and what i need is to run an existing vb macro. I create the macro with Visual Studio Macros (Alt-F11) inside VS 2005 and the look like this: Imports System Imports EnvDTE Imports EnvDTE80 Imports System.Diagnostics Public Module Module1 Public Sub Test() MsgBox( "Hola amigos" ) End Sub End Module Then i want to excute this macro from a sheet of my project, the look look like this: using System; using System.Data; using System.Drawing; using System.Windows.Forms; using Microsoft.VisualStudio.Tools.Applications.Runtime; using Excel = Microsoft.Office.Interop.Excel; using Office = Microsof ...Show All
.NET Development SOAP complex content - array of strings
Kinda working backwards - need to build a proxy client for a legacy app, and it needs to work on an Axis/Tomcat server I can never see live, so I'm working from the server's WSDL to build something to test against while I work on the client. Built the simple VB web service and have no problem accessing any string or int method parameters passed from a client to the web service, but I can't access the values of string(), array or arraylist parameters. I've been working plain old Windows apps and services for a while - may need a bit of a refresher. Appreciate any help, but I'd love to see some vb source of a complex SOAP service. Regards, Wheels Have you built a local simulation service from ...Show All
Software Development for Windows Vista "waiting for status update" indexing
ON the Indexing options control panel I get the following information that never seems to change. It is constantly waiting for status. What is wrong Searches are veeeeerrry slooooowwwww. Performance Raiting 3: Processor sub rating: 5 (Intel 830D) RAM sub rating: 5.1 (2gb fast SDRAM) Prima ry HDD: 3.9 (SATA II, 3.5GB free) Graphics 3.1 (INtel lakeport on-baord) Graphics Gaming: 3.0 not detected ( ) What is causing the "waiting for status update" message Any ideas Thanks I get the same message. I am on XPSP2 with outlook 2007 beta 2 and Windows Desktop Search v3.0 Also if I try and search my email in Outlook it crashes. When Outlook restarts I can see my folders on the left but no email will displa ...Show All
.NET Development how can i keep sockets server alive in asp.net web application
Hi , i have created a c# asp.net web application that acts as sockets server. i create server.cs class that handles all the sockets server processes ( start , listen , recieve , handle incoming msgs ,....) and one aspx page that call the start method in the server. the problem now is : at the session end ( after session timeout ) the server is closed and throws ThreadAbortException . my question is how can i make the server still alive , i don't want it to stop after the session timeout. i appreciate any help Thanks, Mayoosh What is this socket serever is doing Is the ASP.NEt application and the Socket Server are in different processes Are they in the same process What is the purpose of this socket server ...Show All
.NET Development specified cast is not valid
im developing a web service that interacts with sql server express. When i test out 1 service, this error pops up. below is my code in the web service. (note. Alarm and SMS are bot in INT but i have to cast them into String to insert into array). string[] aryAlert = new string[3]; dc.ConnectToDB(); command = new SqlCommand("SELECT SMS, Email, isDefault, UID, Alarm FROM Alert where (UID =" + uid + ") AND (isDefault='Y')", dc.Connection); command.ExecuteNonQuery(); reader = command.ExecuteReader(); while (reader.Read()) { try { &nb ...Show All
.NET Development DataBinding Question
Hey all, Ive been looking at this sub for nearly two days now and its starting to wear a bit thin. Im trying to query my database and display information in various places based on whats selected on my CBO... here is the code; Private Sub formDirectReceipt_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase .Load Dim strCnn, strSQL As String strCnn = "provider=sqloledb;data source=pe750-d;initial catalog=TestHSS;trusted_connection=yes;" strSQL = "SELECT [Product Code], [Short Description], Cost, ProductionGroup " & _ "FROM Product " '& _ '"WHERE Product.[Product Code] = @prdCode AND Product.ProductionGroup = @cellVar" Dim da As New OleDb.O ...Show All
Visual Basic Application Settings
Visual Studio 2005 Casual VB.Net User I try to understand Application Settings.... I create a project: WindowsApplication1 with one form and one button. I go to the Solution Property & Settings Tab and add two settings. One is string type named xxxxx and the other one is System.Drawing.Color type named ccccc. In the properties window for Button1 I assign Button1.Text to xxxxx and Button1.BackColor ccccc in the Application Set entry. In the Form1.Load subroutine I add the following: Button1.Text = My .Settings.xxxxx Button1.BackColor = My .Settings.ccccc I build and save and exit Visual Studio. Next I navigate to the release or debig folder where I find the executable WindowsApplication1.exe and the co ...Show All
.NET Development How can I create Images from a URL?
I am developing a native application running on a machine with an internet connection. At the other end of the world, I know there is a web server running with pictures. I would like to load pictures from that web server and display them. Would be awesome if the following would work: Image image = Image.FromFile(”http://www.webserver.com/directory/pictureFile.jpg”) ; But unfortunately, it doesn’t … what is the proper way of doing this. Thanks, Dom. I suppose this is what you are looking for Stream ImageStream = new WebClient ().OpenRead(url); Image img = Image .FromStream(ImageStream); Note: This is got form this great article. : Pulling I ...Show All
SQL Server Setting a Variable in a Foreach ADO Enumerator
Hi, im using a Foreach ADO Enumerator in my SSIS Package, which iterate on a DataSet from a SQL Task. I use the "Variable Mappings" on my Foreach Loop to retrieve the values into User-variables. But what i need is a way to combine a value from the DataSet with a User-variable and assign this new value to a new User-variable. Anybody tried something like this Regards, Martin You can do this without any problem in a script task Accessing a recordset in a script task (Your ADO recordset): http://blogs.conchango.com/jamiethomson/archive/2006/01/04/2540.aspx Accessing the package variables in a script task: http://msdn2.microsoft.com/en-us/library/microsoft.sqlserver.dts.runtime.var ...Show All
Windows Forms how to earse text in listbox
i tried this but it doesn't work, what sould I do private void button3_Click( object sender, EventArgs e) { listBox1.ClearSelected(); } hi, i have windiws application with two forms : form1 and form2. in form1 i have listbox1 and button to open form2. in form2 i have 6 textbox. how can i add text and values from textboxes to listbox in form1 Thenks ...Show All
Visual C++ MSVC 2003: ctor-try-block error: possible compiler bug
This message was originally posted to comp.lang.c++.moderated ----------------------------------------------------------------------------------------------- Hi! I 've faced a problem in my production code. I could deduce this problem to program shown below. It seems, that try-block in constructor doesnt work as it should (compared to case where no try block exists at all). I tested this small program on my MSVC .NET Pro 2003 (and separately on PC with MSVC2003 SP1 installed). In both cases I experienced the same behaviour - access violation. Please see comment inside the program body. To get this sample work - just comment out try block in ctor. Have anyone faced such behaviour before Is there known workarounds Thanks. Kiri ...Show All
Visual Basic Performance- Code Snippet
Hello, Any suggestions for improvement in this code snippet, performance wise [expecially since we have Generics in .net 2.0] Dim arr() As String = Split(PageRange, "-") Dim StartPage As Integer = CInt(arr(0)) Dim EndPage As Integer = CInt(arr(1)) And the split method works with a string - so calling this is splitting a string to make and array of string based upon the separator characters. Generics is not going to help you here - as the method itself is based around splitting a string. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Getting typed text into xna aka getting WM_CHAR in xna?
if i'm trying to get typed text into xna, what is the best way to do that I thought maybe i could start with a Windows Form and override WndProc() to capture WM_CHAR, but how do i properly do that... is there a #define that represents if i'm building for 360 or windows can i create a form then associate my game object with it somehow if i'm building for windows that would be unfortunate if there is no way to do this... do they have keyboards on 360's I suppose if they do then your mapping method would be the best way so i can support 360 keyboards, they doubtfully use windows messages. ...Show All
Visual Studio 2008 (Pre-release) NetMsmqBinding does not Queue
I am new to Indigo. So far, this technology looks like it should be very useful for many of our applications, but am not having much luck with the example code. We are most interested in the asynch possibilities of NetMsmqBinding. The MSDN samples (examples) for NetMsmqBinding are not working for me, though the non-queuing examples do work. Specifically, the "Transacted MSMQ Binding" and the "Transacted Batching" examples at MSDN Library > .NET Development > Samples > Windows Communication Foundation Samples > Windows Communication Foundation Technology Samples > Basic Windows Communication Foundation Technology Samples > Binding Samples > Net Binding Samples > NetMsmqBinding Samples (whew! ...Show All
