Skip to content

Visual Studio

Discussions on the Visual Studio .NET IDE

This category can be followed from the open social web via the handle visual-studio@forum.codeproject.com

3.1k Topics 7.8k Posts
  • help button

    csharp wpf help question
    3
    0 Votes
    3 Posts
    0 Views
    A
    Put a picture box with help icon image and onclick write your code, private void pictureBox1_Click(object sender, EventArgs e) { var appPath = Assembly.GetEntryAssembly().Location; var filename = Path.Combine(Path.GetDirectoryName(appPath), "\\Help.htm"); Process.Start(filename); } Thanks Do not forget to comment and rate the article if it helped you by any means.
  • Thank You, MicroSHAFT.... *NOT*!

    help announcement workspace
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Progress Bar

    csharp visual-studio wpf
    7
    0 Votes
    7 Posts
    0 Views
    L
    As is, you sound like you're placing an order. Try some tutorials and see if you can write the code. If you need help, post a question explaining what you are doing and where you are stuck. Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
  • 0 Votes
    6 Posts
    0 Views
    F
    I have another problem with extraction cab progress, is extracting but for every file my progress bar will update to 100%, i want my progress bar to update until all files is extracted, how to do that? :( i was playing with the codes but no luck, this is my code for now: Imports CabLib.Compress Imports CabLib.Compress.kCurStatus Imports CabLib.Extract Imports System Imports System.IO Imports System.Runtime.InteropServices Imports Microsoft.VisualBasic Public Class Form1 Private szFiles As ArrayList = New ArrayList Private FileCount As Integer = 0 Private TotalSize As Long = 0, Total As Long = 0, LastVal As Long = 0, Sum As Long = 0 Private Delegate Sub StatusText(ByVal Status As String) #Region " Status text " Public Function CabinetInfo(ByVal InfoCab As String) If Me.InvokeRequired Then Me.Invoke(New StatusText(AddressOf CabinetInfo), InfoCab) Else Label1.Text = InfoCab End If Return True End Function #End Region #Region " Progress Extract Function " Public Function ProgressExtract(ByVal k_Info As CabLib.Extract.kProgressInfo) As Integer If Total <> k\_Info.u32\_TotSize Then CabinetInfo(k\_Info.s\_FullPath) Sum = k\_Info.u32\_Written TotalSize = k\_Info.u32\_TotSize Else Total += k\_Info.u32\_Written - LastVal End If LastVal = k\_Info.u32\_Written BgWorkerExtract.ReportProgress(CInt(Sum)) Return True End Function #End Region Public Sub ExtractCab(ByVal CabFile As String, ByVal szPath As String) Try Dim szExtract As CabLib.Extract = New CabLib.Extract AddHandler szExtract.evProgressInfo, AddressOf ProgressExtract szExtract.ExtractFile(CabFile, szPath) Catch ex As Exception System.Windows.Forms.MessageBox.Show(ex.Message) End Try End Sub Private Sub BgWorkerExtract\_ProgressChanged(sender As Object, e As ComponentModel.ProgressChangedEventArgs) Handles BgWorkerExtract.ProgressChanged StatusBar.Maximum = CInt(TotalSize) StatusBar.Value = e.ProgressPercentage End Sub Private Sub BtnExtract\_Click(sender As Object, e As EventArgs) Handles BtnExtract.Click BgWorkerExtract.RunWorkerAsync() End Sub Private Sub BgWorkerExtract\_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles BgW
  • Minimize VS Main window on non-debug launch

    visual-studio debugging question
    6
    0 Votes
    6 Posts
    0 Views
    M
    Someone asked why I would want to do this. I have both IT and non-IT staff come to my desk to do informal reviews, of which the .exe is launched from VS. We review, jump back into VS to make changes, then relaunch. Having the VS window auto-minimize speeds the process along (yeah, first-world problem...). I have derived what I am confident is a simple, workable [yet, untested] solution. All my .exe's reference a core DLL which contains this enum and is used to perform specific functions given the focus. AppModeEnum { Debug, Test, Production } I'll add "Review" between Debug & Test (the order doesn't matter, they show up alphabetical anyway) and add a function InvokeReviewMode in the core DLL (can now be used in any .exe) to use WindowManager calls to walk through all open exe windows, minimize them (keeping track of their WindowState), except for the executing app's window. On close, all minimized windows at launch will be restored to their prev WindowState (if they still exist).
  • VS2012 ~ I INTENSELY DISLIKE NON-SIZABLE WINDOWS!!

    question workspace
    10
    0 Votes
    10 Posts
    0 Views
    A
    Yossarian[^]?
  • How to sound recorder to visual stduio

    tutorial
    2
    0 Votes
    2 Posts
    0 Views
    D
    Visual Studio doesn't have any sound recording capability. Now, if you were looking to write code to record sound, you're in the wrong forum. A guide to posting questions on CodeProject How to debug small programs Dave Kreskowiak
  • How to set a default Visual Studio event.

    tutorial csharp visual-studio help question
    2
    0 Votes
    2 Posts
    0 Views
    J
    This is the lounge, where we all hang out after a few beers, you may have more luck in the programming forums[^] :)
  • 0 Votes
    3 Posts
    8 Views
    C
    Great, thank you!
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    4 Posts
    0 Views
    Richard DeemingR
    Repeating what the other answers have said, your code is susceptible to SQL Injection: http://www.troyhunt.com/2013/07/everything-you-wanted-to-know-about-sql.html[^] To fix it, use a parameterized command: cmd.CommandText = "INSERT INTO T_inTem (maSKU, tenHang, maUPC, SL, gia, maNCC, ngayIn) VALUES (@maSKU, @tenHang, @maUPC, @SL, @gia, @maNCC, @ngayIn)" ' NB: For OLEDB commands, the parameter names don't matter; only the order in which they're added. cmd.Parameters.AddWithValue("@maSKU", maSKU) cmd.Parameters.AddWithValue("@tenHang", tenHang) cmd.Parameters.AddWithValue("@maUPC", maUPC) cmd.Parameters.AddWithValue("@SL", sl) cmd.Parameters.AddWithValue("@gia", gia) cmd.Parameters.AddWithValue("@maNCC", maNCC) cmd.Parameters.AddWithValue("@ngayIn", ngayIn) cmd.ExecuteNonQuery() "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • Send sms using vb.net or vb6.0

    help csharp design sales
    2
    0 Votes
    2 Posts
    0 Views
    L
    Lots of suggestions[^].
  • VisualStudio 2013 & Zedgraph

    question
    2
    0 Votes
    2 Posts
    0 Views
    S
    I haven't used it before but a couple of stackoverflow questions point to this on Codeproject A flexible charting library for .NET[^] Every day, thousands of innocent plants are killed by vegetarians. Help end the violence EAT BACON
  • Visual Studio Access Files

    csharp database visual-studio
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Custom installation in WPF WinForms

    csharp wpf winforms com question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • Update VS2010 With New Packages

    javascript question announcement
    3
    0 Votes
    3 Posts
    0 Views
    S
    Manage Nuget Packages Search Online All > Jquery > Install Jquery Sankarsan Parida
  • TFS Express - WTF am I Doing Wrong?

    database sql-server adobe sysadmin windows-admin
    3
    0 Votes
    3 Posts
    0 Views
    realJSOPR
    Nope, only one version on the hard drive. ".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
  • datalist problem

    help csharp asp-net
    2
    0 Votes
    2 Posts
    0 Views
    P
    Refer: nested-datalist-in-Asp-Net[^]
  • 0 Votes
    1 Posts
    0 Views
    No one has replied