Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

perlmunger

@perlmunger
About
Posts
292
Topics
44
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Windows Mobile Soft Keys
    P perlmunger

    I know this is stating the obvious but are you stopping the timer first before trying to call dispose? (just want to make sure). Honestly, I think you really need to track down the real issue rather than trying to kill the process. Something is not right in the app and I promise it will not benefit you to just ignore the problem and try to kill the process. That being said, if you really want to kill it, take a look at Process.Kill() here: http://msdn2.microsoft.com/en-us/library/system.diagnostics.process.kill(VS.80).aspx[^] Here's a note from that page:

    The Kill method executes asynchronously. After calling the Kill method, call the WaitForExit method to wait for the process to exit, or check the HasExited property to determine if the process has exited.

    I am not familiar with Envrionment.Exit(). You'll probably have to use something else, though, since it is not available in the compact framework. And as far as the link in #1 goes, don't worry about it. If you see my previous post (where I respond to myself), you'll see that I was sending you to look at a link about hardware keys, not softkeys. -Matt

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    Mobile csharp help tutorial question

  • sending email from ppc 2003
    P perlmunger

    Converting C# to VB. NET is pretty trivial. Try this: http://www.developerfusion.co.uk/utilities/convertcsharptovb.aspx[^] -Matt

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    Mobile csharp question

  • Windows Mobile Soft Keys
    P perlmunger

    Let me try again on number 1. You said Soft Keys and I'm thinking the whole time you meant hardware keys. Anyhow, here is a little tidbit I found this morning on soft keys in Windows Mobile 5.0:

    Adding smart keys to an application is as simple as designing a menu. When designing your application, simply create a menu with only two choices. When the application executes, Windows Mobile 5.0 will map each menu choice to a soft key. Windows Mobile 5.0 automatically provides this behavior to any application containing a menu with one or two choices. Menus containing more then two choices are rendered as a traditional menu.

    I haven't tested this, but I got it from here: http://msdn2.microsoft.com/en-gb/library/ms839548.aspx[^]

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    Mobile csharp help tutorial question

  • Automation and eVC++ 4.2
    P perlmunger

    If there is support for it, it is not immediately obvious in a web search. I did, however, notice that there is a namespace within the Window Mobile 5 SDK called Microsoft.WindowsMobile.PocketOutlook which looks like it allows you to do some Pocket Outlook related functions. Given, this is managed code and you wouldn't be able to work with it in eVC++ 4.2, however, if Outlook is what you want to work with, there appears to be a way to do it. If Word or Excel are what you want, though, you may be out of luck. -Matt

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    Mobile c++ testing tools question

  • Retain Benefits of Non-Normalized Table
    P perlmunger

    Thank you. That was helpful. -Matt

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    Database database help mysql

  • Windows Mobile Soft Keys
    P perlmunger

    1. I haven't tried this, but here is some code I found on the web: http://forums.devbuzz.com/tm.asp?m=38708&p=1&tmode=1[^] 2. Cool. 3. If your app is hanging after Application.Exit() gets called, then there is probably something else in your code keeping it from exiting. Are you using any threads or timers that aren't being terminated before trying to close the application? I have found that when I explicitly call Application.Exit(), it does in fact unload the app as I expect (or at least I've just assumed that and never checked to make sure ;-) ). 4. You will need to specify a shortcut in the "Start Menu" special folder. Take a look at this screenshot: http://www.matthew-long.com/images/installer_properties.png[^] You will also need to specify an icon for you application in the Application Properties like this: http://www.matthew-long.com/images/app_properties.png[^] Finally, you may want to soft reset your PDA. Icons get cached, so they need to be refreshed through a rest in order to show up correctly. Let me know if you have further questions. -Matt

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    Mobile csharp help tutorial question

  • Calling C# method from a JavaScript program
    P perlmunger

    As has already been suggested, you can use AJAX, but if you just want to post back user input, you can also just set the value of hidden fields using your javascript code. Just register a hidden field in your form by some name that will be known both in your javascript and your server side C# code. Then have javascript obtain that field by using document.getElementById and set its value to whatever you want. Then, when the page gets posted back, you will have access to the value that was placed in that field. -Matt

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    .NET (Core and Framework) csharp javascript com

  • Deployment question
    P perlmunger

    If you create your own project installer (System.Configuration.Install.Installer), you can easily get the install path by just using reflection on the executing assembly. Here is some code I use to do this in my installer:

    /// Since this assembly is being run from the install directory, it will return the full
    /// path to this assembly. You can simple get the directory path using a FileInfo object
    /// to know where it's been installed.
    System.Reflection.Assembly asm = System.Reflection.Assembly.GetExecutingAssembly();
    string baseAppDir = (new System.IO.FileInfo( asm.Location )).DirectoryName;

    /// We're certain this exists because our setup program created it.
    RegistryKey softwareKey = Microsoft.Win32.Registry.LocalMachine
    .OpenSubKey( "Software", true )
    .OpenSubKey( "Company Name", true )
    .OpenSubKey( "Application Name", true );

    softwareKey.SetValue( "InstallLocation", configFilepath );

    Keep in mind that I added a registry value in setup project that creates the HKLM\Software\Company Name\Application Name\InstallLocation key with some default or empty value. The setup project actually creates the keys you specified in the registry editor part of the setup project before it calls your code in the Installer class. -Matt

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    .NET (Core and Framework) csharp visual-studio sysadmin windows-admin help

  • Windows Mobile Soft Keys
    P perlmunger

    Please clarify what you mean on some of these. 1. What specifically do you want to do with the softkeys? Turn them off? Receive the events? 2. What do you want to add a background image to? Your form? According to the documentation, it doesn't look like the 'Control.BackgroundImage' (http://msdn2.microsoft.com/en-us/library/system.windows.forms.treeview.backcolor.aspx[^]) property is supported in the Compact Framework. There is probably another way to do it, but I doubt it's trivial. 3. PDAs keep the application running unless you explicitly tell it to terminate in your code, or you kill the running process from the Settings | System | Memory control panel. 4. In Visual Studio, Create a CAB setup program. Once the project has been created, there is a place in there to specify a shortcut to the Programs menu. This shortcut can have an icon associated with it. You edit this in the filesystem editor for the CAB setup program. Build the CAB project and then run it on the PDA. When your CAB gets installed on the PDA it will place the icon into the special Programs folder as you expect. -Matt

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    Mobile csharp help tutorial question

  • Windows mobile 5.0
    P perlmunger

    If you are using .NET CF 2, then you *should* be able to just set the 'BackColor' property. If I'm reading the documentation right, that is. I haven't actually done it. http://msdn2.microsoft.com/en-us/library/system.windows.forms.control.backcolor.aspx[^] http://msdn2.microsoft.com/en-us/library/system.windows.forms.treeview.backcolor.aspx[^] -Matt

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    Mobile csharp help tutorial

  • sending email from ppc 2003
    P perlmunger

    It seems that this question is readily answered on the web. A simple google search turned this up: http://blog.opennetcf.org/ayakhnin/CategoryView,category,Send%20Email.aspx[^] Maybe next time you should do a search before posting--not that I mind helping, but it seems like you're not really trying very hard to find an answer on your own. -Matt

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    Mobile csharp question

  • Web Service to work with Pocket PC
    P perlmunger

    Web services are not really good for notifications since they run from a web server and usually rely upon someone/something making a request. If your PDA application can poll the web service URL on a regular basis to see if there is an update available for the user in question, that would work, but if you want proper notifications, you probably need a separate system that will send email, or SMS messages which can then be processed on the PDA or at least used as an alert to tell the PDA to check the web service for updates. -Matt

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    Mobile csharp database com announcement

  • SMS Protocol...?
    P perlmunger

    Similar to email, SMS requires a server that will send the message for you. This makes it more of a service rather than a protocol. Google has an SMS service that you can use to send messages through. The site can be found here: http://www.google.com/sendtophone?client=navclient-ffsms[^]. You can connect to the service programmatically using some sort of web client. Alternatively, there are sites out there that will allow you to connect to their SMS service for a fee. -Matt

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    Mobile question

  • exception encountered
    P perlmunger

    Looks to me like you are trying to use an assembly that was created to work in the .NET Framework, but not in the .NET Compact Framework. That's just a guess though. The error message is confusing because it says that it occurred in 'System.Windows.Forms.dll', but the apparent missing method is Dispose which is found in 'Symbol.Generic.Controller'. Are you calling Dispose in your form on a Symbol.Generic.Controller object? If so, trying removing it and see if that helps. It seems that you may have inadvertently compiled your application against a normal .NET Framework library which has the Dispose method, but as soon as you try to run it on the PDA which has a different version of the Symbol assembly, it croaks because it doesn't support that method. This would also explain why it's a runtime exception and not a compile time failure. -Matt

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    Mobile help csharp question announcement

  • How to create a ticker on Pocket PC
    P perlmunger

    You would do it almost exactly the same way you would with a normal (desktop) stock ticker in .NET. Your task doesn't require any special knowledge for PPC development since you're planning to use .NET. I would look around the web for ticker projects people have done using the regular .NET framework (as opposed to the .NET Compact Framework). It will almost certainly work identically or close. You will probably be using the HttpWebRequest object or something related (though the WebClient class is not available on the compact framework). You can see an example of grabbing the HTML content from a Uri here: http://msdn2.microsoft.com/en-us/library/system.net.httpwebrequest.getresponse(VS.80).aspx[^] -Matt

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    Mobile csharp dotnet tutorial workspace

  • Retain Benefits of Non-Normalized Table
    P perlmunger

    I normalized a table in a database project I'm working on so that instead of having something like this:

    Table: entities

    ID NAME RELATED_ITEM_ID_1 RELATED_ITEM_ID_2 ..... RELATED_ITEM_ID_40
    1 Entity 1 1 24 67
    2 Entity 3 14 NULL 45

    I now have something like these two tables:

    Table: entities

    ID NAME
    1 Entity 1
    2 Entity 3

    Table: entity_items

    ENTITY_ID RELATED_ITEM_ID
    1 1
    1 24
    1 67
    2 14
    2 45

    I want to return a table that has a summary of the entities table returning the top three entity_items so that it will come back looking like the original (non-normalized) entities table. I am using a MySQL database, but any help with the basic concepts and SQL here would be appreciated. I'm sure this is a common problem people deal with, but I didn't even know the terminology to use to find an answer on the web. Thanks. -Matt

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    Database database help mysql

  • Retriving value from google map
    P perlmunger

    Did you sign up for a Google Maps API key here: http://www.google.com/apis/maps/[^]? If so, you have to make sure you are using the key from the server that you typed into the API key signup page. If you are running it from your local system, then you need to generate a key for "localhost". -Matt

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    ASP.NET csharp visual-studio

  • Retriving value from google map
    P perlmunger

    The reason questions like this don't get answered is because you are asking for someone to provide you with an entire solution to your problem. You need to break out your problem into smaller segments and ask specific questions. What would you think if I were to log into Code Project and say "Can someone provide me with source code for a financial application similar to Quickbooks?" You would think that was a ridiculous request. Well, your request may not be as ridiculous, but nobody here is going to write your code for you. Google's API is well documented and there are other tools for doing geo-location. Try to do what you want first and then ask specific questions. Also, this is an ASP .NET forum. The question you are wanting an answer for would be better categorized in the Web Development forum since it is not specific to ASP .NET. -Matt

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    ASP.NET csharp visual-studio

  • TreeView State Between Postback
    P perlmunger

    They might have the same value, but a different ValuePath. That is, some top level nodes have children with the same values as other top level nodes. The path to each node, however, is always unique. -Matt

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    ASP.NET help question

  • pass the values of variable in code Behind
    P perlmunger

    If all you want is to pass the value of a variable, just use your Session object:

    /// Add variable to Session object in Page1
    Session["variable_name"] = myVariable;

    And then in your second page

    /// Retrieve the variable you added in Page1
    string myVariable = Session["variable_name"].ToString();

    If this is not feasible because you don't want to use cookies (which Session uses by default), there is a way to enable cookieless sessions. -Matt

    ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

    ASP.NET question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups