vb6

VB6 application : WebBrowser.Navigate refresh every 3 minutes

回眸只為那壹抹淺笑 提交于 2020-01-16 04:59:25
问题 I am making an application using VB6 in which a WebBrowser window is launched using this code: Private Sub Form_Load() WebBrowser1.Navigate ("http://google.com") End Sub How can I make the window refresh the same url every let's say 3 minutes ? I know it should be something well known but i am still searching my way through VB programming 回答1: You don't need 2 timers. just have a global variable globalTimer As Date that keeps the last time you navigated You can set Timer1 to run every second

How to delay the LostFocus Event in VB6

大城市里の小女人 提交于 2020-01-15 19:36:53
问题 I'm having an issue with a process that involves the LostFocus event. When the cursor loses focus from a particular textbox, I'm simply putting the focus back into that box. My issue is removing focus long enough for the user to click a log out button. Is there a way to intercept the LostFocus event long enough to allow the user to click the log out button? 回答1: Obviously I don't know the big picture here. But keeping only with what you said, the following does the trick. Effectively the

How to delay the LostFocus Event in VB6

穿精又带淫゛_ 提交于 2020-01-15 19:33:11
问题 I'm having an issue with a process that involves the LostFocus event. When the cursor loses focus from a particular textbox, I'm simply putting the focus back into that box. My issue is removing focus long enough for the user to click a log out button. Is there a way to intercept the LostFocus event long enough to allow the user to click the log out button? 回答1: Obviously I don't know the big picture here. But keeping only with what you said, the following does the trick. Effectively the

What is equivalent of VB6.0's MaskColor property in C#

北慕城南 提交于 2020-01-15 08:57:10
问题 The MaskColor property in VB 6.0 is used to remove the background color of an Image . How might I do the same in C#? 回答1: You can use MakeTransparent(Color color) for the bitmap image. example: //convert the red color in the image into transparent. ((Bitmap)BackgroundImage).MakeTransparent(Color.Red); 回答2: I don't think there is any direct equivalent. I've made it work in the past by using the ColorMap class to map my background color to Color.Transparent. Then I create an ImageAttributes

Visual Basic 6 :: Unload Dynamically Created Form

筅森魡賤 提交于 2020-01-15 08:47:06
问题 I'm trying hard to solve that issue without any luck :( Here is my code : Option Explicit Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Private frm As Form Public Sub GenerateForm() Set frm = New myForm With frm .Width = 4000 .Height = 3000 .Caption = "Message" End With frm.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2 frm.Show vbModal Sleep 3000 Unload Me Set frm = Nothing End Sub Private Sub Command1_Click() GenerateForm End Sub I want to

Replace everything except numbers in a string vb6

杀马特。学长 韩版系。学妹 提交于 2020-01-15 06:19:30
问题 well i did my research and seen a lot of posts about this but couldnt find a solution in VB6 so how can i do this in VB6 ? lets say i got a string like: " Once upon a time there was a little kid who wonders about going further than 1000 of miles away from home... " i want to get only numbers " 1000 " in this string seperated from string and wanna replace the whole string but numbers should stand still. 回答1: The simplest way is to walk the string and copy numbers to a new one: Function

Replace everything except numbers in a string vb6

眉间皱痕 提交于 2020-01-15 06:17:08
问题 well i did my research and seen a lot of posts about this but couldnt find a solution in VB6 so how can i do this in VB6 ? lets say i got a string like: " Once upon a time there was a little kid who wonders about going further than 1000 of miles away from home... " i want to get only numbers " 1000 " in this string seperated from string and wanna replace the whole string but numbers should stand still. 回答1: The simplest way is to walk the string and copy numbers to a new one: Function

Replace everything except numbers in a string vb6

喜你入骨 提交于 2020-01-15 06:17:06
问题 well i did my research and seen a lot of posts about this but couldnt find a solution in VB6 so how can i do this in VB6 ? lets say i got a string like: " Once upon a time there was a little kid who wonders about going further than 1000 of miles away from home... " i want to get only numbers " 1000 " in this string seperated from string and wanna replace the whole string but numbers should stand still. 回答1: The simplest way is to walk the string and copy numbers to a new one: Function

How To Get DeleteUrlCacheEntry() Error Codes? (Or additional information on why a particular deletion didn't work)?

这一生的挚爱 提交于 2020-01-15 04:59:13
问题 Basically, when I call DeleteUrlCacheEntry (which is part of the Wininet.dll API) I either get returned the number 1 (which means, deletion successful) or the number 0 (which meant, deletion didn't work). My question is, how can I find out why a deletion did not work? (that is, when a 0 is returned). I heard there is a GetLastError() function in C++, however I am using VB6 and apparently the GetLastError equivalent in VB6 is the Err.LastDllError property. After a DeleteUrlCacheEntry attempted

Copying different structs to byte arrays

早过忘川 提交于 2020-01-15 03:32:26
问题 I'm converting an old Visual BASIC program to C#. The program sends messages to some industrial machinery over a serial or ethernet line. To do this it creates a byte array of the message. The problem is that there are MANY (~50) different message formats, each one defined in VB6 as a user-defined type. For example. Public Type K_QCHECK Header As K_HEADER3 Count As LNG4 crc As INT2 End Type (LNG4 and INT2's are custom types) Running the VB6 code through an automated translation tool I get a C