vb.net

ASP.NET - Request.Cookies no longer working in Chrome V80+

自作多情 提交于 2021-02-11 17:07:46
问题 In what is undoubtedly related to the Chromes samesite cookie policies released recently I am now having issues updating cookies in ASP.NET. I have a simple cookie collection to store basic user settings. The cookie is both generated and updated using the code below. SET COOKIE If Response.Cookies("Settings") IsNot Nothing Then Dim cookie As HttpCookie = Request.Cookies("Settings") cookie("Setting01") = ddl.SelectedValue cookie.Expires = Date.Now.AddDays(365) Response.Cookies.Add(cookie) End

ASP.NET - Request.Cookies no longer working in Chrome V80+

折月煮酒 提交于 2021-02-11 17:04:56
问题 In what is undoubtedly related to the Chromes samesite cookie policies released recently I am now having issues updating cookies in ASP.NET. I have a simple cookie collection to store basic user settings. The cookie is both generated and updated using the code below. SET COOKIE If Response.Cookies("Settings") IsNot Nothing Then Dim cookie As HttpCookie = Request.Cookies("Settings") cookie("Setting01") = ddl.SelectedValue cookie.Expires = Date.Now.AddDays(365) Response.Cookies.Add(cookie) End

How to show hidden text boxes when items are selected in a combo box

谁说胖子不能爱 提交于 2021-02-11 16:55:10
问题 I have a combo box with 5 different options, "one player", "two players", "three players" etc. My requirement is when user select something from combo box their equivalent text boxes should become visible i.e. if "one player" get selected, one text box should appear so user can enter the value. Same for two and three. Please suggest. 回答1: Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged If ComboBox1

VB.NET console application - login to website and download file

╄→гoц情女王★ 提交于 2021-02-11 16:55:06
问题 I am working an a VB.NET console application which automatically downloads textfiles from different websites. So far I've been using My.Computer.Network.DownloadFile(url, local_path, username, password) and it works fine - but there is one website which uses cookies. Under normal circumstances I have to manually visit the website in my browser, login by entering my credentials into a login form, press the "Log in" button and then there is a link which lets me download the file. If I use this

VB.NET console application - login to website and download file

落花浮王杯 提交于 2021-02-11 16:54:16
问题 I am working an a VB.NET console application which automatically downloads textfiles from different websites. So far I've been using My.Computer.Network.DownloadFile(url, local_path, username, password) and it works fine - but there is one website which uses cookies. Under normal circumstances I have to manually visit the website in my browser, login by entering my credentials into a login form, press the "Log in" button and then there is a link which lets me download the file. If I use this

Textbox not refreshing

半世苍凉 提交于 2021-02-11 15:50:02
问题 Dim VoucherOpenConnection As New OleDbConnection ' VoucherOpenConnection = New OleDbConnection VoucherOpenConnection.ConnectionString = "My Connection String" Dim VoucherString As String = "My Query" Dim DAVoucherString As New OleDbDataAdapter(VoucherString, VoucherOpenConnection) Dim DTVoucherString As New DataTable DAVoucherString.Fill(DTVoucherString) If DTVoucherString.Rows.Count <> 0 Then cmbCategory.Text = DTVoucherString.Rows(0).Item(8).ToString txtDetails.Text = DTVoucherString.Rows(0

Textbox not refreshing

南楼画角 提交于 2021-02-11 15:48:55
问题 Dim VoucherOpenConnection As New OleDbConnection ' VoucherOpenConnection = New OleDbConnection VoucherOpenConnection.ConnectionString = "My Connection String" Dim VoucherString As String = "My Query" Dim DAVoucherString As New OleDbDataAdapter(VoucherString, VoucherOpenConnection) Dim DTVoucherString As New DataTable DAVoucherString.Fill(DTVoucherString) If DTVoucherString.Rows.Count <> 0 Then cmbCategory.Text = DTVoucherString.Rows(0).Item(8).ToString txtDetails.Text = DTVoucherString.Rows(0

Control WPF progress bar from WinForms app

不打扰是莪最后的温柔 提交于 2021-02-11 15:46:48
问题 I have an WinForms app built with vb .net to which I've added a WPF user control. The WPF user control consists of only a progressbar. I can drag the WPF control from the toolbax and add it to the Main Form in WinForms vb .net. But I don't know how to let my WinForms app dynamically set the value for the WPF progress bar. Anyway I can dynamically set the WPF control progress bar's value from my WinForms app? Note: The reason Im using WPF progress bar instead of using WinForms progress bar is

Passing event to the parent form

荒凉一梦 提交于 2021-02-11 15:45:53
问题 I have a little problem here. I'm trying to transfer/pass/raise the events of an owned form to his parent. Lets look at my example: Lets say i have a form that initialize a CustomPanel (simply a class that inherits from System.Windows.Forms.Panel). It also have an event handler (it could be an other event, not necessarily a click event): Public Sub New() Me.Size = New Size(1000,1000) Dim pnl1 As New CustomPanel() pnl1.Location = New Point(0,0) pnl1.size = New Size(100,100) Me.Controls.Add

Copy a section of an image and paste it in another?

混江龙づ霸主 提交于 2021-02-11 15:24:49
问题 Lets say I got two images in VB.NET. Both are 100x100. Then I want to copy a section of the first image and paste it on the second image. For example, lets say I want to pickup the rectangle (25,25,75,75) from the first image, and paste it at (25,25) point of the second image. Sorry, it is hard to explain, so here's an example image: 回答1: This looks like what you are looking for. http://www.vb-helper.com/howto_net_drawimage_copy_part.html 来源: https://stackoverflow.com/questions/4811100/copy-a