vb.net

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

我的梦境 提交于 2021-02-11 15:24:09
问题 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

URL Rewrite rule - subfolder to query string value

走远了吗. 提交于 2021-02-11 15:01:36
问题 I'm trying to create a rule the will take the subfolder from the URL and convert that to a query string value for example: If I navigated to this URL: http://www.example.com/myfolder I would like that to read http://www.example.com/default.aspx?folder=myfolder This is where I'm up to: <rule name="Rewrite Language"> <match url="([a-z]{2})(.*)" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType

How to apply a .msstyles to a .NET app?

ε祈祈猫儿з 提交于 2021-02-11 15:01:11
问题 I code GUIs in .NET frequently, and most of them only have the value of being a GUI, e.g. they don't do anything otherwise impossible. So most of the development goes to making them friendly, intuitive and eye-candy. Then it comes to my mind it would be simply amazing to skin them through .msstyles files, since there are so many places to find those files, and also tools to make your own. And some of those msstyles are just stunning, probably not for your whole desktop, but for styling

URL Rewrite rule - subfolder to query string value

戏子无情 提交于 2021-02-11 14:59:25
问题 I'm trying to create a rule the will take the subfolder from the URL and convert that to a query string value for example: If I navigated to this URL: http://www.example.com/myfolder I would like that to read http://www.example.com/default.aspx?folder=myfolder This is where I'm up to: <rule name="Rewrite Language"> <match url="([a-z]{2})(.*)" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType

How can i initialize my DB connection on start of Webservice

柔情痞子 提交于 2021-02-11 14:56:36
问题 I have a Webservice written in VB.net which has several endpoints and i register the Routes in my WebApiConfig.vb. As there is no Startup page i am not sure where i can make the call on startup to initialize my db connection. 来源: https://stackoverflow.com/questions/60659630/how-can-i-initialize-my-db-connection-on-start-of-webservice

Proper way to programmatically set database connection for Crystal Reports

为君一笑 提交于 2021-02-11 14:45:24
问题 I am new to Crystal reports. I have to set the datasource of the report at run time through code. I have a working code but it is very unpredictable and has been giving many problems. I just wanted to know if I am doing something wrong or if there is a better way to do this. Sometimes I feel the report is not even using the connection string rather using the connection that was specified at compile time of the report from the standalone Crystal application. Is this true? Dim connectionInfo As

VB.Net Report viewer parameters

十年热恋 提交于 2021-02-11 14:21:33
问题 I added a Parameter to report.rdlc called "ReportTitle". It is text and allows blank values and nulls. I have tried different ways to pass the parameter value to no avail. This is what I've tried so far: Dim parReportParam1 As New ReportParameter("ReportTitle", "THIS IS MY TITLE") ReportViewer1.LocalReport.SetParameters(New ReportParameter() {parReportParam1}) Does not work! Dim params(0) As Microsoft.Reporting.WinForms.ReportParameter params(0) = New Microsoft.Reporting.WinForms

How to stop a timer when mouse is scrolling or on top of scrollbar in listbox

坚强是说给别人听的谎言 提交于 2021-02-11 14:21:21
问题 I'm looking for a way to detect and switch off a timer when the mouse cursor is scrolling a listbox. There is an easy way despite to create a new class like this one?link Would be possible to check rectangle location of listbox 1 scroll bar and say: if mouse is in this range then timer1.stop? EDIT1: In order to create a rectangle I'm using If e.X >= 364 AndAlso e.X <= 446 AndAlso e.Y >= 86 AndAlso e.Y <= 144 Then MessageBox.Show("Clicked within the rectangle") Else MessageBox.Show("Clicked

How to stop a timer when mouse is scrolling or on top of scrollbar in listbox

萝らか妹 提交于 2021-02-11 14:20:19
问题 I'm looking for a way to detect and switch off a timer when the mouse cursor is scrolling a listbox. There is an easy way despite to create a new class like this one?link Would be possible to check rectangle location of listbox 1 scroll bar and say: if mouse is in this range then timer1.stop? EDIT1: In order to create a rectangle I'm using If e.X >= 364 AndAlso e.X <= 446 AndAlso e.Y >= 86 AndAlso e.Y <= 144 Then MessageBox.Show("Clicked within the rectangle") Else MessageBox.Show("Clicked

VB.Net Report viewer parameters

ⅰ亾dé卋堺 提交于 2021-02-11 14:20:13
问题 I added a Parameter to report.rdlc called "ReportTitle". It is text and allows blank values and nulls. I have tried different ways to pass the parameter value to no avail. This is what I've tried so far: Dim parReportParam1 As New ReportParameter("ReportTitle", "THIS IS MY TITLE") ReportViewer1.LocalReport.SetParameters(New ReportParameter() {parReportParam1}) Does not work! Dim params(0) As Microsoft.Reporting.WinForms.ReportParameter params(0) = New Microsoft.Reporting.WinForms