vb.net-2010

Outlook 2007 ribbon customization in .NET using VS2010; insertBeforeMso dynamic function

﹥>﹥吖頭↗ 提交于 2020-01-16 03:57:06
问题 Could anyone help me get the first tab idMso value of an opened Outlook item window? I need to dynamically set it in a ribbon xml file, since I figured out it would be redundant to add each item window into the xml code. If anyone has an existing solution to share, that would be great. Thanks 回答1: Solved it :) Just edit the return string from the GetCustomUI on runtime, but trap the explorer item first Public Function GetCustomUI(ByVal ribbonID As String) As String Implements Office

VB.NET How to add a child node to a specific node in treeview

随声附和 提交于 2020-01-13 02:30:07
问题 How to add a child node to a specific node in treeview? Say I have "Item1" in treeview already, how do I add "SubItem1" to "Item1" as it's child node? I know its probably really simple, but i tried lots of stuff, i just cant get it working. 回答1: Adding child node to parent (non-selected) First use Find() to get a reference to the parent node. Then add it using the same technique as the other sections below. Dim MyNode() As TreeNode MyNode = TreeView1.Nodes.Find("Item1", True) MyNode(0).Nodes

Read Csv file with LineFeeds within its fields

China☆狼群 提交于 2020-01-11 11:33:07
问题 I have this code to read a csv file : Dim strLineValue As String Using sr As StreamReader = File.OpenText("FilePath") strLineValue = sr.ReadLine Do While strLineValue IsNot Nothing strLineValue = sr.ReadLine n += 1 Loop End Using My problem is that I come across a csv file that the lines is like this: "Text1 LF LF text2","text3",text4,text5, , , , ,LF "Text6 LF LF text8","text9",text10,text11, , , , ,LF where LF is Line Feed. So I get something like this which is wrong Text1 text2 text3 text4

Getting VB.NET line numbers in stack trace

早过忘川 提交于 2020-01-10 10:43:06
问题 I have a VB.NET 2010 Winforms application where I'd like to include line numbers in the stack trace. I've read the following question and answers: how to print out line number during application run in VB.net Which mentions "you always need to include the PDB file with your code, which contains debugging information that is used in situations like this". Under advanced compiler settings I've tried "Generate debug info" as "pdb-only" and "full" for my release build and confirmed that a fresh

Difference between ByVal and ByRef?

我只是一个虾纸丫 提交于 2020-01-09 19:47:29
问题 What is the difference? I always use ByVal, but, I don't really have a good idea of when should I and when not... 回答1: If you pass in a reference, when you modify the value in the method, the variable in the call site will also be modified. If you pass value, it's the same as if another variable is created at the method, so even if you modify it, the original variable (at the call site) won't have its value changed. So, indeed, you should usually pass variables as value. Only pass as

Can't add Sql Compact 4.0 as Datasource on RDLC

徘徊边缘 提交于 2020-01-06 08:09:05
问题 i want to add on a report (*.rldc) a DataSource that is an Sql Compact 4.0 , but it doesn't give me the option to add it, but i can add on Server Explorer an Sql Compact 4.0 connection. What do i need to accomplish this? 回答1: You can use DataTable / DataSet to Bind Records from you SQL CE to your Local report. Just Click Add New item then choose DataSet and select you sqlce database on your server explorer. This may help you to start of: Building Reports from Object Collection using

A program sharing TEXT with its copy (opened twice)

╄→尐↘猪︶ㄣ 提交于 2020-01-06 07:56:31
问题 What i'm trying to do, is a simple program where i have 2 textboxes, and a button.(there is more but no need to say for resolving my problem) When i write text in the 1st textbox and click the button, it will be written in the 2nd textbox. Everything is ok here. Now, when i run this program more than once, i want the text to be written in the 2nd textbox of the others programs. Sorry for the bad explaination i gave you before, hope it's better :) OLD DESCRIPTION i'm actually trying to make a

Data Formatted in datagrid is exported to excel in unformatted manner

南楼画角 提交于 2020-01-05 04:22:07
问题 I need your guidance/help in this question. I have data formatted in the data grid view in this format 00-00-00-00-00-000. But when i am exporting this data to excel sheet , this formatting is gone and data is in this form- 0000000000000. The formatting is gone in excel. I have written in vb.net. Please provide me help\solution in this matter. 回答1: You could set the style of the required cells to something along the lines of: NumberFormat Imports Excel = Microsoft.Office.Interop.Excel Public

Check if an item is already exist in listbox1

好久不见. 提交于 2020-01-04 07:53:24
问题 In form1 I have two listboxs: listbox1, listbox2; loadbutton and savebutton This code will write listbox1.selecteditem into a txt file and loadbutton will load the info. But in listbox2 I want loadbutton to check if that item already exist in listbox2, if not write selected item from listbox1 and if that item already exist in listbox2 then do not save it (msg"this item is already exist in listbox2") This is not working Dim wri As New IO.StreamWriter("e:\test.txt", True) If ListBox2.ToString

Html.RenderPartial does not produce a value

六眼飞鱼酱① 提交于 2020-01-04 04:11:15
问题 Good day, all. I know that this is a pretty basic question in terms of MVC, but I can not for the life of me get @Html.RenderPartial to not give me errors. I am using VB.NET, and Razor. Most examples that I have found online are written in c#, which isn't hard for me to convert, but this simple one has got me stumped. This is in my Index view, that is being rendered by the _Layout.vbhtml: @Section MixPage @Html.RenderPartial("_MixScreen", ViewData.Model) End Section The above expression does