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
M

Mitch F

@Mitch F
About
Posts
211
Topics
33
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Unexpected WPF Behaviour with Microsoft.Win32.OpenFileDialog [modified]
    M Mitch F

    Pete O'Hanlon wrote:

    It'll be the same behaviour as with a Windows Forms app.

    I just tried the same block of code in .Net 2.0, and that's correct; it copied the file to my hard drive as well.

    Pete O'Hanlon wrote:

    It sounds like you are performing the copy on the primary thread, which blocks the UI until it completes the operation.

    The only thing that confuses me is that I don't have any code to perform the copy in my project; when the user presses the Open button on the OpenFileDialog, it is copied over automatically without any extra code. Thanks, Mitch

    WPF csharp wpf design question

  • Unexpected WPF Behaviour with Microsoft.Win32.OpenFileDialog [modified]
    M Mitch F

    I've come across some really unexpected behavior using the OpenFileDialog, WPF, and a PocketPC (physical) device. I'm trying to let users select a file on their PocketPC using an OpenFileDialog, and when the user selects Open, WPF copies the file into the Temporary Internet Files directory, and then returns that as the path. I'm really confused as to why this happens, but here's the code to reproduce it.

        Dim ofd As New Microsoft.Win32.OpenFileDialog
        ofd.CheckFileExists = False
        ofd.CheckPathExists = True
        ofd.AddExtension = False
        ofd.Filter = "Folders|\*.\*"
        ofd.Multiselect = False
        ofd.InitialDirectory = "C:\\"
    
        ofd.ShowDialog()
    
        Console.WriteLine(ofd.FileName)
    

    When I select a file from the My Documents (eg, "\My Documents\Meeting Notes.psw") directory on my PocketPC, this is the output that is written in the console "C:\Users\*****\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\82P6MGLK\Meeting_Notes[1].psw" (Note, the astericks are used to hide my user-name). In addition to this, if you try it with a large file, the UI just freezes until the file finishes copying. Windows does not say that the program is "Not Responding", just you can't interact with the UI at all. Does anyone know why this happens? It certainly is interesting behaviour. Thanks, Mitch

    modified on Thursday, June 12, 2008 1:11 AM

    WPF csharp wpf design question

  • Retrieve value of checkbox column from gridview
    M Mitch F

    I figured out the solution. I created another column in my DataTable that is being tied to my ListView, and I bound the chk Checkbox to that column. Now, in order to get the value of checked or not, I can just retrieve the item from the DataTable and it'll output True or False. Here's my new XAML code:

        <ListView Margin="151.2,30,123.8,8" Name="lvSongs" ItemsSource="{Binding}" SelectionMode="Extended">
            <ListView.View>
                <GridView x:Name="gridViewSongs">
                    <GridViewColumn x:Name="chkColSongs">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate x:Name="chkCol">
                                <CheckBox Name="chk" IsChecked="{Binding Checked}" />
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                        <CheckBox x:Name="chkHeader"></CheckBox>
                    </GridViewColumn>
                    <GridViewColumn Header="Song Name" DisplayMemberBinding="{Binding Name}" Width="110"/>
                    <GridViewColumn Header="Artist" DisplayMemberBinding="{Binding Artist}" Width="125"/>
                    <GridViewColumn Header="Album" DisplayMemberBinding="{Binding Album}" Width="200"/>
                    <GridViewColumn Header="File Size (MB)" DisplayMemberBinding="{Binding Size}" Width="100"/>
                </GridView>
            </ListView.View>
        </ListView>
    

    :) Thanks.

    WCF and WF wpf question wcf help tutorial

  • Can there be web links in Internet Explorer history without visiting those?
    M Mitch F

    Sounds like you might have spyware/adware/virus on your PC. Have you checked your PC for anything like that? If nothing shows up, is there someone else accessing your PC physically and going to those sites?

    IT & Infrastructure help question

  • Retrieve value of checkbox column from gridview
    M Mitch F

    Hi, I have set up a ListView, and in its GridView, I have inserted a checkbox column. However, I can't figure out how to get/set the IsChecked property from code-behind. Here's my XAML:

    <ListView Margin="151.2,30,123.8,8" Name="lvSongs" ItemsSource="{Binding}" SelectionMode="Extended">
    <ListView.View>
    <GridView x:Name="gridViewSongs">
    <GridViewColumn x:Name="chkColSongs">
    <GridViewColumn.CellTemplate>
    <DataTemplate x:Name="chkCol">
    <CheckBox Name="chk" />
    </DataTemplate>
    </GridViewColumn.CellTemplate>
    <CheckBox x:Name="chkHeader"></CheckBox>
    </GridViewColumn>
    <GridViewColumn Header="Song Name" DisplayMemberBinding="{Binding Name}" Width="110"/>
    <GridViewColumn Header="Artist" DisplayMemberBinding="{Binding Artist}" Width="125"/>
    <GridViewColumn Header="Album" DisplayMemberBinding="{Binding Album}" Width="200"/>
    <GridViewColumn Header="File Size (MB)" DisplayMemberBinding="{Binding Size}" Width="100"/>
    </GridView>
    </ListView.View>
    </ListView>

    How do I go about changing / retrieving the values of each individual checkbox? Any help is greatly appreciated. Thanks, Mitch

    WCF and WF wpf question wcf help tutorial

  • 4gig ram in XP pc
    M Mitch F

    Is it safe to use the /PAE switch on all systems (XP & Vista) ? I always thought it could mess something up. Thanks.

    The Lounge csharp question asp-net database help

  • Problem with Vista
    M Mitch F

    The user will have to right click the program and select "Run as Administrator", or your application manifest file will have to request Administrator Privileges at runtime. This is also assuming that the account that the user is running the application from has Administrator privileges. Both of the above options will also pop up the ugly UAC dialog boxes. All in all, I would suggest you find a way to program your application without it needing Administrator privileges. I hope this helps.

    Visual Basic csharp help tutorial

  • easy question...... I am having dumb moment.
    M Mitch F

    In addition to the above posts, if you have to add a lot of quotes as you are creating a string, I would suggest creating a quote String and then just add it wherever you need a quote. Dim quoteStr As String = """" MsgBox(quoteStr + "Hello" + quoteStr) It makes it easier to read if you are working with lots of strings.

    Visual Basic question csharp help

  • Calculate a formula
    M Mitch F

    As said above, you can convert from degrees to radians by multiplying by PI/180. To go from radians to degrees, you multiply by 180/PI.

    C# question

  • Is my C.F. 2.0 crazy?.....Or not?
    M Mitch F

    I think the code that you would need to use is: TextBox1.BackColor = Color.FromArgb(255, 255, 0) Or: TextBox1.BackColor = Color.Yellow Also, make sure that you have the .Net CF Service Packs installed on your mobile device. (I had a few problems with coloring on my PPC before I installed the .Net CF SP2 on it) I hope this helps

    Mobile graphics help csharp visual-studio question

  • Having a form in a VB.NET DLL file?
    M Mitch F

    I haven't actually tried to do that before, but you would normally use something similar to the code below to open up a new form. Dim frmNew As New Form1 frmNew.Show() (I'm writing this from memory, I don't have VS open right now)

    Visual Basic csharp help tutorial question

  • Application Licensing
    M Mitch F

    That's exactly my issue. So, is there any way around this, or is it something I'll just have to live with if I don't want to spend lots of money on an assembly-encryption application? Thanks, Mitch

    Visual Basic csharp question dotnet visual-studio json

  • Application Licensing
    M Mitch F

    Thanks to everyone for the advice. As you have suggested, I'll just stick with a simpler licensing scheme; at least it'll prevent casual copying of the software between friends, coworkers, etc. I have one more question; however. Does anyone know where I could find a good EULA template that I can modify to my liking and distribute with my application? I've found a few sample ones using Google, but I'm not sure whether they are posted for actual usage, or just as an example of what a lawyer / firm would do. Thanks, Mitch

    Visual Basic csharp question dotnet visual-studio json

  • Clearing javascript cache in IE7
    M Mitch F

    Have you tried holding CTRL+SHIFT on your keyboard while pressing the refresh button at the top? I hope this helps.

    ASP.NET csharp javascript asp-net question

  • Application Licensing
    M Mitch F

    I'm considering releasing a product for sale on the internet, but I'm having a hard time figuring out a way to protect it. I've done a lot of research on Google for commercial applications, and quite a few sound good, but spending $1000+ on a good piece of software is not feasible in my situation. My e-commerce company provides a licensing tool to use, and I can activate, validate, etc, keys using their API's. However, the problem lies in the fact that any language that runs on the .Net CLR can be easily decompiled. This would make it pretty easy to simply decompile my program, remove the IF statements that deal with licensing, and then it's free for anyone with a P2P application. How can I go about protecting these validation IF statements and DLL files (the ones that my e-seller has provided me), without spending a lot of cash? I know obfuscation can be used, and that there is a simple version of Dotfuscator included with Visual Studio, so I will be using that, but it still does not remove the ease of which an IF statement can be deleted. Also, if I do move along with using my e-seller's licensing (eSellerate, for those that are interested), I essentially am locked into their services and could not switch e-commerce solutions if the need arises. If anyone has any suggestions or comments on how to protect .Net code, or if you can suggest any relatively well-priced commercial solutions, it would be greatly appreciated. Thanks, Mitch

    Visual Basic csharp question dotnet visual-studio json

  • RadioButton Width
    M Mitch F

    I apologize for my assumption; you've posted in the right area. :) If you look at the source code in HTML after ASP .Net creates the radio buttons, it actually creates two HTML elements, an tag (which creates the button) and a tag (that contains the text linked to the button). You will most likely have to find a way to get CSS attached to the element. I hope this helps.

    ASP.NET csharp question

  • Find PivotTable in Excel
    M Mitch F

    I think this is what you may be looking for: http://answers.yahoo.com/question/index?qid=20070918114411AAsehq7[^] (look at the last post in the list). I hope this helps.

    Visual Basic help question announcement

  • Vista Google Fight
    M Mitch F

    How about this one? http://www.googlefight.com/index.php?lang=en_GB&word1=I+love+xp&word2=I+love+vista[^] ;P (Just for the record, I am on the Vista side of the debate) For some reason, I don't think Google Fight is a good way to judge operating system approval rates.

    modified on Wednesday, April 2, 2008 2:09 AM

    The Lounge php database visual-studio com question

  • RadioButton Width
    M Mitch F

    Have you tried setting the AutoSize property of the RadioButton to false? By your code, I'm assuming you're not using ASP .Net, and that you are using C#; if that is the case, you might want to put this question in the C# forum next time. Otherwise, I apologize for my assumption. :) I hope this helps.

    ASP.NET csharp question

  • New to VB - NewFile Dialog / SaveFile Dialog help needed.
    M Mitch F

    You're welcome. If that doesn't work, you could also try, Dim sW As New IO.StreamWriter(pathToFile) or Dim sW As IO.StreamWriter sW = New IO.StreamWriter(pathToFile) I hope this helps; I haven't used the programming tools included with Office for a couple of years.

    modified on Tuesday, April 1, 2008 8:47 PM

    Visual Basic help csharp hardware tutorial 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