vb.net

How to change exe icon programmatically in c# net [duplicate]

我的梦境 提交于 2021-02-20 04:39:10
问题 This question already has answers here : Changing external exe icon at runtime (2 answers) Closed 4 years ago . I have multiple products, for each product we have different .Icon, We need to change the exe icon programmatically, So it that user can see different exe icon for each product. 回答1: Perhaps you can have a different publish profile for the different products? You could also add all the icons to the project at once and change them on the shortcuts. 来源: https://stackoverflow.com

Application Settings scope - user vs application

北慕城南 提交于 2021-02-19 12:53:36
问题 If I create a user level application setting and bind it to a text box on a form, then type something in the textbox, the value is automatically saved and when the application is launched again the value appears in the textbox. This doesn't happen when I scope the setting as application. Why are application scoped settings not saved automatically like user scoped settings are? If this is by design, how can I manually save these settings and load them at runtime? 回答1: In short, application

Application Settings scope - user vs application

对着背影说爱祢 提交于 2021-02-19 12:52:00
问题 If I create a user level application setting and bind it to a text box on a form, then type something in the textbox, the value is automatically saved and when the application is launched again the value appears in the textbox. This doesn't happen when I scope the setting as application. Why are application scoped settings not saved automatically like user scoped settings are? If this is by design, how can I manually save these settings and load them at runtime? 回答1: In short, application

Passing data between forms DIRECTLY

会有一股神秘感。 提交于 2021-02-19 09:17:05
问题 I'm making a "Preference form" that will hold all the users preferences and when they go to Apply/Save I want the new values to transfer back to the main form and updateand close the form2. In the past I have done this like this: Private Sub PreferencesToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PreferencesToolStripMenuItem.Click Preferences.Show() End Sub and when I click the "Apply/Save" button before it closes I would Transfer all data like this: form1.textbox.text =

Passing data between forms DIRECTLY

无人久伴 提交于 2021-02-19 09:16:26
问题 I'm making a "Preference form" that will hold all the users preferences and when they go to Apply/Save I want the new values to transfer back to the main form and updateand close the form2. In the past I have done this like this: Private Sub PreferencesToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PreferencesToolStripMenuItem.Click Preferences.Show() End Sub and when I click the "Apply/Save" button before it closes I would Transfer all data like this: form1.textbox.text =

Translating Excel VBA script to Python [closed]

陌路散爱 提交于 2021-02-19 08:46:07
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 years ago . Improve this question I have the following VBA script: Sub excelgraphme() With ActiveSheet.QueryTables.Add(Connection:= _ "TEXT;C:\DRIVE D\graphme\result.txt", Destination:=Range("$A$1")) .TextFilePlatform = 866 .TextFileStartRow = 1 .TextFileParseType = xlDelimited

Bind a TextBox to the Sum of a DataTable Column

谁说胖子不能爱 提交于 2021-02-19 08:15:08
问题 Context I would like to have a footer under my grid to show some stats about the datas. Such as Sum of some columns and average of some other. Half solutions I've found I've found two things intersting to help me do this, binding the databox to a bindingSource, BUT it's only the selected line that is shown into the textBox... myTextBox.DataBindings.add("Text", myGrid.DataSource,"Weight") And getting the Sum of a column in the grid, BUT it doesn't update if I change the grid :S myTextBox.Text

sync local files with server files

落爺英雄遲暮 提交于 2021-02-19 08:12:48
问题 Scenario: I want to develop an application.The application should be able to connect to my remote server and download data to the local disk , while downloading it should check for new files and only download the new ones simultaneously creating the required(new) folders. Problem: I have no idea how to compare the files in the server with the ones in the local disk.How to download only the new files from the server to the local disk? What am thinking?: I want to sync the files in the local

sync local files with server files

自作多情 提交于 2021-02-19 08:12:28
问题 Scenario: I want to develop an application.The application should be able to connect to my remote server and download data to the local disk , while downloading it should check for new files and only download the new ones simultaneously creating the required(new) folders. Problem: I have no idea how to compare the files in the server with the ones in the local disk.How to download only the new files from the server to the local disk? What am thinking?: I want to sync the files in the local

Counting all files in folder and subfolder

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-19 05:53:39
问题 I am using visual basic and I want to count all the files that exist in a folder and in its subfolders.. I tried this : Dim counter = My.Computer.FileSystem.GetFiles("C:\Folder") MsgBox("number of files is " & CStr(counter.Count)) but it only counts files in the C:\Folder and not in C:\Folder\Sub-Folder\AnotherSubFolder What should I do? Thank's for help! 回答1: Use Directory.GetFiles() as defined here: https://msdn.microsoft.com/en-us/library/ms143316(v=vs.110).aspx So you'd just use Dim